unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>
Cc: 41692@debbugs.gnu.org
Subject: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default
Date: Wed, 3 Jun 2020 16:22:52 -0700 (PDT)	[thread overview]
Message-ID: <ba336808-1c07-4604-a5ec-3a39272f4fdc@default> (raw)
In-Reply-To: <87a71jwyiw.fsf@mail.linkov.net>

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





  reply	other threads:[~2020-06-03 23:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 18:35 bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default Drew Adams
2020-06-03 22:54 ` Juri Linkov
2020-06-03 23:22   ` Drew Adams [this message]
2020-06-04 22:05     ` Juri Linkov
2020-06-04 23:01       ` Drew Adams
2020-06-11 22:58         ` Juri Linkov
2020-06-12  0:34           ` Drew Adams
2020-06-12  0:46             ` Drew Adams
2021-01-27 18:33               ` Juri Linkov
2021-01-27 18:55                 ` bug#41692: [External] : " Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba336808-1c07-4604-a5ec-3a39272f4fdc@default \
    --to=drew.adams@oracle.com \
    --cc=41692@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).