🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98308

isearch.el: mark not pushed if small window is opened

#98308
From: Dan_Jacobson
Date: Fri, 11 Oct 1991 04:52
31 lines
2212 bytes
There is a important bug in 18.57,55 isearch.el that causes mark not
to be pushed upon a successful isearch if the search caused one to
open a small window (for slower terminals).  The problem is that in
the case of the small window, (point) is queried before (goto-char) is
called to move us to the new location.  Therefore (point) and opoint
will be equal, so no mark will be pushed:

|    ;; If there was movement, mark the starting position.
|    ;; Maybe should test difference between and set mark iff > threshold.
|    (if (/= (point) opoint)
|	(push-mark opoint)
|      (message ""))
|    (if small-window
|	(goto-char found-point)
|      ;; Exiting the save-window-excursion clobbers this; restore it.
|      (set-window-start (selected-window) found-start t))))

It is odd that such a big bug [that caused me to often munch lots of
text inadvertently with C-w] could have gone unnoticed for so long...
must be because I like to do (setq search-slow-speed 999999) so I
always use the small-window.  [As a safety measure I will now set
search-slow-speed to 0 to avoid killing larger regions then I expected
until the next emacs version.]

[By the way, maybe the Info "File: emacs, Node: Search" should mention
something about this mark-pushing feature.  [It is mentioned in the
manual in "File: emacs, Node: Mark Ring".]  Also (describe-key "^S")
stuff might mention it too...  [(describe-key "ESC >") does]]

[Originally sent to emacs-bug Sun Oct 6 16:22:48 1991, but probably
lost in the mail]
Technical Details
Message-ID: <1991Oct11Fr0051580n.Dan_Jacobson@ATT.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!yale.edu!qt.cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!att.com!Dan_Jacobson

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,1d0befc2e5d14c56,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-10-10 21:52:00 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!yale.edu!qt.cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!att.com!Dan_Jacobson
From: Dan_Jacobson@att.com
Newsgroups: gnu.emacs.bug
Subject: isearch.el: mark not pushed if small window is opened
Message-ID: <1991Oct11Fr0051580n.Dan_Jacobson@ATT.COM>
Date: 11 Oct 91 04:52:00 GMT
Sender: gnulists@ai.mit.edu
Reply-To: Dan_Jacobson@ihlpz.att.com
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 31
Approved: bug-gnu-emacs@prep.ai.mit.edu