all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: 62505@debbugs.gnu.org
Subject: bug#62505: 29.0.60; Switching between query-replace and query-replace-regexp should be easy, like isearch
Date: Thu, 30 Mar 2023 19:35:55 +0300	[thread overview]
Message-ID: <86pm8qw61g.fsf@mail.linkov.net> (raw)
In-Reply-To: <ierjzyzpf1l.fsf@janestreet.com> (Spencer Baugh's message of "Wed, 29 Mar 2023 14:51:02 -0400")

>>> isearch-forward and isearch-forward-regexp are bound to C-s and C-M-s.
>>> After an isearch-forward is started, it can be switched to
>>> isearch-forward-regexp by typing M-s r.
>>>
>>> query-replace and query-replace-regexp are bound to M-% and C-M-%.
>>> After a query-replace is started, there's no way to switch it to
>>> query-replace-regexp.
>>
>> It's not clear whether you want to switch modes when the replacement
>> process is already underway, or when reading query-replace arguments
>> in the minibuffer.  In Isearch mode 'M-s r' switches modes when the
>> search process is in progress, not when reading the search string
>> in the minibuffer.
>
> I think both should work.
>
> True that 'M-s r' doesn't work if you first start editing the search
> string with 'M-e'.  Maybe Isearch would also benefit from having that
> work?  With C-s and C-M-s bindings, which work both while searching and
> while editing the search string in the minibuffer?

It should be straightforward to support this in the minibuffer
since there was a recent precedent of implementing a similar feature
that toggles case-fold with 'M-s c' (read-regexp-toggle-case-fold)
in the minibuffer that reads a regexp to search/replace.





      reply	other threads:[~2023-03-30 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 15:34 bug#62505: 29.0.60; Switching between query-replace and query-replace-regexp should be easy, like isearch Spencer Baugh
2023-03-29 16:41 ` Juri Linkov
2023-03-29 18:51   ` Spencer Baugh
2023-03-30 16:35     ` Juri Linkov [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=86pm8qw61g.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=62505@debbugs.gnu.org \
    --cc=sbaugh@janestreet.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.