help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remembering a regexp across searches


From: kgold
Subject: Re: Remembering a regexp across searches
Date: 2 Feb 2005 18:07:22 GMT

Michael Preminger <michaelp@hio.no> writes:
> 
> I need to do repeating incremental searches of regular expression.
> 
> when I find what I was looking for - I need to do some changes 
> (manually), and then search for the next occurrence corresponding to the 
> same regexp.
> 
> Sometimes the regexps are complicated, and retyping them in the 
> Iserach-buffer is tedious.
> 
> How do I avoid this re-typing? Is there a way to make emacs "remember" a 
> regexp and re-use it in a handy way?

;; recalling from search ring
(define-key minibuffer-local-isearch-map [up]         
'isearch-ring-retreat-edit)
(define-key minibuffer-local-isearch-map [down]       
'isearch-ring-advance-edit)
(define-key isearch-mode-map [up]                     'isearch-ring-retreat)
(define-key isearch-mode-map [down]                   'isearch-ring-advance)

Then up/down arrow scrolls through the search history.

M-x ESC ESC recalls the last command, and also has up/down arrow history.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]