all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8504: add more query-replace choice keys
@ 2011-04-14 23:30 jidanni
  2022-05-10  4:14 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: jidanni @ 2011-04-14 23:30 UTC (permalink / raw)
  To: 8504

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.





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

* bug#8504: add more query-replace choice keys
  2011-04-14 23:30 bug#8504: add more query-replace choice keys jidanni
@ 2022-05-10  4:14 ` Lars Ingebrigtsen
  2022-05-11  7:13   ` Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-10  4:14 UTC (permalink / raw)
  To: jidanni; +Cc: Juri Linkov, 8504

jidanni@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





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

* bug#8504: add more query-replace choice keys
  2022-05-10  4:14 ` Lars Ingebrigtsen
@ 2022-05-11  7:13   ` Juri Linkov
  2022-05-11 11:59     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2022-05-11  7:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 8504, jidanni

>> 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?





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

* bug#8504: add more query-replace choice keys
  2022-05-11  7:13   ` Juri Linkov
@ 2022-05-11 11:59     ` Lars Ingebrigtsen
  2022-05-11 17:09       ` Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-11 11:59 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 8504, jidanni

Juri Linkov <juri@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





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

* bug#8504: add more query-replace choice keys
  2022-05-11 11:59     ` Lars Ingebrigtsen
@ 2022-05-11 17:09       ` Juri Linkov
  2022-06-13 14:17         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2022-05-11 17:09 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 8504, jidanni

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





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

* bug#8504: add more query-replace choice keys
  2022-05-11 17:09       ` Juri Linkov
@ 2022-06-13 14:17         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-13 14:17 UTC (permalink / raw)
  To: Juri Linkov; +Cc: jidanni, 8504

Juri Linkov <juri@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





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

end of thread, other threads:[~2022-06-13 14:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-14 23:30 bug#8504: add more query-replace choice keys jidanni
2022-05-10  4:14 ` Lars Ingebrigtsen
2022-05-11  7:13   ` Juri Linkov
2022-05-11 11:59     ` Lars Ingebrigtsen
2022-05-11 17:09       ` Juri Linkov
2022-06-13 14:17         ` Lars Ingebrigtsen

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.