Subject: Re: bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode

From: Michael Albinus <[email-masked]>
Date: Sun, 20 Mar 2016 21:40:23 +0100

Stefan Monnier <[email-masked]> writes:

>>>>> Can you explain *your* understanding of `non-essential', then?
>>>>> What does this var mean, for you?
>>>> For Tramp, it is an indication that file name completion is in
>>>> progress.
>>> Huh?  Why would it need such a variable for that, instead of getting
>>> this info from the fact that you're replying to
>>> `file-name-all-completions' (or `file-name-completion') rather than to
>>> some other request?
>> Because these aren't the only file name operations being called. You
>> have seen it in the backtraces I've shown earlier.
>
> But in that backtrace, it's OK for Tramp to open a new connection, since
> the user hit TAB.

Tramp does not know that the user hit TAB. It checks for `non-essential'.

>>> And why would it be called `non-essential' instead of `in-completion'?
>> I wanted to introduce `completion-only'.
>
> The crucial distinction to be made is not between "performing
> completion" and "not performing completion", but between "any normal
> operation, including completion in response to TAB" and "side-operations
> like on-the-fly completion à la icomplete or company or background data
> collection (like semantic might perform)".

I don't understand. Tramp doe not know where it has been called
from. It operates stateless. `non-essential' provides some context,
that's all.

>> As I understand the codebase of Emacs 25, no other use of
>> `non-essential' has appeared since then. Six years later.
>
> It should be bound in desktop.el when reloading a desktop, but instead
> desktop.el opted to use ad-hoc file-remote-p tests, IIUC.

I do not care desktop.el just now, it is the case we were discussing 6
years ago. As of today, there is no other use case for `non-essential'
in the codebase but the Tramp case.

>         Stefan

Best regards, Michael.