all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#46783: Catch mistaken (query-replace "a" "a")
@ 2021-02-25 22:27 積丹尼 Dan Jacobson
  2021-02-26  8:57 ` Lars Ingebrigtsen
  2021-02-27 16:10 ` Richard Stallman
  0 siblings, 2 replies; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-02-25 22:27 UTC (permalink / raw)
  To: 46783

(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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-03-01  3:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-25 22:27 bug#46783: Catch mistaken (query-replace "a" "a") 積丹尼 Dan Jacobson
2021-02-26  8:57 ` Lars Ingebrigtsen
2021-02-26  9:49   ` Robert Pluim
2021-02-27  4:15     ` Lars Ingebrigtsen
2021-02-26 15:59   ` bug#46783: [External] : " Drew Adams
2021-02-27 16:10 ` Richard Stallman
2021-02-27 23:07   ` 積丹尼 Dan Jacobson
2021-02-28  6:17     ` Richard Stallman
2021-03-01  3:52       ` 積丹尼 Dan Jacobson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.