GNU bug report logs -
#46783
Catch mistaken (query-replace "a" "a")
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Thu, 25 Feb 2021 22:28:01 UTC
Severity: wishlist
Tags: notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
(query-replace "a" "a") should ask "Are you sure?"
Better yet: "Are you nuts?"...
So how could it happen?
Well, e.g.,
the user needs to replace some character with a similar character, all
through the document. So similar in fact that it is hard to tell the
difference.
Therefore emacs should be a good Samaritan and please "Refuse loudly to
do one big no-op that will make the user furious once he discovers he
meticulously did... *nothing at all*."
Imagine answering
ynnyynnnnnnyynynnnynyyyyynynyyyyyynnnnynnnynynynyny only to find out it was just a big
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn !
So emacs should simply double check the strings before starting.
No the user can't always tell, no matter how hard he looks, if they are
the same or not.
One might say "well there are still some uses for replacing the same
thing with itself." No, wrong.
This bug report was last modified 4 years and 84 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.