Skip to main content
1 of 2
ychaouche
  • 229
  • 1
  • 8

regexp-isearch with fixed prefix

I'd like to search a buffer for headlines only. A headline is anything starting with the "*" character. Ideally, I'd invoke an interactive function which would take user input at the minibuffer. I'd only give it the string I'd like to search for (for example foo) and not worry about the regex (which would be the headline prefix "^\*.* " + foo). The function should behave the same as the classic regexp-isearch : reading input from the minibuffer, and search for next occurrence if you invoke it again.

Any ideas how I could do this?

ychaouche
  • 229
  • 1
  • 8