all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Ed Avis <eda@waniasset.com>
Cc: 23078@debbugs.gnu.org
Subject: bug#23078: 24.5; Query-replace case insensitive - do not prompt for do-nothing replacements
Date: Thu, 12 May 2022 18:30:49 +0200	[thread overview]
Message-ID: <87r14yww5i.fsf@gnus.org> (raw)
In-Reply-To: <7E039918541B4C4183BFDB8F015C7430C4BBF9AB@WCL-EXCH02.wcl.local> (Ed Avis's message of "Mon, 21 Mar 2016 14:46:10 +0000")

Ed Avis <eda@waniasset.com> writes:

> M-x query-replace is case insensitive by default.  You may sometimes
> want to replace a string with another differing only in case, for
> example changing 'aaa' to 'Aaa'.  But query-replace prompts for all
> cases where a case-insensitive match for 'aaa' is found, even those that
> already equal the destination string.
>
> Here are the keypresses starting from 'emacs -Q' to reproduce:
>
> a a a RET A a a RET ESC O A ESC O A ESC % a a a RET
> A a a RET y
>
> I suggest that if the search and replacement strings differ only in
> case, then Emacs should prompt only where there is a real choice to be
> made.  When the match of 'Aaa' is highlighted it makes no difference
> whether you answer y or n; so Emacs should not waste the user's time
> asking.
>
> This does mean that the matches highlighted by query-replace differ from
> those you would find with a normal case insensitive search, in these
> specific circumstances where the search and replacement strings differ
> only in case.  I think that is a fair tradeoff.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I think this might be more confusing than anything else.  And just
because the default replacement has no changes, you can (for instance)
`E' out and type in something else for that specific match.

So I don't think this would be a good idea as the default interface, and
I don't think many people would want to modify a user option for
something like this, so I'm closing this bug report as a "wontfix".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2022-05-12 16:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 14:46 bug#23078: 24.5; Query-replace case insensitive - do not prompt for do-nothing replacements Ed Avis
2022-05-12 16:30 ` Lars Ingebrigtsen [this message]

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=87r14yww5i.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=23078@debbugs.gnu.org \
    --cc=eda@waniasset.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.