From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Interacting with minibuffer Date: Sat, 22 May 2021 23:21:39 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39037"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0.6 (2021-03-06) Cc: help-gnu-emacs@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Le Callonnec Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 22:23:30 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lkY9i-0009v4-BR for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 22:23:30 +0200 Original-Received: from localhost ([::1]:39208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkY9h-0002V9-Bz for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 16:23:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkY9J-0002Ul-4F for help-gnu-emacs@gnu.org; Sat, 22 May 2021 16:23:05 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:39999) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkY9H-0006Tb-68 for help-gnu-emacs@gnu.org; Sat, 22 May 2021 16:23:04 -0400 Original-Received: from localhost ([::ffff:197.239.35.51]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 00000000000ADF19.0000000060A96825.00007097; Sat, 22 May 2021 13:23:00 -0700 Mail-Followup-To: =?utf-8?Q?S=C3=A9bastien?= Le Callonnec , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130082 Archived-At: * Sébastien Le Callonnec [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/