GNU bug report logs -
#41692
26.3; Enhancement request, `query-replace': let user use text at point as default
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Wed, 3 Jun 2020 18:36:01 UTC
Severity: wishlist
Tags: fixed
Found in version 26.3
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 41692 <at> debbugs.gnu.org (full text, mbox):
> query-replace-regexp already does all the above. It provides text
> at point for first M-n, the last search string for the second M-n, etc.
The bug report was about `query-replace' (but also other,
related commands, if relevant).
Checking with the Emacs 27 pretest, as far as I can see:
1. There's NO such defaulting for `query-replace'. Nada.
2. `query-replace-regexp' does NOT do "all of the above".
It doesn't use the active region.
It doesn't use the secondary selection.
It doesn't use a function variable does it? I mean a
variable whose value is a function that returns some
particular bunch of text at point. Something similar
to the option `search/replace-default-fn' I mentioned.
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.
This bug report was last modified 4 years and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.