unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 13175@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	[thread overview]
Message-ID: <87zk1hfpzr.fsf@mail.jurta.org> (raw)
In-Reply-To: <B4A2EEF59B2D4EF780AE2F64FBF3BCF0@us.oracle.com> (Drew Adams's message of "Thu, 13 Dec 2012 09:27:52 -0800")

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






  reply	other threads:[~2012-12-14  0:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-12-14  1:32   ` Drew Adams

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=87zk1hfpzr.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=13175@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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).