Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I search in Emacs without wrapping around the beginning of the file? And how can I search with regular expression e.g. i want to search 'service*start' (* is something)?

Thank you

share|improve this question

Emacs search (Ctrl+s) will go to the end of the file and then display this message: "Failing I-search: foo". You then have the choice of wrapping if you hit Ctrl+s again.

The shortcut for a regex search is Ctrl+Alt+s. So, to search for the pattern you specified, you would hit that key combination, and then type:


You can also access the regex search function through the emacs menus if you are using an emacs GUI or, by pressing Alt+x and then typing


and hitting enter.

For more information on the emacs regex format, see here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.