* Request for Enhancement: C-y in Isearch mode should yank to next EOL.
@ 2004-09-26 9:24 Alan Mackenzie
2004-09-27 7:38 ` Richard Stallman
2004-09-27 20:49 ` Alan Mackenzie
0 siblings, 2 replies; 3+ messages in thread
From: Alan Mackenzie @ 2004-09-26 9:24 UTC (permalink / raw)
Hi, Emacs!
In Isearch mode, C-y yanks the text up to the end of the current line.
If point is already at EOL (e.g., you've just done a C-y), C-y does
nothing. This is not useful.
I propose that C-y should instead yank to the next EOL, so that repeated
`C-y's yank succesive lines. Here is a patch which does this:
2004-09-26 Alan Mackenzie <acm@muc.de>
* isearch.el (isearch-yank-line): C-y yanks to next EOL, not end
of current line.
*** isearch-1.240.el Sun Sep 26 08:03:05 2004
--- isearch-1.240.acm.el Sun Sep 26 09:16:52 2004
***************
*** 1253,1259 ****
(defun isearch-yank-line ()
"Pull rest of line from buffer into search string."
(interactive)
! (isearch-yank-internal 'line-end-position))
(defun isearch-search-and-update ()
--- 1253,1260 ----
(defun isearch-yank-line ()
"Pull rest of line from buffer into search string."
(interactive)
! (isearch-yank-internal
! (lambda () (line-end-position (if (eolp) 2 1)))))
(defun isearch-search-and-update ()
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Request for Enhancement: C-y in Isearch mode should yank to next EOL.
2004-09-26 9:24 Request for Enhancement: C-y in Isearch mode should yank to next EOL Alan Mackenzie
@ 2004-09-27 7:38 ` Richard Stallman
2004-09-27 20:49 ` Alan Mackenzie
1 sibling, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2004-09-27 7:38 UTC (permalink / raw)
Cc: emacs-devel
If you send this with a diff for etc/NEWS and for the Emacs Manual,
we can install it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Request for Enhancement: C-y in Isearch mode should yank to next EOL.
2004-09-26 9:24 Request for Enhancement: C-y in Isearch mode should yank to next EOL Alan Mackenzie
2004-09-27 7:38 ` Richard Stallman
@ 2004-09-27 20:49 ` Alan Mackenzie
1 sibling, 0 replies; 3+ messages in thread
From: Alan Mackenzie @ 2004-09-27 20:49 UTC (permalink / raw)
On Sun, 26 Sep 2004, Alan Mackenzie wrote:
>Hi, Emacs!
>
>In Isearch mode, C-y yanks the text up to the end of the current line.
>If point is already at EOL (e.g., you've just done a C-y), C-y does
>nothing. This is not useful.
>
>I propose that C-y should instead yank to the next EOL, so that repeated
>`C-y's yank succesive lines. Here is a patch which does this:
>
Here's the patch again, together with a manual change (to search.texi)
and a NEWS entry, as requested by RMS.
I've also slipped in a NEWS entry about my Isearch mode scrolling
facility. OK, it should _really_ be a separate patch, but ......
2004-09-26 Alan Mackenzie <acm@muc.de>
* isearch.el (isearch-yank-line): C-y yanks to next EOL, not end
of current line.
*** isearch-1.240.el Sun Sep 26 08:03:05 2004
--- isearch-1.240.acm.el Sun Sep 26 09:16:52 2004
***************
*** 1253,1259 ****
(defun isearch-yank-line ()
"Pull rest of line from buffer into search string."
(interactive)
! (isearch-yank-internal 'line-end-position))
(defun isearch-search-and-update ()
--- 1253,1260 ----
(defun isearch-yank-line ()
"Pull rest of line from buffer into search string."
(interactive)
! (isearch-yank-internal
! (lambda () (line-end-position (if (eolp) 2 1)))))
(defun isearch-search-and-update ()
*** search-1.55.texi Sun Sep 26 08:47:56 2004
--- search-1.55.acm.texi Mon Sep 27 20:14:10 2004
***************
*** 193,201 ****
character or word.
@kbd{C-y} is similar to @kbd{C-w} but copies all the rest of the
! current line into the search string. Both @kbd{C-y} and @kbd{C-w}
! convert the text they copy to lower case if the search is currently
! not case-sensitive; this is so the search remains case-insensitive.
@kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one
character at a time: @kbd{C-M-w} deletes the last character from the
--- 193,203 ----
character or word.
@kbd{C-y} is similar to @kbd{C-w} but copies all the rest of the
! current line into the search string. If point is already at the end
! of a line, it grabs the entire next line. Both @kbd{C-y} and
! @kbd{C-w} convert the text they copy to lower case if the search is
! currently not case-sensitive; this is so the search remains
! case-insensitive.
@kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one
character at a time: @kbd{C-M-w} deletes the last character from the
*** NEWS-1.1039 Mon Sep 27 18:03:55 2004
--- NEWS-1.1039.acm Mon Sep 27 20:32:58 2004
***************
*** 1165,1174 ****
--- 1165,1185 ----
new-kill-line is on C-k
+++
+ ** Vertical scrolling is now possible within incremental search.
+ To enable this feature, customize the new user option
+ `isearch-allow-scroll'. User written commands which satisfy stringent
+ constraints can be marked as "scrolling commands". See the Emacs manual
+ for details.
+
+ +++
** C-w in incremental search now grabs either a character or a word,
making the decision in a heuristic way. This new job is done by the
command `isearch-yank-word-or-char'. To restore the old behavior,
bind C-w to `isearch-yank-word' in `isearch-mode-map'.
+
+ +++
+ ** C-y in incremental search now grabs the next line if point is already
+ at the end of a line.
+++
** C-M-w deletes and C-M-y grabs a character in isearch mode.
--
Alan Mackenzie (Munich, Germany)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-09-27 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-26 9:24 Request for Enhancement: C-y in Isearch mode should yank to next EOL Alan Mackenzie
2004-09-27 7:38 ` Richard Stallman
2004-09-27 20:49 ` Alan Mackenzie
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).