GNU bug report logs - #73745
Add query-replace-reverse functions

Previous Next

Package: emacs;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Fri, 11 Oct 2024 11:03:01 UTC

Severity: wishlist

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 73745 <at> debbugs.gnu.org, Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#73745: Add query-replace-reverse functions
Date: Tue, 15 Oct 2024 09:17:08 +0300
>>> It is prompting with my previous action, but now I want to do the exact
>>> opposite,   `<h2 class="zz" → <h`
>>> No, I can't just put my (emacs -nw) cursor on top of the arrow and hit M-t.
>>
>> Some time ago we discussed 'M-t' to reverse 'from'/'to' parts.
>> But the problem is that for multi-word replacements
>> 'M-t' should still transpose words inside 'from' or 'to'
>> separately.
>>
>> All transpose keys ‘C-t’ (‘transpose-chars’), ‘M-t’
>> (‘transpose-words’), ‘C-M-t’ (‘transpose-sexps’), even ‘C-x C-t’
>> (‘transpose-lines’) for multi-line replacements -
>> all these keys can't be used to reverse 'from'/'to'.
>
> How about something like `C-c M-t`?

I see no other keys on the `C-c` keymap in the minibuffer:

  No commands with a binding that start with C-c.

OTOH, while reading a regexp for `C-M-%` there is:

  M-s c		read-regexp-toggle-case-fold

So maybe `M-s M-t` is not too bad.




This bug report was last modified 244 days ago.

Previous Next


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