all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: raman@google.com, schwab@linux-m68k.org, emacs-devel@gnu.org
Subject: Re: Curious: Why is there no binding for replace-string "out of the box"?
Date: Thu, 07 Mar 2024 09:15:52 +0200	[thread overview]
Message-ID: <86il1yjyvr.fsf@gnu.org> (raw)
In-Reply-To: <CAP_d_8Ud90=YfzWOCL=AM-P254BvJGNF2o398TMAz38PYztnYg@mail.gmail.com> (message from Yuri Khan on Thu, 7 Mar 2024 13:17:42 +0700)

> 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	other threads:[~2024-03-07  7:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 21:12 Curious: Why is there no binding for replace-string "out of the box"? T.V Raman
2024-03-06 21:59 ` Andreas Schwab
2024-03-07  2:15   ` T.V Raman
2024-03-07  6:17     ` Yuri Khan
2024-03-07  7:15       ` Eli Zaretskii [this message]
2024-03-09  2:47     ` Richard Stallman
2024-03-09 16:55       ` T.V Raman
2024-03-07  6:38 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86il1yjyvr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=raman@google.com \
    --cc=schwab@linux-m68k.org \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.