GNU bug report logs - #13175
24.3.50; Isearch: doc of `C-M-w' and interaction with Backspace (`DEL')

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Thu, 13 Dec 2012 17:29:02 UTC

Severity: minor

Found in version 24.3.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 13175 <at> debbugs.gnu.org
Subject: bug#13175: 24.3.50; Isearch: doc of `C-M-w' and interaction with Backspace (`DEL')
Date: Fri, 14 Dec 2012 02:35:36 +0200
> The doc should, in addition to mentioning this, document `DEL' and
> `C-M-w' together.  Do not document `C-M-w' only in the context of
> yanking - that makes no sense.
>
> And that doc of both together should point out clearly what the
> differences are, including the fact that `DEL' can cancel searching but
> `C-M-w' never does that.

`DEL' can't cancel searching, it can cancel only last input.
Maybe a better word is "discard" instead of "cancel"
like in the docstring of `isearch-delete-char'.

The first line of the current docstring of `isearch-delete-char' already
is quite clear, it says: "Discard last input item and move point back".
So when last input was `C-M-w', DEL discards it and moves point back.

But I agree that a possible confusion between these two commands
could be clarified.  The following patch does this:

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2012-12-13 23:00:05 +0000
+++ lisp/isearch.el	2012-12-14 00:35:21 +0000
@@ -1746,6 +1746,9 @@ (defun isearch-highlight-regexp ()
 
 (defun isearch-delete-char ()
   "Discard last input item and move point back.
+Last input means the last character or the last isearch command
+that added or deleted characters from the search string,
+moved point, toggled regexp mode or case-sensitivity, etc.
 If no previous match was done, just beep."
   (interactive)
   (if (null (cdr isearch-cmds))
@@ -1755,6 +1758,8 @@ (defun isearch-delete-char ()
 
 (defun isearch-del-char (&optional arg)
   "Delete character from end of search string and search again.
+Unlike `isearch-delete-char', it only deletes the last character,
+but doesn't cancel the effect of other isearch command.
 If search string is empty, just beep."
   (interactive "p")
   (if (= 0 (length isearch-string))





This bug report was last modified 12 years and 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.