emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for Enhancement: C-y in Isearch mode should yank to next EOL


From: Alan Mackenzie
Subject: Re: Request for Enhancement: C-y in Isearch mode should yank to next EOL.
Date: Mon, 27 Sep 2004 20:49:09 +0000 (GMT)


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  <address@hidden>

        * 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)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]