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

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

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


From: Tim Van Holder
Subject: replace history is broken for empty strings and/or duplicate entries
Date: Tue, 16 Nov 2004 09:09:54 +0100

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

If a replacement is done to the empty string (i.e. if replace-string and
its ilk are used to delete text), the replacement history does not cope
well.
It also ignores replacements where both sides are identical (an edge case,
admittedly, as such replacements are pointless; however, I feel even
pointless replacements should be kept in the history).

Example:

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

Both issues seem to have their root in read-from-minibuffer, as the
history contains ("z" "y" "x") in the above example.  As such there
is probably no easy fix, other than adding two new arguments to
read-from-minibuffer (KEEP-EMPTY-STRINGS and KEEP-DUPLICATES or
similar).




reply via email to

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