emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: replace history is broken for empty strings and/or duplicate entries


From: Richard Stallman
Subject: Re: replace history is broken for empty strings and/or duplicate entries
Date: Mon, 22 Nov 2004 09:07:03 -0500

    1. When the user types RET to repeat the last search, an empty string
    is added to the history:

    M-x replace-string RET {no history         } x RET y RET
    M-x replace-string RET {history: x -> y    } RET
    M-x replace-string RET {history: y ->      } (!)

    This is easy to fix in `query-replace-read-from'.

Could you fix it?

    M-x replace-string RET {no history         } x RET y RET
    M-x replace-string RET {history: x -> y    } z RET C-g
    M-x replace-string RET {history: y -> z    } (!)

    There is no simple solution since the user might want to retrieve
    the last entered FROM-STRING from the history with M-p on the next
    invocation of replace-string.

One solution is to somehow indicate which entries were to-strings.
Then replace-string could find the last to-string
and the previous from-string, and use those two.




reply via email to

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