🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98985

C-w, C-y in isearch-backward

#98985
From: wilber
Date: Mon, 17 Dec 1990 19:23
74 lines
2291 bytes
The version of Emacs I'm using is 18.55.5.

When C-w is used inside of an incremental search, it copies the word after the
point into the search string buffer.  That works fine for isearch-forward.  But
for isearch-backward the point moves to the the wrong place after C-w for it to
work in a useful way.  Suppose the file contains the following lines, and that
point is at the place indicated by ^:

foo bar blech
blech
foo bar quux
zot
foo bar blech
ping
^
--------------------------

I type "C-r f o o" and the situation looks like this:

foo bar blech
blech
foo bar quux
zot
foo bar blech
^
ping
--------------------------
I-search backward: foo

So far, so good.  Now I type C-w and get:

foo bar blech
blech
foo bar quux
^
zot
foo bar blech
ping
--------------------------
I-search backward: foo bar

The search string is good but point has moved to "foo bar quux" instead of
staying at the last "foo bar blech".  If I now type C-w again I get

foo bar blech
blech
foo bar quux
^
zot
foo bar blech
ping
--------------------------
Failing I-search backward: foo bar quux

Because " quux" got appended to the search string and there weren't anymore
"foo bar quux"s.  What I wanted with the sequence "C-r f o o C-w C-w" was to
get

foo bar blech
blech
foo bar quux
zot
foo bar blech
^
ping
--------------------------
I-search backward: foo bar blech

so that the next C-r would go to the first "foo bar blech".  In a similar way
C-y inside of isearch-backward moves point up the the next matching string
after copying the line in the search buffer, when you want it to stay on the
current line.

Bob Wilber   wilber@homxb.att.com
Technical Details
Message-ID: <9012172047.AA28399@life.ai.mit.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!agate!ucbvax!tut.cis.ohio-state.edu!homxb.att.com!wilber

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,5676891e5c87a98c,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-12-17 11:23:00 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!agate!ucbvax!tut.cis.ohio-state.edu!homxb.att.com!wilber
From: wilber@homxb.att.com
Newsgroups: gnu.emacs.bug
Subject: C-w, C-y in isearch-backward
Message-ID: <9012172047.AA28399@life.ai.mit.edu>
Date: 17 Dec 90 19:23:00 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 74
Approved: bug-gnu-emacs@prep.ai.mit.edu