bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41692: 26.3; Enhancement request, `query-replace': let user use text


From: Juri Linkov
Subject: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default
Date: Fri, 05 Jun 2020 01:05:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> I see, for `C-M-%', only these two defaults:
>
> 1. A word at point (e.g. `foo'),
> 2. A regexp that matches a symbol at point (e.g. `\_<foo\_>'.
>
> But yes, that's better than nothing - a good start.
> `query-replace' could likewise use some love.

I agree that `query-replace' should at least do the same as
`query-replace-regexp', and `query-replace-regexp' could be extended.
Currently `query-replace-read-from' has:

                (if regexp-flag
                    (read-regexp prompt nil 'minibuffer-history)
                  (read-from-minibuffer
                   prompt nil nil nil nil (car search-ring) t))

It's easy to extend `read-regexp' with more options,
but what to do for non-regexp case?

Maybe to try to use `read-string' and extend it with more M-n options
like in `read-regexp'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]