From: Eli Zaretskii <eliz@gnu.org>
To: Mikael Springer <mikael.springer@protonmail.com>
Cc: 73496@debbugs.gnu.org, joaotavora@gmail.com
Subject: bug#73496: 30.0.91; Eglot (and clangd) out of sync after switching git branches in magit
Date: Sat, 19 Oct 2024 09:58:04 +0300 [thread overview]
Message-ID: <86bjzgmver.fsf@gnu.org> (raw)
In-Reply-To: <e0f90582-407d-45e5-a8a8-36dd7df57f02@protonmail.com> (message from Mikael Springer on Thu, 26 Sep 2024 11:07:43 +0000)
> Date: Thu, 26 Sep 2024 11:07:43 +0000
> From: Mikael Springer <mikael.springer@protonmail.com>
> Cc: 73496@debbugs.gnu.org
>
> You are right, I have eglot-ensure enabled for c++ts-mode.
>
> I'll try to create an emacs -Q recipe for this as soon as I can. I also
> agree and suspect that any outside file operation will work as a trigger.
Ping! Any success in creating such a recipe?
> On 2024-09-26 12:25, João Távora wrote:
> > On Thu, Sep 26, 2024 at 11:08 AM Eli Zaretskii <eliz@gnu.org> wrote:
> >>> Date: Thu, 26 Sep 2024 08:20:52 +0000
> >>> From: Mikael Springer via "Bug reports for GNU Emacs,
> >>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >>>
> >>>
> >>> 1. Visit buffer with C++ code -> Eglot starts.
> >>> 2. Listing references for a variable in Eglot works.
> >>> 3. Switch Git branch in magit.
> >>> 4. Go back to C++ buffer. Listing references for a variable using Eglot
> >>> does not work, error message in echo buffer; "jsonrpc-request:
> >>> jsonrpc-error: "request id=44 failed:", (jsonrpc-error-code . -32602),
> >>> (jsonrpc-error-message . "trying to get AST for non-added document"),
> >>> (jsonrpc-error-data)"
> >>> 5. Closing the buffer and opening it again fixes the problem, or doing
> >>> eglot-reconnect also fixes the problem, listing references is working
> >>> again.
> >>> 6. This is true for all open C++ buffers handled by Eglot before the
> >>> branch switch.
> >> CC'ing João.
> > It would be great if Mikael could make this into a Emacs -Q recipe
> > to ease investigation and rule out interference from configuration etc.
> >
> > For example this isn't true
> >
> > Visit buffer with C++ code -> Eglot starts.
> >
> > unless you use eglot-ensure in your config. And possibly Magit isn't
> > needed to trigger this, a simple Git branch change on the side will do (or
> > maybe it won't in which case Magit has to be investigated, too).
> >
> > A concrete example toy repo with, say, a single file would also
> > be useful.
> >
> > João.
>
>
next prev parent reply other threads:[~2024-10-19 6:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 8:20 bug#73496: 30.0.91; Eglot (and clangd) out of sync after switching git branches in magit Mikael Springer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-26 10:08 ` Eli Zaretskii
2024-09-26 10:25 ` João Távora
2024-09-26 11:07 ` Mikael Springer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19 6:58 ` Eli Zaretskii [this message]
2024-09-26 11:03 ` Mikael Springer via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=86bjzgmver.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73496@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
--cc=mikael.springer@protonmail.com \
/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).