Subject: bug#61350: Eglot over Tramp freezes with large project

From: Michael Albinus <[email-masked]>
Date: Mon, 27 Feb 2023 21:10:14 +0100

João Távora <[email-masked]> writes:

Hi João,

>>> So maybe one should disable it by default.
>>
>> No, not by default. It improves performance.
>
> So would you buy a very fast car that only explodes 10% of the time :-)
> I think that these kinds of features should be opt-in, at least until
> one is more sure of their stability.  Here, this looks like an unstable
> feature.

It is stable. Except in the case of large amount of data, which is
exceptional for Tramp usage.

> I had read the docstrings.  Neither the docstrings nor this manual entry
> unequivocally states how to _guarante_ the SSH "controlmaster" are _not_
> used for TRAMP.  It is something like this?
>
>   (setq tramp-use-ssh-controlmaster-options t
>         tramp-ssh-controlmaster-options "")
>
> I understand you appreciate this feature and it has advantages
> elsewhere.  But I we can recognize that, as things stand, it is a
> non-essential performance optimization that wrecks Eglot functionally.

It is essential. I have been beaten by many Tramp users to support it.

> Until the problem is fixed, it's important for Eglot users to know how
> to turn it off guaranteedly, at least for the duration Eglot sesssions.
>
> This will helps us clear a big slice of doubt/uncertainty in all the
> Eglot TRAMP-related bugs (of which there are many).

Yes. I believe we must extend the meaning of
tramp-use-ssh-controlmaster-options. `t' shall mean that Tramp shall
apply its own settings. `nil' shall mean Tramp doesn't do anything, and
settings in ~/.ssh/config shall apply. And a new value, say `suppress',
shall suppress this feature even if enabled in ~/.ssh/config.

I'll try to implement something along this line.

> João

Best regards, Michael.