unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
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)	[thread overview]
Message-ID: <Pine.LNX.3.96.1040927203515.300C-100000@acm.acm> (raw)
In-Reply-To: <Pine.LNX.3.96.1040926090233.494A-100000@acm.acm>



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)

      parent reply	other threads:[~2004-09-27 20:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.96.1040927203515.300C-100000@acm.acm \
    --to=acm@muc.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).