GNU bug report logs - #8504
add more query-replace choice keys

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Fri, 15 Apr 2011 01:45:02 UTC

Severity: wishlist

Tags: moreinfo

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8504 in the body.
You can then email your comments to 8504 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8504; Package emacs. (Fri, 15 Apr 2011 01:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Apr 2011 01:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: add more query-replace choice keys
Date: Fri, 15 Apr 2011 07:30:06 +0800
There should be a key to say "yes, replace this occurrence, but
keep the case exact"!

That way one wouldn't have to fiddle with any other variables and also
have the flexibility of two types of case policy, all within the same
query-replace session!

Query replacing x with Easting.

Type Space or `y' to replace one match, Delete or `n' to skip to next,
RET or `q' to exit, Period to replace one match and exit,
Comma to replace but not move point immediately,
C-r to enter recursive edit (C-M-c to get out again),
C-w to delete match and recursive edit,
C-l to clear the screen, redisplay, and offer same replacement again,
! to replace all remaining matches with no more questions,
^ to move point back to previous match,
E to edit the replacement string

Also E gave me Easting to edit, when it really should have gave me
EASTING, which it intended to use, depending on the string I was on.

Also E above doesn't say if editing it will change it for the rest of
the queries.

Maybe there should be a F to do that too.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8504; Package emacs. (Tue, 10 May 2022 04:15:01 GMT) Full text and rfc822 format available.

Message #8 received at 8504 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: Juri Linkov <juri <at> linkov.net>, 8504 <at> debbugs.gnu.org
Subject: Re: bug#8504: add more query-replace choice keys
Date: Tue, 10 May 2022 06:14:01 +0200
jidanni <at> jidanni.org writes:

> There should be a key to say "yes, replace this occurrence, but
> keep the case exact"!
>
> That way one wouldn't have to fiddle with any other variables and also
> have the flexibility of two types of case policy, all within the same
> query-replace session!

I think that sounds like a good idea -- I've often been frustrated by
this.  I.e., if you have

East

and (query-replace "east" "west") and then hit `E' to edit to weST,
it'll replace that with EaST.

So a precise-edit command would be nice, where it would replace that
with weST.

Perhaps Juri has some comments; added to the CCs.

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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 10 May 2022 04:15:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8504; Package emacs. (Wed, 11 May 2022 07:26:03 GMT) Full text and rfc822 format available.

Message #13 received at 8504 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 8504 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8504: add more query-replace choice keys
Date: Wed, 11 May 2022 10:13:37 +0300
>> There should be a key to say "yes, replace this occurrence, but
>> keep the case exact"!
>>
>> That way one wouldn't have to fiddle with any other variables and also
>> have the flexibility of two types of case policy, all within the same
>> query-replace session!
>
> I think that sounds like a good idea -- I've often been frustrated by
> this.  I.e., if you have
>
> East
>
> and (query-replace "east" "west") and then hit `E' to edit to weST,
> it'll replace that with EaST.
>
> So a precise-edit command would be nice, where it would replace that
> with weST.

In Isearch the key `M-c' toggles case-fold searching.
Maybe the same key could toggle case-fold replacement in query-replace?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8504; Package emacs. (Wed, 11 May 2022 12:00:03 GMT) Full text and rfc822 format available.

Message #16 received at 8504 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 8504 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8504: add more query-replace choice keys
Date: Wed, 11 May 2022 13:59:13 +0200
Juri Linkov <juri <at> linkov.net> writes:

> In Isearch the key `M-c' toggles case-fold searching.
> Maybe the same key could toggle case-fold replacement in query-replace?

Yes, that might be nice.  But I think adding a command to do
a case-sensitive edit would be good, too.

When I run into these issues, I'm usually fine with most of the
replacements it's doing, but I just want a single (or a couple) of
replacements to be something specifically different, and having a new
command (like `e' or something) to do that would be handy.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8504; Package emacs. (Wed, 11 May 2022 17:23:02 GMT) Full text and rfc822 format available.

Message #19 received at 8504 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 8504 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8504: add more query-replace choice keys
Date: Wed, 11 May 2022 20:09:20 +0300
>> In Isearch the key `M-c' toggles case-fold searching.
>> Maybe the same key could toggle case-fold replacement in query-replace?
>
> Yes, that might be nice.  But I think adding a command to do
> a case-sensitive edit would be good, too.
>
> When I run into these issues, I'm usually fine with most of the
> replacements it's doing, but I just want a single (or a couple) of
> replacements to be something specifically different, and having a new
> command (like `e' or something) to do that would be handy.

This would be nice mnemonics: `E' for case-sensitive editing,
and `e' case-insensitive.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8504; Package emacs. (Mon, 13 Jun 2022 14:19:02 GMT) Full text and rfc822 format available.

Message #22 received at 8504 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: jidanni <at> jidanni.org, 8504 <at> debbugs.gnu.org
Subject: Re: bug#8504: add more query-replace choice keys
Date: Mon, 13 Jun 2022 16:17:54 +0200
Juri Linkov <juri <at> linkov.net> writes:

>> When I run into these issues, I'm usually fine with most of the
>> replacements it's doing, but I just want a single (or a couple) of
>> replacements to be something specifically different, and having a new
>> command (like `e' or something) to do that would be handy.
>
> This would be nice mnemonics: `E' for case-sensitive editing,
> and `e' case-insensitive.

I've now done this in Emacs 29.

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




bug marked as fixed in version 29.1, send any further explanations to 8504 <at> debbugs.gnu.org and jidanni <at> jidanni.org Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 13 Jun 2022 14:19:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 12 Jul 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.