GNU bug report logs - #61350
Eglot over Tramp freezes with large project

Previous Next

Package: emacs;

Reported by: Thomas Koch <thomas <at> koch.ro>

Date: Tue, 7 Feb 2023 18:49:02 UTC

Severity: normal

Full log


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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: João Távora <joaotavora <at> gmail.com>
Cc: Thomas Koch <thomas <at> koch.ro>, 61350 <at> debbugs.gnu.org
Subject: Re: bug#61350: Eglot over Tramp freezes with large project
Date: Tue, 28 Feb 2023 16:01:43 +0100
João Távora <joaotavora <at> gmail.com> writes:

Hi João,

> Looking at the Tramp code, I think Thomas's idea of using
>
>   -o "ControlMaster=no" -o "ControlPath=none"
>
> would probably be quite effective.  It would work with previous
> Tramp versions that Eglot users might be using.

Yes, that I have also in mind.

> Thomas, can you try this patch?
>
> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> index e20d209332d..83462633dd9 100644
> --- a/lisp/progmodes/eglot.el
> +++ b/lisp/progmodes/eglot.el
> @@ -130,6 +130,8 @@
>  (defvar markdown-fontify-code-blocks-natively)
>  (defvar company-backends)
>  (defvar company-tooltip-align-annotations)
> +(defvar tramp-ssh-controlmaster-options)
> +(defvar tramp-use-ssh-controlmaster-options)
>
>
>
> @@ -1247,7 +1249,15 @@ eglot--connect
>                          (contact (cl-subseq contact 0 probe)))
>                     `(:process
>                       ,(lambda ()
> -                        (let ((default-directory default-directory))
> +                        (let ((default-directory default-directory)
> +                              ;; bug#61350: Tramp turns a feature on
> +                              ;; by default that can't (yet) handle
> +                              ;; very much data so we turn it off
> +                              ;; unconditionally -- just for our
> +                              ;; process.
> +                              (tramp-use-ssh-controlmaster-options t)
> +                              (tramp-ssh-controlmaster-options
> +                               "-o ControlMaster=no -o ControlPath=none"))
>                            (make-process
>                             :name readable-name
>                             :command (setq server-info (eglot--cmd contact))

Even better than my proposal :-)

There is the small risk that a user runs a local ssh client which is
not aware of the ControlMaster option. For such a user, Eglot on a
remote host might fail.

Tramp is busy to check, whether ControlMaster could be applied.

OTOH, I don't know if such ssh clients are still used in the wild, at
least by Eglot users.

Best regards, Michael.




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

Previous Next


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