For example: I want the regexp ^\*.* to appear as the search pattern after typing M-x isearch-forward-regexp and <return>.
Asked
Active
Viewed 86 times
0
Big Shield
- 612
- 5
- 15
1 Answers
0
I found the solution:
(defun foo ()
(cond
((string= (minibuffer-prompt) "Regexp search: ")
(insert "^\\*.*"))))
(add-hook 'minibuffer-setup-hook 'foo)
- Press
C-M-sand<return>, then the regexp^\*.*will appear as the search pattern. - Complement the full regexp (such as
^\*.*emacs) and<return>. - Press
C-M-sandC-sto search incrementally.
References:
Big Shield
- 612
- 5
- 15