GNU bug report logs - #61478
28.2; eglot keeps sending `didSave` notifications despite the active server not supporting `textDocumentSync`

Previous Next

Package: emacs;

Reported by: ~kby <kby <at> tilde.team>

Date: Mon, 13 Feb 2023 14:54:02 UTC

Severity: normal

Found in version 28.2

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61478 in the body.
You can then email your comments to 61478 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Mon, 13 Feb 2023 14:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ~kby <kby <at> tilde.team>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 13 Feb 2023 14:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ~kby <kby <at> tilde.team>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; eglot keeps sending `didSave` notifications despite the active
 server not supporting `textDocumentSync`
Date: Mon, 13 Feb 2023 15:52:47 +0100
[Message part 1 (text/plain, inline)]
I've come across this bug whilst using the Dart language server, which 
is included in the Dart SDK.

Steps to reproduce bug:

- Create example Dart project using Flutter: `flutter create hello_world`

- Open `hello_world/lib/main.dart` in Emacs

- Start eglot with `M-x eglot RET`

- Make a rudimentary change in the file; ex. add a line break

- Save with `C-x C-s`

- Following text appears in the minibuffer area: `[eglot] Server reports 
(type=1): Unknown method textDocument/didSave`

Related bug reports (on GitHub): 
https://github.com/dart-lang/sdk/issues/36464 and 
https://github.com/microsoft/language-server-protocol/issues/288

I am using eglot 1.11 (from ELPA) with Emacs 28.2 on Arch.

Thanks in advance.

||
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Mon, 13 Feb 2023 18:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: Felician Nemeth <felician.nemeth <at> gmail.com>
To: 61478 <at> debbugs.gnu.org
Cc: ~kby <kby <at> tilde.team>,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Mon, 13 Feb 2023 19:30:48 +0100
> - Following text appears in the minibuffer area: `[eglot] Server
>   reports (type=1): Unknown method textDocument/didSave`

Without actually looking into the details, this feels similar to an
earlier issue, which I unfortunately closed:
https://github.com/joaotavora/eglot/issues/360

The commit referenced in #360 only fixed the willSave part.  I guess the
solution to this bug report should be probably similar to that fix:
Eglot should check (eglot--server-capable :textDocumentSync :save)
before sending a textDocument/didSave.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Mon, 13 Feb 2023 18:46:02 GMT) Full text and rfc822 format available.

Message #11 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Felician Nemeth <felician.nemeth <at> gmail.com>
Cc: ~kby <kby <at> tilde.team>, 61478 <at> debbugs.gnu.org
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Mon, 13 Feb 2023 18:44:47 +0000
[Message part 1 (text/plain, inline)]
Yep, Felician, that is exactly it. Should be a straightforward patch. I'll
do it, if noone beats me to it.

João

On Mon, Feb 13, 2023, 18:30 Felician Nemeth <felician.nemeth <at> gmail.com>
wrote:

> > - Following text appears in the minibuffer area: `[eglot] Server
> >   reports (type=1): Unknown method textDocument/didSave`
>
> Without actually looking into the details, this feels similar to an
> earlier issue, which I unfortunately closed:
> https://github.com/joaotavora/eglot/issues/360
>
> The commit referenced in #360 only fixed the willSave part.  I guess the
> solution to this bug report should be probably similar to that fix:
> Eglot should check (eglot--server-capable :textDocumentSync :save)
> before sending a textDocument/didSave.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Mon, 13 Feb 2023 23:49:02 GMT) Full text and rfc822 format available.

Message #14 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: ~kby <kby <at> tilde.team>
Cc: eliz <at> gnu.org, Felician Nemeth <felician.nemeth <at> gmail.com>,
 61478 <at> debbugs.gnu.org
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Mon, 13 Feb 2023 23:50:25 +0000
~kby <kby <at> tilde.team> writes:

> This should suffice, no?

Yes, that should be the correct patch.  

Eli, this is a one-line/trivial change.  Do we need (rather than prefer)
copyright assignment for this one to go in and close the bug?

João





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Tue, 14 Feb 2023 08:17:01 GMT) Full text and rfc822 format available.

Message #17 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: ~kby <kby <at> tilde.team>
To: João Távora <joaotavora <at> gmail.com>,
 Felician Nemeth <felician.nemeth <at> gmail.com>
Cc: 61478 <at> debbugs.gnu.org
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Mon, 13 Feb 2023 20:00:37 +0100
[Message part 1 (text/plain, inline)]
This should suffice, no?

On 13.02.23 19:44, João Távora wrote:
> Yep, Felician, that is exactly it. Should be a straightforward patch. 
> I'll do it, if noone beats me to it.
>
> João
>
> On Mon, Feb 13, 2023, 18:30 Felician Nemeth 
> <felician.nemeth <at> gmail.com> wrote:
>
>     > - Following text appears in the minibuffer area: `[eglot] Server
>     >   reports (type=1): Unknown method textDocument/didSave`
>
>     Without actually looking into the details, this feels similar to an
>     earlier issue, which I unfortunately closed:
>     https://github.com/joaotavora/eglot/issues/360
>
>     The commit referenced in #360 only fixed the willSave part.  I
>     guess the
>     solution to this bug report should be probably similar to that fix:
>     Eglot should check (eglot--server-capable :textDocumentSync :save)
>     before sending a textDocument/didSave.
>
[Message part 2 (text/html, inline)]
[didSave.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Tue, 14 Feb 2023 12:03:02 GMT) Full text and rfc822 format available.

Message #20 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: felician.nemeth <at> gmail.com, kby <at> tilde.team, 61478 <at> debbugs.gnu.org
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Tue, 14 Feb 2023 14:01:27 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Cc: Felician Nemeth <felician.nemeth <at> gmail.com>,  61478 <at> debbugs.gnu.org,
>   eliz <at> gnu.org
> Date: Mon, 13 Feb 2023 23:50:25 +0000
> 
> ~kby <kby <at> tilde.team> writes:
> 
> > This should suffice, no?
> 
> Yes, that should be the correct patch.  
> 
> Eli, this is a one-line/trivial change.  Do we need (rather than prefer)
> copyright assignment for this one to go in and close the bug?

ENOPATCH

Probably no need for copyright assignment, but I need to see the
changes.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Tue, 14 Feb 2023 12:58:02 GMT) Full text and rfc822 format available.

Message #23 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Felician Nemeth <felician.nemeth <at> gmail.com>, kby <at> tilde.team,
 61478 <at> debbugs.gnu.org
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Tue, 14 Feb 2023 12:57:35 +0000
[Message part 1 (text/plain, inline)]
On Tue, Feb 14, 2023, 12:02 Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: João Távora <joaotavora <at> gmail.com>
> > Cc: Felician Nemeth <felician.nemeth <at> gmail.com>,  61478 <at> debbugs.gnu.org,
> >   eliz <at> gnu.org
> > Date: Mon, 13 Feb 2023 23:50:25 +0000
> >
> > ~kby <kby <at> tilde.team> writes:
> >
> > > This should suffice, no?
> >
> > Yes, that should be the correct patch.
> >
> > Eli, this is a one-line/trivial change.  Do we need (rather than prefer)
> > copyright assignment for this one to go in and close the bug?
>
> ENOPATCH
>
> Probably no need for copyright assignment, but I need to see the
> changes.
>

I don't understand, i see a didSave.patch file attached to to kby's mail to
this bug. That's the (trivial) patch I'm referring to. Can't you see it,
Eli?

João

>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Tue, 14 Feb 2023 14:01:02 GMT) Full text and rfc822 format available.

Message #26 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: felician.nemeth <at> gmail.com, kby <at> tilde.team, 61478 <at> debbugs.gnu.org
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Tue, 14 Feb 2023 15:59:50 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Date: Tue, 14 Feb 2023 12:57:35 +0000
> Cc: kby <at> tilde.team, Felician Nemeth <felician.nemeth <at> gmail.com>, 61478 <at> debbugs.gnu.org
> 
>  ENOPATCH
> 
>  Probably no need for copyright assignment, but I need to see the
>  changes.
> 
> I don't understand, i see a didSave.patch file attached to to kby's mail to this bug. That's the (trivial) patch I'm
> referring to. Can't you see it, Eli?

You mean, the one here:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61478#17

?  I received this message after receiving and answering yours.

If that is the patch, it is OK, but please remember a proper commit
log message, which mentions the bug number and includes the
Copyright-paperwork-exempt thingy.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Tue, 14 Feb 2023 14:11:02 GMT) Full text and rfc822 format available.

Message #29 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: felician.nemeth <at> gmail.com, kby <at> tilde.team, 61478 <at> debbugs.gnu.org
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Tue, 14 Feb 2023 14:12:23 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: João Távora <joaotavora <at> gmail.com>
>> Date: Tue, 14 Feb 2023 12:57:35 +0000
>> Cc: kby <at> tilde.team, Felician Nemeth <felician.nemeth <at> gmail.com>, 61478 <at> debbugs.gnu.org
>> 
>>  ENOPATCH
>> 
>>  Probably no need for copyright assignment, but I need to see the
>>  changes.
>> 
>> I don't understand, i see a didSave.patch file attached to to kby's mail to this bug. That's the (trivial) patch I'm
>> referring to. Can't you see it, Eli?
>
> You mean, the one here:
>
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61478#17
>
> ?  I received this message after receiving and answering yours.

Odd, as the one you got earlier was a reply to the one you got later. An
EOUTOFORDER somewhere (probably due to moderation?)

> If that is the patch, it is OK, but please remember a proper commit
> log message, which mentions the bug number and includes the
> Copyright-paperwork-exempt thingy.

Yep, I'll provide that.  It's 'Copyright-paperwork-exempt: Yes' in its
own line, I think.

Regarding the "kby <kby <at> tilde.team>" author.  Kby is there any better
name?  Eli, are these obscure names OK as well?

João




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61478; Package emacs. (Tue, 14 Feb 2023 14:41:02 GMT) Full text and rfc822 format available.

Message #32 received at 61478 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: felician.nemeth <at> gmail.com, kby <at> tilde.team, 61478 <at> debbugs.gnu.org
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Tue, 14 Feb 2023 16:40:09 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Cc: kby <at> tilde.team,  felician.nemeth <at> gmail.com,  61478 <at> debbugs.gnu.org
> Date: Tue, 14 Feb 2023 14:12:23 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > You mean, the one here:
> >
> >   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61478#17
> >
> > ?  I received this message after receiving and answering yours.
> 
> Odd, as the one you got earlier was a reply to the one you got later. An
> EOUTOFORDER somewhere (probably due to moderation?)

Order of mail delivery is not guaranteed in general.

> Regarding the "kby <kby <at> tilde.team>" author.  Kby is there any better
> name?  Eli, are these obscure names OK as well?

If the authors don't want to provide a longer name, we are fine with
how they call themselves.




Reply sent to João Távora <joaotavora <at> gmail.com>:
You have taken responsibility. (Tue, 14 Feb 2023 23:33:02 GMT) Full text and rfc822 format available.

Notification sent to ~kby <kby <at> tilde.team>:
bug acknowledged by developer. (Tue, 14 Feb 2023 23:33:02 GMT) Full text and rfc822 format available.

Message #37 received at 61478-done <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61478-done <at> debbugs.gnu.org, felician.nemeth <at> gmail.com, kby <at> tilde.team
Subject: Re: bug#61478: 28.2; eglot keeps sending `didSave` notifications
 despite the active server not supporting `textDocumentSync`
Date: Tue, 14 Feb 2023 23:34:07 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: João Távora <joaotavora <at> gmail.com>
>> Date: Tue, 14 Feb 2023 12:57:35 +0000
>> Cc: kby <at> tilde.team, Felician Nemeth <felician.nemeth <at> gmail.com>, 61478 <at> debbugs.gnu.org
>> 
>>  ENOPATCH
>> 
>>  Probably no need for copyright assignment, but I need to see the
>>  changes.
>> 
>> I don't understand, i see a didSave.patch file attached to to kby's mail to this bug. That's the (trivial) patch I'm
>> referring to. Can't you see it, Eli?
>
> You mean, the one here:
>
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61478#17
>
> ?  I received this message after receiving and answering yours.
>
> If that is the patch, it is OK, but please remember a proper commit
> log message, which mentions the bug number and includes the
> Copyright-paperwork-exempt thingy.

I just committed this patch as agreed, to emacs-29.  Closing.

João





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 15 Mar 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.