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: Sun, 28 Oct 2018 11:06:46 +0100 Message-ID: References: <83muroyzfk.fsf@gnu.org> <83woqrx9pt.fsf@gnu.org> <835zy3tfrb.fsf@gnu.org> <83bm7pueej.fsf@gnu.org> Reply-To: charles@aurox.ch NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1540720814 28814 195.159.176.226 (28 Oct 2018 10:00:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2018 10:00:14 +0000 (UTC) Cc: 32990@debbugs.gnu.org To: eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 28 11:00:10 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 1gGhrb-0007Ci-4C for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2018 11:00:07 +0100 Original-Received: from localhost ([::1]:39468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGhtc-0007fY-LG for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Oct 2018 06:02:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGhtV-0007fT-Tw for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 06:02:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGhtS-0004gZ-Mw for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 06:02:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42461) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGhtS-0004gP-Hc for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 06:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gGhtS-0001QF-EU for bug-gnu-emacs@gnu.org; Sun, 28 Oct 2018 06:02: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: Sun, 28 Oct 2018 10:02: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.15407208835419 (code B ref 32990); Sun, 28 Oct 2018 10:02:02 +0000 Original-Received: (at 32990) by debbugs.gnu.org; 28 Oct 2018 10:01:23 +0000 Original-Received: from localhost ([127.0.0.1]:46719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGhso-0001PK-Jt for submit@debbugs.gnu.org; Sun, 28 Oct 2018 06:01:23 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:45715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGhsm-0001P6-1B for 32990@debbugs.gnu.org; Sun, 28 Oct 2018 06:01:21 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 4E89A228BF for <32990@debbugs.gnu.org>; Sun, 28 Oct 2018 10:05:37 +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=1540721134; x=1541585135; bh=QN l6HQk5bOZDi3HSagAUi2BU8gd/RDsosR0WjQ+dD/k=; b=S9k2Ez6doAER7/asbG TNEqZBgXQLSzVoCvGk8kpx68TjJ1NDssG3EMkdmK9UapQr33N0RpmNmZ3lmbZs1O KIt3B7Y78GroZS1vTV1dNHb8UnttW4mu1an4DK1n8QBfhnD0bKdQBFZIzH6lBx5p r+GhD99/AlLf6bZwSsE+tHQn4= 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 vnn3K27V05fr for <32990@debbugs.gnu.org>; Sun, 28 Oct 2018 10:05:34 +0000 (UTC) Original-Received: from gray (unknown [IPv6:2a02:1205:c693:2d60:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 741FE2289F; Sun, 28 Oct 2018 10:05:33 +0000 (UTC) In-reply-to: (charles@aurox.ch) 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:151738 Archived-At: The following patch improves indexing of the isearch commands and bindings mentioned in the current docstring of isearch-forward, and adds an explanation in the manual for one missing command (isearch-query-replace-regexp). This should be one of the last changes before we can comfortably shorten isearch-forward's docstring. ---- * doc/emacs/search.texi (Basic Isearch): Index isearch-exit, isearch-abort, isearch-cancel, isearch-repeat-forward, isearch-repeat-backward and their bindings. (Repeat Isearch): Index isearch-ring-advance, isearch-ring-retreat and isearch-edit-string. (Special Isearch): Index isearch-quote-char, isearch-char-by-name and their bindings. Index isearch-query-replace and isearch-query-replace-regexp, and the latter's binding. Explain what isearch-query-replace-regexp does. Index isearch-complete. (Word Search): Index isearch-toggle-word and its binding. ---- diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 58a7658..9170dc2 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -114,24 +114,30 @@ Basic Isearch @cindex exit incremental search @cindex incremental search, exiting +@findex isearch-exit +@kindex RET @r{(Incremental search)} When you are satisfied with the place you have reached, type -@key{RET}. This stops searching, leaving the cursor where the search -brought it. Also, any command not specially meaningful in searches -stops the searching and is then executed. Thus, typing @kbd{C-a} -exits the search and then moves to the beginning of the line; typing -one of the arrow keys exits the search and performs the respective -movement command; etc. @key{RET} is necessary only if the next -command you want to type is a printing character, @key{DEL}, -@key{RET}, or another character that is special within searches -(@kbd{C-q}, @kbd{C-w}, @kbd{C-r}, @kbd{C-s}, @kbd{C-y}, @kbd{M-y}, -@kbd{M-r}, @kbd{M-c}, @kbd{M-e}, and some others described below). -You can fine-tune the commands that exit the search; see @ref{Not -Exiting Isearch}. +@key{RET} (@code{isearch-exit}). This stops searching, leaving the +cursor where the search brought it. Also, any command not specially +meaningful in searches stops the searching and is then executed. +Thus, typing @kbd{C-a} exits the search and then moves to the +beginning of the line; typing one of the arrow keys exits the search +and performs the respective movement command; etc. @key{RET} is +necessary only if the next command you want to type is a printing +character, @key{DEL}, @key{RET}, or another character that is special +within searches (@kbd{C-q}, @kbd{C-w}, @kbd{C-r}, @kbd{C-s}, +@kbd{C-y}, @kbd{M-y}, @kbd{M-r}, @kbd{M-c}, @kbd{M-e}, and some others +described below). You can fine-tune the commands that exit the +search; see @ref{Not Exiting Isearch}. As a special exception, entering @key{RET} when the search string is empty launches nonincremental search (@pxref{Nonincremental Search}). (This can be customized; see @ref{Search Customizations}.) +@findex isearch-abort +@findex isearch-cancel +@kindex C-g C-g @r{(Incremental Search)} +@kindex ESC ESC ESC @r{(Incremental Search)} To abandon the search and return to the place where you started, type @kbd{@key{ESC} @key{ESC} @key{ESC}} (@code{isearch-cancel}) or @kbd{C-g C-g} (@code{isearch-abort}). @@ -154,13 +160,18 @@ Basic Isearch @node Repeat Isearch @subsection Repeating Incremental Search +@kindex C-s @r{(Incremental Search)} +@kindex C-r @r{(Incremental Search)} +@findex isearch-repeat-forward +@findex isearch-repeat-backward Suppose you search forward for @samp{FOO} and find a match, but not the one you expected to find: the @samp{FOO} you were aiming for -occurs later in the buffer. In this event, type another @kbd{C-s} to -move to the next occurrence of the search string. You can repeat this -any number of times. If you overshoot, you can cancel some @kbd{C-s} -characters with @key{DEL}. Similarly, each @kbd{C-r} in a backward -incremental search repeats the backward search. +occurs later in the buffer. In this event, type another @kbd{C-s} +(@code{isearch-repeat-forward}) to move to the next occurrence of the +search string. You can repeat this any number of times. If you +overshoot, you can cancel some @kbd{C-s} characters with @key{DEL}. +Similarly, each @kbd{C-r} (@code{isearch-repeat-backward}) in a +backward incremental search repeats the backward search. @cindex lazy search highlighting If you pause for a little while during incremental search, Emacs @@ -200,12 +211,15 @@ Repeat Isearch you have already seen. @cindex search ring +@findex isearch-ring-advance +@findex isearch-ring-retreat @kindex M-n @r{(Incremental search)} @kindex M-p @r{(Incremental search)} @vindex search-ring-max To reuse earlier search strings, use the @dfn{search ring}. The -commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a -search string to reuse. These commands leave the selected search ring +commands @kbd{M-p} (@code{isearch-ring-retreat}) and @kbd{M-n} +(@code{isearch-ring-advance}) move through the ring to pick a search +string to reuse. These commands leave the selected search ring element in the minibuffer, where you can edit it. Type @kbd{C-s}/@kbd{C-r} or @key{RET} to accept the string and start searching for it. The number of most recently used search strings @@ -214,14 +228,16 @@ Repeat Isearch @cindex incremental search, edit search string @cindex interactively edit search string +@findex isearch-edit-string @kindex M-e @r{(Incremental search)} @kindex mouse-1 @r{in the minibuffer (Incremental Search)} To edit the current search string in the minibuffer without -replacing it with items from the search ring, type @kbd{M-e} or click -@kbd{mouse-1} in the minibuffer. Type @key{RET}, @kbd{C-s} or -@kbd{C-r} to finish editing the string and search for it. Type -@kbd{C-f} or @kbd{@key{RIGHT}} to add to the search string characters -following point from the buffer from which you started the search. +replacing it with items from the search ring, type @kbd{M-e} +(@code{isearch-edit-string}) or click @kbd{mouse-1} in the minibuffer. +Type @key{RET}, @kbd{C-s} or @kbd{C-r} to finish editing the string +and search for it. Type @kbd{C-f} or @kbd{@key{RIGHT}} to add to the +search string characters following point from the buffer from which +you started the search. @node Isearch Yank @subsection Isearch Yanking @@ -357,17 +373,22 @@ Special Isearch @itemize @bullet @item -Type @kbd{C-q}, followed by a non-graphic character or a sequence of -octal digits. This adds a character to the search string, similar to -inserting into a buffer using @kbd{C-q} (@pxref{Inserting Text}). For -example, @kbd{C-q C-s} during incremental search adds the -@samp{control-S} character to the search string. +@findex isearch-quote-char +@kindex C-q @r{(Incremental Search)} +Type @kbd{C-q} (@code{isearch-quote-char}), followed by a non-graphic +character or a sequence of octal digits. This adds a character to the +search string, similar to inserting into a buffer using @kbd{C-q} +(@pxref{Inserting Text}). For example, @kbd{C-q C-s} during +incremental search adds the @samp{control-S} character to the search +string. @item -Type @kbd{C-x 8 @key{RET}}, followed by a Unicode name or code-point -in hex. This adds the specified character into the search string, -similar to the usual @code{insert-char} command (@pxref{Inserting -Text}). +@findex isearch-char-by-name +@kindex C-x 8 RET @r{(Incremental Search)} +Type @kbd{C-x 8 @key{RET}} (@code{isearch-char-by-name}), followed by +a Unicode name or code-point in hex. This adds the specified +character into the search string, similar to the usual +@code{insert-char} command (@pxref{Inserting Text}). @item @kindex C-^ @r{(Incremental Search)} @@ -400,12 +421,20 @@ Special Isearch @code{isearch-occur}, which runs @code{occur} with the current search string. @xref{Other Repeating Search, occur}. +@findex isearch-query-replace +@findex isearch-query-replace-regexp @kindex M-% @r{(Incremental search)} - Typing @kbd{M-%} in incremental search invokes @code{query-replace} -or @code{query-replace-regexp} (depending on search mode) with the -current search string used as the string to replace. A negative -prefix argument means to replace backward. @xref{Query Replace}. - +@kindex C-M-% @r{(Incremental search)} + Typing @kbd{M-%} (@code{isearch-query-replace}) in incremental +search invokes @code{query-replace} or @code{query-replace-regexp} +(depending on search mode) with the current search string used as the +string to replace. A negative prefix argument means to replace +backward. @xref{Query Replace}. Typing @kbd{C-M-%} +(@code{isearch-query-replace-regexp}) invokes +@code{query-replace-regexp} with the current search string used as the +regexp to replace. + +@findex isearch-complete @kindex M-TAB @r{(Incremental search)} Typing @kbd{M-@key{TAB}} in incremental search invokes @code{isearch-complete}, which attempts to complete the search string @@ -599,15 +628,18 @@ Word Search Search the Web for the text in region. @end table -@kindex M-s w @findex isearch-forward-word +@findex isearch-toggle-word +@kindex M-s w +@kindex M-s w @r{(Incremental Search)} To begin a forward incremental word search, type @kbd{M-s w}. If incremental search is not already active, this runs the command @code{isearch-forward-word}. If incremental search is already active -(whether a forward or backward search), @kbd{M-s w} switches to a word -search while keeping the direction of the search and the current -search string unchanged. You can toggle word search back off by -typing @kbd{M-s w} again. +(whether a forward or backward search), @kbd{M-s w} runs the command +@code{isearch-toggle-word}, which switches to a word search while +keeping the direction of the search and the current search string +unchanged. You can toggle word search back off by typing @kbd{M-s w} +again. @findex word-search-forward @findex word-search-backward