all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: "Sébastien Le Callonnec" <sebastien@weblogism.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Interacting with minibuffer
Date: Sat, 22 May 2021 23:21:39 +0300	[thread overview]
Message-ID: <YKln0+CBsC6z2bkC@protected.localdomain> (raw)
In-Reply-To: <m1sg2efv8d.fsf@weblogism.com>

* Sébastien Le Callonnec <sebastien@weblogism.com> [2021-05-22 22:03]:
> Let's say I have a buffer open, and I want to do a `search-forward' with
> a string already in my kill ring, so C-s,

😑 Sorry, C-s is `isearch-forward', not `search-forward'

>  I get into the minibuffer, C-y, and it turns out that the string is
> not present in the buffer.  At that point my reflex is to try to
> edit the search string: arrow keys end up moving the cursor in the
> buffer, and the command disappears from the minibuffer; backspace
> deletes the whole search string.

Instead press M-e to edit it.

There is more about incremental search:

As you type characters, they add to the search string and are found.
The following non-printing keys are bound in ‘isearch-mode-map’.

Type DEL to cancel last input item from end of search string.
Type RET to exit, leaving point at location found.
Type LFD (C-j) to match end of line.
Type C-s to search again forward, C-r to search again backward.
Type M-s M-< to go to the first match, M-s M-> to go to the last match.
Type C-w to yank next word or character in buffer
  onto the end of the search string, and search for it.
Type C-M-d to delete character from end of search string.
Type C-M-y to yank char from buffer onto end of search string and search for it.
Type C-M-z to yank from point until the next instance of a
 specified character onto end of search string and search for it.
Type M-s C-e to yank rest of line onto end of search string and search for it.
Type C-y to yank the last string of killed text.
Type M-y to replace string just yanked into search prompt
 with string killed before it.
Type C-q to quote control character to search for it.
Type C-x 8 RET to add a character to search by Unicode name, with completion.
C-g while searching or when search has failed cancels input back to what has
 been found successfully.
C-g when search is successful aborts and moves point to starting point.

If you try to exit with the search string still empty, it invokes
 nonincremental search.

Type M-s c to toggle search case-sensitivity.
Type M-s i to toggle search in invisible text.
Type M-s r to toggle regular-expression mode.
Type M-s w to toggle word mode.
Type M-s _ to toggle symbol mode.
Type M-s ' to toggle character folding.

Type M-s SPC to toggle whitespace matching.
In incremental searches, a space or spaces normally matches any whitespace
defined by the variable ‘search-whitespace-regexp’; see also the variables
‘isearch-lax-whitespace’ and ‘isearch-regexp-lax-whitespace’.

Type M-s e to edit the search string in the minibuffer.

Also supported is a search ring of the previous 16 search strings.
Type M-n to search for the next item in the search ring.
Type M-p to search for the previous item in the search ring.
Type C-M-i to complete the search string using the search ring.

Type M-% to run ‘query-replace’ with string to replace from last search string.
Type C-M-% to run ‘query-replace-regexp’ with the last search string.
Type M-s o to run ‘occur’ that shows the last search string.
Type M-s h r to run ‘highlight-regexp’ that highlights the last search string.
Type M-s h l to run ‘highlight-lines-matching-regexp’ that highlights lines
 matching the last search string.

Type C-h b to display all Isearch key bindings.
Type C-h k to display documentation of Isearch key.
Type C-h m to display documentation of Isearch mode.

If an input method is turned on in the current buffer, that input
method is also active while you are typing characters to search.
To toggle the input method, type C-\.  It also toggles the input
method in the current buffer.

To use a different input method for searching, type C-^,
and specify an input method you want to use.

To activate a transient input method, type C-x \.

The above keys, bound in ‘isearch-mode-map’, are often controlled by
 options; do C-c r a on search-.* to find them.
Other control and meta characters terminate the search
 and are then executed normally (depending on ‘search-exit-option’).
Likewise for function keys and mouse button events.

If this function is called non-interactively with a nil NO-RECURSIVE-EDIT,
it does not return to the calling function until the search is done.
See the function ‘isearch-mode’ for more information.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/



  reply	other threads:[~2021-05-22 20:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22 18:45 Interacting with minibuffer Sébastien Le Callonnec
2021-05-22 20:21 ` Jean Louis [this message]
2021-05-22 20:34   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 21:55     ` New package for Sweden: package-header.el - was " Jean Louis
2021-05-22 22:01       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:08         ` Jean Louis
2021-05-22 22:14           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:28             ` Jean Louis
2021-05-22 22:39               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:56                 ` Jean Louis
2021-05-22 23:58                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:03       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:13         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:44           ` Jean Louis
2021-05-22 22:54             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:20         ` Jean Louis
2021-05-22 22:34           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:51             ` Jean Louis
2021-05-22 22:57               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 23:10                 ` Jean Louis
2021-05-23  0:20                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-23  0:34                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-23  1:13                     ` Jean Louis
2021-05-23  1:29                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-23  1:42                         ` Jean Louis
2021-05-23  1:48                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-23  1:49                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:36           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:11       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 21:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-23  6:38 ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKln0+CBsC6z2bkC@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sebastien@weblogism.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.