* bug#13175: 24.3.50; Isearch: doc of `C-M-w' and interaction with Backspace (`DEL')
@ 2012-12-13 17:27 Drew Adams
2012-12-14 0:35 ` Juri Linkov
0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2012-12-13 17:27 UTC (permalink / raw)
To: 13175
In Isearch:
`C-M-w' deletes the last char from the search string. Following this
with `DEL' adds that char back! Is this behavior intended (a feature)
or a bug?
Seems like a useful feature, to me. But AFAICT, it is documented
nowhere.
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.
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
of 2012-12-13 on ODIEONE
Bzr revision: 111211 eggert@cs.ucla.edu-20121213021749-eyqqen0ewhn2hogq
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --no-opt --enable-checking --cflags
-IC:/Devel/emacs/build/include -Wall -Wextra -Wno-sign-compare
-Wno-type-limits -Wno-missing-field-initializers -Wno-pointer-sign
-Wdeclaration-after-statement --ldflags -LC:/Devel/emacs/build/lib'
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#13175: 24.3.50; Isearch: doc of `C-M-w' and interaction with Backspace (`DEL')
2012-12-13 17:27 bug#13175: 24.3.50; Isearch: doc of `C-M-w' and interaction with Backspace (`DEL') Drew Adams
@ 2012-12-14 0:35 ` Juri Linkov
2012-12-14 1:32 ` Drew Adams
0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2012-12-14 0:35 UTC (permalink / raw)
To: Drew Adams; +Cc: 13175
> 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 ()
\f
(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))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-14 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-13 17:27 bug#13175: 24.3.50; Isearch: doc of `C-M-w' and interaction with Backspace (`DEL') Drew Adams
2012-12-14 0:35 ` Juri Linkov
2012-12-14 1:32 ` Drew Adams
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).