From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#32990: 26.1.50; isearch-forward + t-m-m/mark-active doc Date: Tue, 16 Oct 2018 20:57:13 +0200 Message-ID: References: <83muroyzfk.fsf@gnu.org> <83woqrx9pt.fsf@gnu.org> <835zy3tfrb.fsf@gnu.org> Reply-To: charles@aurox.ch NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1539716280 13158 195.159.176.226 (16 Oct 2018 18:58:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 Oct 2018 18:58:00 +0000 (UTC) Cc: 32990@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 16 20:57:56 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCUXS-0003Io-Th for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Oct 2018 20:57:55 +0200 Original-Received: from localhost ([::1]:59846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCUZZ-0005C7-Dr for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Oct 2018 15:00:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCUSr-0000jQ-EA for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 14:53:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCUSl-0001LK-AP for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 14:53:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49695) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCUSk-0001Kd-O7 for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 14:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCUSk-0007Yd-Fu for bug-gnu-emacs@gnu.org; Tue, 16 Oct 2018 14:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Oct 2018 18:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32990 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32990-submit@debbugs.gnu.org id=B32990.153971597529035 (code B ref 32990); Tue, 16 Oct 2018 18:53:02 +0000 Original-Received: (at 32990) by debbugs.gnu.org; 16 Oct 2018 18:52:55 +0000 Original-Received: from localhost ([127.0.0.1]:53953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCUSc-0007YF-Ur for submit@debbugs.gnu.org; Tue, 16 Oct 2018 14:52:55 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:37855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCUSY-0007Xw-QC for 32990@debbugs.gnu.org; Tue, 16 Oct 2018 14:52:51 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id A2E0D228A0 for <32990@debbugs.gnu.org>; Tue, 16 Oct 2018 18:56:56 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1539716215; x=1540580216; bh=re lTvxaQ73Sz+tdvk/RVDR62aEEYX8aW5lu2QafHbYs=; b=d/P1lp2mt8TZ/zNgdd a1DmXAPJH7+79Tw0j7NN9xwc/5zduGUSG6hOY6KBNSfch2U76pwgYt9AxqYt3i9d tAj0dCz9dn88uGsi94TwquhQ7aKLFdW+2T29n1zuFmJO064jhj7LFARerbQV7CUB 1mGgEel8P9I2B76LZlyQetjHc= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aKlLxIU0qsqE for <32990@debbugs.gnu.org>; Tue, 16 Oct 2018 18:56:55 +0000 (UTC) Original-Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id CC0332288F; Tue, 16 Oct 2018 18:56:54 +0000 (UTC) In-reply-to: <835zy3tfrb.fsf@gnu.org> (message from Eli Zaretskii on Mon, 15 Oct 2018 18:02:16 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151317 Archived-At: > Date: Mon, 15 Oct 2018 18:02:16 +0300 > From: Eli Zaretskii > > Sounds like a good plan to me, thanks. > > I wouldn't rename isearch-delete-char; instead, I'd explain that what > it does is a kind of "undo", as you describe. Ok, how about the following? diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 053603e..58a7658 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -99,10 +99,18 @@ Basic Isearch that customize this highlighting. The current search string is also displayed in the echo area. - If you make a mistake typing the search string, type @key{DEL}. -Each @key{DEL} cancels the last character of the search string. -@xref{Error in Isearch}, for more about dealing with unsuccessful -search. +@cindex isearch input item +@cindex input item, isearch +@findex isearch-delete-char +@kindex DEL @r{(Incremental search)} + If you make a mistake typing the search string, type @key{DEL} +(@code{isearch-delete-char}). Each @key{DEL} cancels the last input +item entered during the search. Emacs records a new @dfn{input item} +whenever you type a command that changes the search string, the +position of point, the success or failure of the search, the direction +of the search, the position of the other end of the current search +result, or the ``wrappedness'' of the search. @xref{Error in +Isearch}, for more about dealing with unsuccessful search. @cindex exit incremental search @cindex incremental search, exiting @@ -283,14 +291,15 @@ Error in Isearch @code{isearch-fail}. At this point, there are several things you can do. If your string -was mistyped, you can use @key{DEL} to erase some of it and correct -it, or you can type @kbd{M-e} and edit it. If you like the place you -have found, you can type @key{RET} to remain there. Or you can type -@kbd{C-g}, which removes from the search string the characters that -could not be found (the @samp{T} in @samp{FOOT}), leaving those that -were found (the @samp{FOO} in @samp{FOOT}). A second @kbd{C-g} at -that point cancels the search entirely, returning point to where it -was when the search started. +was mistyped, use @key{DEL} to cancel a previous input item +(@pxref{Basic Isearch}), @kbd{C-M-w} to erase one character at a time, +or @kbd{M-e} to edit it. If you like the place you have found, you +can type @key{RET} to remain there. Or you can type @kbd{C-g}, which +removes from the search string the characters that could not be found +(the @samp{T} in @samp{FOOT}), leaving those that were found (the +@samp{FOO} in @samp{FOOT}). A second @kbd{C-g} at that point cancels +the search entirely, returning point to where it was when the search +started. @cindex quitting (in search) @kindex C-g @r{(Incremental search)} diff --git a/lisp/isearch.el b/lisp/isearch.el index 31571e1..40b0799 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1956,11 +1956,14 @@ 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." + "Undo last input item during a search. + +An input item is a command that pushes a new state of isearch (as +recorded by the `isearch--state' structure) to `isearch-cmds'. +Info node `Basic Isearch' explains when Emacs pushes a new +isearch state. + +If no input items have been entered yet, just beep." (interactive) (if (null (cdr isearch-cmds)) (ding)