GNU bug report logs - #60570
29.0.60; Eglot+pyright freeze Emacs when edit a single file in Home director

Previous Next

Package: emacs;

Reported by: Eason Huang <aqua0210 <at> foxmail.com>

Date: Thu, 5 Jan 2023 08:59:02 UTC

Severity: normal

Found in version 29.0.60

Full log


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

From: Yuan Fu <casouri <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eason Huang <aqua0210 <at> foxmail.com>, 60570 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#60570: 29.0.60; Eglot+pyright freeze Emacs when edit a single
 file in Home director
Date: Sat, 7 Jan 2023 14:38:54 -0800

> On Jan 6, 2023, at 2:29 AM, João Távora <joaotavora <at> gmail.com> wrote:
> 
> On Fri, Jan 6, 2023, 06:17 Yuan Fu <casouri <at> gmail.com> wrote:
> 
> > I use a custom function eglot-soft-ensure which only enables eglot if
> > there is already a LSP server running for the current project. This way
> > eglot doesn’t auto-start in which files that I don’t want it to start.
> >
> > (defun eglot-soft-ensure ()
> >   "Turn on eglot when there is an exising server for the current project."
> >   (require 'eglot)
> >   (when-let* ((project (project-current))
> >               (eglot-server (gethash project eglot--servers-by-project)))
> >     (eglot-ensure)))
> 
> Hello Yuan,
> 
> I must me missing something, because I would say you can just 
> get rid of eglot-soft-ensure. I can't understand what it is adding 
> on top of the normal Eglot behaviour. From the manual:
> 
> "When you visit a file under the same project, whether an existing or a 
> new file, its buffer is automatically added to the set of buffers managed by
> Eglot, and the server which supports the buffer’s major-mode is notified 
> about that. Thus, visiting a non-existent file /home/joe/projects/fooey/lib/y.foo 
> in the above example will notify the server of the *.foo files’ language 
> that a new file was added to the project, even before the file appears 
> on disk. The special Eglot minor mode is also turned on automatically 
> in the buffer visiting the file."
> 
> https://joaotavora.github.io/eglot/#Eglot-and-Buffers

Oh! I must have done something wrong that prompted me to write eglot-soft-ensure. But I don’t remember :-) Sorry for the misinformation!

Yuan



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

Previous Next


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