emacs-devel
[Top][All Lists]
Advanced

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

Re: Curious: Why is there no binding for replace-string "out of the box"


From: Eli Zaretskii
Subject: Re: Curious: Why is there no binding for replace-string "out of the box"?
Date: Thu, 07 Mar 2024 09:15:52 +0200

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Thu, 7 Mar 2024 13:17:42 +0700
> Cc: Andreas Schwab <schwab@linux-m68k.org>, emacs-devel@gnu.org
> 
> The user-facing difference between replace-string and query-replace is
> that the former replaces unconditionally while the latter asks for
> confirmation (with a possibility to type ‘!’ to confirm replacement
> for all remaining occurrences). Similarly, replace-regexp vs
> query-replace-regexp.
> 
> Both confirming commands are bound by default: query-replace to M-%,
> query-replace-regexp to C-M-%.
> 
> Replacing without confirmation could be seen as an advanced feature —
> if you are already comfortable with undo, you’re ready to use it; if
> not, it’s scary.

All it takes to make unconditional replacements is to type '!' once.
TBH, I fail to see how that single keystroke could be significant when
what you gain is a much more powerful command.

Users can always bind replace-string to a key if they want, but
allocating a key binding to it by default would be unwise, given how
scarce the free keys are.  So I don't think we should do that by
default.



reply via email to

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