GNU bug report logs -
#79757
[PATCH] eglot: eglot-rename, use symbol at point as default input
Previous Next
Reported by: zarkonesmall <at> gmail.com
Date: Sun, 2 Nov 2025 18:30:03 UTC
Severity: normal
Tags: patch
Done: João Távora <joaotavora <at> gmail.com>
To reply to this bug, email your comments to 79757 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79757; Package
emacs.
(Sun, 02 Nov 2025 18:30:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
zarkonesmall <at> gmail.com:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Sun, 02 Nov 2025 18:30:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
[Message part 2 (text/html, inline)]
[0001-eglot-eglot-rename-use-symbol-at-point-as-default-in.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79757; Package
emacs.
(Mon, 03 Nov 2025 12:03:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 79757 <at> debbugs.gnu.org (full text, mbox):
> From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
> Date: Sun, 2 Nov 2025 14:46:09 +0100
>
> From 0ec7beeb713f39e6d4fc6ac7e5482d316a51dd0e Mon Sep 17 00:00:00 2001
> From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
> Date: Sun, 2 Nov 2025 14:39:09 +0100
> Subject: [PATCH] eglot: eglot-rename, use symbol at point as default input
>
> ---
> lisp/progmodes/eglot.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> index 27e79b2f816..3039a2e2ebc 100644
> --- a/lisp/progmodes/eglot.el
> +++ b/lisp/progmodes/eglot.el
> @@ -4007,7 +4007,7 @@ edit proposed by the server."
> (eglot--format "Rename `%s' to: "
> (or (thing-at-point 'symbol t)
> "unknown symbol"))
> - nil nil nil nil
> + (thing-at-point 'symbol t) nil nil nil
> (symbol-name (symbol-at-point)))))
> (eglot-server-capable-or-lose :renameProvider)
> (eglot--apply-workspace-edit
> --
João, any comments?
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79757; Package
emacs.
(Mon, 03 Nov 2025 13:23:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 79757 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I think this looks good. Let's hope it doesn't annoy people.
I think it won't...
Just needs some micro-adjustments to these micro-nits.
In the commit message
- should start with capital 'Eglot:'. Probably should be
'Eglot: use symbol at point as default in eglot-rename'
- Needs the usual. * list/progmodes/eglot.el (eglot-rename): Tweak.
- Needs the bug number
- Needs the Copyright-paperwork-exempt: yes in case Anatolii doesn't
have an assignment.
Additionally, I think this should be called out in etc/EGLOT-NEWS.
I'll try to do these things later if noone beats me to it.
João
On Mon, Nov 3, 2025 at 12:02 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
> > Date: Sun, 2 Nov 2025 14:46:09 +0100
> >
> > From 0ec7beeb713f39e6d4fc6ac7e5482d316a51dd0e Mon Sep 17 00:00:00 2001
> > From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
> > Date: Sun, 2 Nov 2025 14:39:09 +0100
> > Subject: [PATCH] eglot: eglot-rename, use symbol at point as default
> input
> >
> > ---
> > lisp/progmodes/eglot.el | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> > index 27e79b2f816..3039a2e2ebc 100644
> > --- a/lisp/progmodes/eglot.el
> > +++ b/lisp/progmodes/eglot.el
> > @@ -4007,7 +4007,7 @@ edit proposed by the server."
> > (eglot--format "Rename `%s' to: "
> > (or (thing-at-point 'symbol t)
> > "unknown symbol"))
> > - nil nil nil nil
> > + (thing-at-point 'symbol t) nil nil nil
> > (symbol-name (symbol-at-point)))))
> > (eglot-server-capable-or-lose :renameProvider)
> > (eglot--apply-workspace-edit
> > --
>
> João, any comments?
>
--
João Távora
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79757; Package
emacs.
(Mon, 03 Nov 2025 15:03:01 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
>> Date: Sun, 2 Nov 2025 14:46:09 +0100
>>
>> From 0ec7beeb713f39e6d4fc6ac7e5482d316a51dd0e Mon Sep 17 00:00:00 2001
>> From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
>> Date: Sun, 2 Nov 2025 14:39:09 +0100
>> Subject: [PATCH] eglot: eglot-rename, use symbol at point as default input
>>
>> ---
>> lisp/progmodes/eglot.el | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
>> index 27e79b2f816..3039a2e2ebc 100644
>> --- a/lisp/progmodes/eglot.el
>> +++ b/lisp/progmodes/eglot.el
>> @@ -4007,7 +4007,7 @@ edit proposed by the server."
>> (eglot--format "Rename `%s' to: "
>> (or (thing-at-point 'symbol t)
>> "unknown symbol"))
>> - nil nil nil nil
>> + (thing-at-point 'symbol t) nil nil nil
>> (symbol-name (symbol-at-point)))))
>> (eglot-server-capable-or-lose :renameProvider)
>> (eglot--apply-workspace-edit
>> --
>
> João, any comments?
(Not João, but) this calculates the symbol at point twice, once via
(thing-at-point 'symbol t) for the initial value and once via
(symbol-name (symbol-at-point)) for the default value.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79757; Package
emacs.
(Mon, 10 Nov 2025 17:09:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 79757 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I've made some adjustments, but I think I still need some help formatting
this properly.
Also moved symbol-at-point calculation to let, addressing one the comments
(thanks!)
On Mon, Nov 3, 2025 at 2:22 PM João Távora <joaotavora <at> gmail.com> wrote:
> I think this looks good. Let's hope it doesn't annoy people.
> I think it won't...
>
> Just needs some micro-adjustments to these micro-nits.
>
> In the commit message
>
> - should start with capital 'Eglot:'. Probably should be
> 'Eglot: use symbol at point as default in eglot-rename'
>
> - Needs the usual. * list/progmodes/eglot.el (eglot-rename): Tweak.
>
> - Needs the bug number
>
> - Needs the Copyright-paperwork-exempt: yes in case Anatolii doesn't
> have an assignment.
>
> Additionally, I think this should be called out in etc/EGLOT-NEWS.
>
> I'll try to do these things later if noone beats me to it.
>
> João
>
>
>
> On Mon, Nov 3, 2025 at 12:02 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
>> > Date: Sun, 2 Nov 2025 14:46:09 +0100
>> >
>> > From 0ec7beeb713f39e6d4fc6ac7e5482d316a51dd0e Mon Sep 17 00:00:00 2001
>> > From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
>> > Date: Sun, 2 Nov 2025 14:39:09 +0100
>> > Subject: [PATCH] eglot: eglot-rename, use symbol at point as default
>> input
>> >
>> > ---
>> > lisp/progmodes/eglot.el | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
>> > index 27e79b2f816..3039a2e2ebc 100644
>> > --- a/lisp/progmodes/eglot.el
>> > +++ b/lisp/progmodes/eglot.el
>> > @@ -4007,7 +4007,7 @@ edit proposed by the server."
>> > (eglot--format "Rename `%s' to: "
>> > (or (thing-at-point 'symbol t)
>> > "unknown symbol"))
>> > - nil nil nil nil
>> > + (thing-at-point 'symbol t) nil nil nil
>> > (symbol-name (symbol-at-point)))))
>> > (eglot-server-capable-or-lose :renameProvider)
>> > (eglot--apply-workspace-edit
>> > --
>>
>> João, any comments?
>>
>
>
> --
> João Távora
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79757; Package
emacs.
(Mon, 10 Nov 2025 17:10:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 79757 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Nov 10, 2025 at 6:07 PM Anatolii Smolianinov <zarkonesmall <at> gmail.com>
wrote:
> I've made some adjustments, but I think I still need some help formatting
> this properly.
> Also moved symbol-at-point calculation to let, addressing one the comments
> (thanks!)
>
> On Mon, Nov 3, 2025 at 2:22 PM João Távora <joaotavora <at> gmail.com> wrote:
>
>> I think this looks good. Let's hope it doesn't annoy people.
>> I think it won't...
>>
>> Just needs some micro-adjustments to these micro-nits.
>>
>> In the commit message
>>
>> - should start with capital 'Eglot:'. Probably should be
>> 'Eglot: use symbol at point as default in eglot-rename'
>>
>> - Needs the usual. * list/progmodes/eglot.el (eglot-rename): Tweak.
>>
>> - Needs the bug number
>>
>> - Needs the Copyright-paperwork-exempt: yes in case Anatolii doesn't
>> have an assignment.
>>
>> Additionally, I think this should be called out in etc/EGLOT-NEWS.
>>
>> I'll try to do these things later if noone beats me to it.
>>
>> João
>>
>>
>>
>> On Mon, Nov 3, 2025 at 12:02 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>>> > From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
>>> > Date: Sun, 2 Nov 2025 14:46:09 +0100
>>> >
>>> > From 0ec7beeb713f39e6d4fc6ac7e5482d316a51dd0e Mon Sep 17 00:00:00 2001
>>> > From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
>>> > Date: Sun, 2 Nov 2025 14:39:09 +0100
>>> > Subject: [PATCH] eglot: eglot-rename, use symbol at point as default
>>> input
>>> >
>>> > ---
>>> > lisp/progmodes/eglot.el | 2 +-
>>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>>> >
>>> > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
>>> > index 27e79b2f816..3039a2e2ebc 100644
>>> > --- a/lisp/progmodes/eglot.el
>>> > +++ b/lisp/progmodes/eglot.el
>>> > @@ -4007,7 +4007,7 @@ edit proposed by the server."
>>> > (eglot--format "Rename `%s' to: "
>>> > (or (thing-at-point 'symbol t)
>>> > "unknown symbol"))
>>> > - nil nil nil nil
>>> > + (thing-at-point 'symbol t) nil nil nil
>>> > (symbol-name (symbol-at-point)))))
>>> > (eglot-server-capable-or-lose :renameProvider)
>>> > (eglot--apply-workspace-edit
>>> > --
>>>
>>> João, any comments?
>>>
>>
>>
>> --
>> João Távora
>>
>
[Message part 2 (text/html, inline)]
[0001-Eglot-use-symbol-at-point-as-default-in-eglot-rename.patch (text/x-patch, attachment)]
Reply sent
to
João Távora <joaotavora <at> gmail.com>:
You have taken responsibility.
(Tue, 18 Nov 2025 20:55:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
zarkonesmall <at> gmail.com:
bug acknowledged by developer.
(Tue, 18 Nov 2025 20:55:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 79757-done <at> debbugs.gnu.org (full text, mbox):
Anatolii Smolianinov <zarkonesmall <at> gmail.com> writes:
> From ca46a8baff45794be23f2cd8755544720539dc5f Mon Sep 17 00:00:00 2001
> From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
> Date: Sun, 2 Nov 2025 14:39:09 +0100
> Subject: bug#79757: [PATCH] Eglot: use symbol at point as default in eglot-rename
>
> * list/progmodes/eglot.el (eglot-rename): Tweak.
> Copyright-paperwork-exempt: yes
> ---
> lisp/progmodes/eglot.el | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
Thanks, Anatolii. I just pushed this. There was a micro-typo. Should
have been lisp/progmodes, not list/progmodes. The commit hooks caught
it.
Closing,
João
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79757; Package
emacs.
(Wed, 19 Nov 2025 09:51:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 79757-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
oh great! thanks for all your help João!
On Tue, Nov 18, 2025 at 9:54 PM João Távora <joaotavora <at> gmail.com> wrote:
> Anatolii Smolianinov <zarkonesmall <at> gmail.com> writes:
>
> > From ca46a8baff45794be23f2cd8755544720539dc5f Mon Sep 17 00:00:00 2001
> > From: Anatolii Smolianinov <zarkonesmall <at> gmail.com>
> > Date: Sun, 2 Nov 2025 14:39:09 +0100
> > Subject: bug#79757: [PATCH] Eglot: use symbol at point as default in
> eglot-rename
> >
> > * list/progmodes/eglot.el (eglot-rename): Tweak.
> > Copyright-paperwork-exempt: yes
> > ---
> > lisp/progmodes/eglot.el | 10 ++++------
> > 1 file changed, 4 insertions(+), 6 deletions(-)
>
> Thanks, Anatolii. I just pushed this. There was a micro-typo. Should
> have been lisp/progmodes, not list/progmodes. The commit hooks caught
> it.
>
> Closing,
> João
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79757; Package
emacs.
(Sun, 30 Nov 2025 13:49:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 79757-done <at> debbugs.gnu.org (full text, mbox):
Anatolii Smolianinov <zarkonesmall <at> gmail.com> writes:
> oh great! thanks for all your help João!
Hello Anatolii,
After some weeks of testing and some user feedback I've changed my mind
on this. Having the current name appear passed the INITIAL-VALUE to
read-from-minibuffer is a somewhat jarring backward-incompatible change.
I myself trip over it multiple times a day.
I understand that your patch may suit your personal rename needs better,
but there is no evidence the majority of symbol renames are simple
tweaks to the existing names, and even less evidence that these tweaks
happen at the end of the symbol's name. Therefore it's better to leave
the code as it was and simply rely on the standard C-n binding to bring
in the default value if needed (which is the current symbol name),
instead of forcing users accustomed to the previous behaviour remember
to press sth like M-DEL to clear the initial value.
Sorry about that!
João
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.