[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: replace history
From: |
Juri Linkov |
Subject: |
Re: replace history |
Date: |
Thu, 03 Jan 2008 23:46:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
> > In Emacs 22 it's great the way that you are given the last
> search/replace
> > pair as a default for query-replace, but is there a way to get a history
> > of pairs rather than alternating search item/replace item?
>
> One way to implement this feature is to use one input string with the
> ed-like syntax "s/regex/substitution/g".
>
> I don't think this really does the job. It is a separate command
> that you have to use INSTEAD of query-replace.
>
> What's requested is a way to move thru the history of recent
> query-replace argument pairs.
One way to move thru the history of recent pairs is to put all pairs to
the default list of M-%. Every pair needs to be in the same format as
currently used to display the default value in its prompt - with an arrow
separating the FROM and TO arguments like "from1 -> to1". This has a drawback
that after typing RET with a string in this format, query-replace needs
to parse it, and separately add FROM and TO to the history lists.
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: replace history,
Juri Linkov <=