Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit I-search word in emacs?

Tags:

search

emacs

When I search in the text, I type C-s, then type the word, then type C-s again and again, the cursor go forward to next locations of found words. The problem is, once I go to next word, I could not edit the search word in the mini buffer at the button, if I press Backspace, it goes to the previous found word in the text, but not deleting the last letter in the search word at the bottom. How can I get back to edit the word when doing the search?

like image 560
szli Avatar asked Dec 19 '13 18:12

szli


People also ask

How do I search for a word in Emacs?

Emacs also offers a simple, or nonincremental, search. To use a more straightforward search, type C-s RETURN or select Search from the Search menu. Type the search string, press RETURN, and Emacs begins the search. Simply press C-s again to repeat the search.

Is the search command incremental in Emacs?

The principal search command in Emacs is incremental: it begins searching as soon as you type the first character of the search string. As you type in the search string, Emacs shows you where the string (as you have typed it so far) would be found.

How do I search backwards in Emacs?

To search backwards, use C-r ( isearch-backward ) instead of C-s to start the search. A backward search finds matches that end before the starting point, just as a forward search finds matches that begin after it.

What is the command to search forward in Emacs?

The Emacs search command is different from the search commands of most editors, in that it is "incremental". This means that the search happens while you type in the string to search for. The command to initiate a search is C-s for forward search, and C-r for reverse search.


1 Answers

You can use M-e at any time during Isearch to edit the search string. When done editing, just resume searching (e.g., with C-s).

like image 106
Drew Avatar answered Sep 21 '22 21:09

Drew