From: Dmitry Gutov <dgutov@yandex.ru>
To: Juri Linkov <juri@linkov.net>
Cc: Jon Eskin <eskinjp@gmail.com>, Eli Zaretskii <eliz@gnu.org>,
emacs-devel@gnu.org
Subject: Re: [Patch] Add project.el command to replace symbol at point throughout project
Date: Wed, 2 Feb 2022 23:09:56 +0200 [thread overview]
Message-ID: <966dd6d0-0e3f-f1e4-36e7-7334ddc95e2f@yandex.ru> (raw)
In-Reply-To: <86mtj9xd1g.fsf@mail.linkov.net>
On 02.02.2022 21:51, Juri Linkov wrote:
>> On 01.02.2022 22:09, Juri Linkov wrote:
>>>>> After thinking more about this, I can't find a possible use for
>>>>> read-string-defaults-function, because every call of read-string
>>>>> provides own default value. Also using read-regexp-defaults-function
>>>>> in query-replace-read-from is not the right thing either - when
>>>>> the users already customized it for e.g. occur, it would be too
>>>>> unexpected when it will use a tag at point instead of from->to
>>>>> pairs in query-replace.
>>>>> Since query-replace is a very special command, the most uncontroversial
>>>>> thing to do for a conservative approach would be to add two specific
>>>>> variables (that later could be turned into options when needed):
>>>> Sounds reasonable, thanks.
>>>>
>>>> If you're satisfied with the change, please go ahead and install the
>>>> patches.
>>> So now patches are installed in master.
>>
>> Thanks!
>>
>> Could you try testing the new behavior in xref-find-references-and-replace?
>
> Sorry, I tested everything in the previous version of the patch,
> but then forgot that read-string is different from read-from-minibuffer.
>
>> I'm seeing this:
>>
>> - If there are no entries in history, I see the appropriate text in the
>> first prompt (featuring the tag near point), but when I press RET, the
>> next prompt which should mention the thing to replace, just has two
>> spaces in a row. And indeed, the behavior is as if it's read an empty
>> string.
>>
>> - If there are history entries, and I press RET (to use the default FROM),
>> it proceeds to do a search right away instead of prompting me for TO. And
>> it uses the from-to pair from history instead of the current input.
>
> Now everything is fixed (at least in all tested cases).
Looking good now. Thanks!
next prev parent reply other threads:[~2022-02-02 21:09 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 7:45 [Patch] Add project.el command to replace symbol at point throughout project Jon Eskin
2022-01-11 7:51 ` Manuel Uberti
2022-01-11 9:50 ` Jon Eskin
2022-01-12 3:43 ` Dmitry Gutov
2022-01-12 9:42 ` Jon Eskin
2022-01-13 1:03 ` Dmitry Gutov
2022-01-13 9:57 ` Jon Eskin
2022-01-14 2:39 ` Dmitry Gutov
2022-01-11 13:10 ` Eli Zaretskii
2022-01-11 15:15 ` Daniel Martín
2022-01-11 17:17 ` Eli Zaretskii
2022-01-12 3:46 ` Dmitry Gutov
2022-01-12 12:45 ` Eli Zaretskii
2022-01-13 1:19 ` Dmitry Gutov
2022-01-13 8:25 ` Eli Zaretskii
2022-01-14 2:43 ` Dmitry Gutov
2022-01-14 7:46 ` Eli Zaretskii
2022-01-14 10:26 ` Jon Eskin
2022-01-14 20:28 ` Dmitry Gutov
2022-01-15 9:55 ` Jon Eskin
2022-01-15 18:30 ` Juri Linkov
2022-01-16 3:02 ` Dmitry Gutov
2022-01-16 17:58 ` Juri Linkov
2022-01-17 0:19 ` Dmitry Gutov
2022-01-17 1:15 ` Dmitry Gutov
2022-01-17 8:17 ` Juri Linkov
2022-01-21 3:06 ` Dmitry Gutov
2022-01-31 18:25 ` Juri Linkov
2022-02-01 2:10 ` Dmitry Gutov
2022-02-01 20:09 ` Juri Linkov
2022-02-01 22:07 ` Dmitry Gutov
2022-02-02 19:51 ` Juri Linkov
2022-02-02 21:09 ` Dmitry Gutov [this message]
2022-01-15 18:41 ` Jon Eskin
2022-01-16 17:55 ` Juri Linkov
2022-01-17 1:41 ` Dmitry Gutov
2022-01-17 6:36 ` Jon Eskin
2022-01-12 3:42 ` Dmitry Gutov
2022-01-12 8:03 ` Jon Eskin
2022-01-12 19:43 ` Dmitry Gutov
2022-01-12 19:56 ` Juri Linkov
2022-01-12 22:12 ` Dmitry Gutov
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=966dd6d0-0e3f-f1e4-36e7-7334ddc95e2f@yandex.ru \
--to=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=eskinjp@gmail.com \
--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).