[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] trunk r113958: * minibuffer.el (completion--sifn-requo

From: Michael Albinus
Subject: Re: [Emacs-diffs] trunk r113958: * minibuffer.el (completion--sifn-requote): Bind `non-essential'.
Date: Thu, 22 Aug 2013 20:40:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Hmm. Why not signalling a pilot error, when a user applies "C-x
>> f /sudo: RET"?  It's not so different from the case the user has
>> described in Bug#13900, which was the trigger to introduce the rule
>> "host name != any method name".
> Then how about a different take on the problem: Tramp shouldn't signal
> an "ambiguous file name" error when its behavior would be the same
> either way.  AFAIK substitute-in-file-name would return the same result
> regardless of whether "/ssh:address@hidden" is taken to be the file
> "address@hidden" in host "ssh" or access via ssh to host
> "192.168.10.".

Well, I could try to implement it in Tramp's `substitute-in-file-name'
handler. However, I don't know which other functions with file name
handlers are called when applying `minibuffer--complete-and-exit'. Let's
see. (But it would be a just a hack)

>> And it is bound to t only in icomplete.el, ido.el and rfn-eshadow.el, as
>> yet. For exactly that reason: "please relax your tests and connection
>> actions when performing file name completion or minibuffer decoration".
> The key word is "decoration" and not "completion".  The present case is
> about completion and not about decoration.
>> That doesn't sound ugly to me.
> It's called `non-essential' and not `tramp-inhibit' specifically because
> I don't want icomplete.el and friends to have Tramp-specific hacks
> in them.  If you start abusing it on the premise that "that's how I use
> it in Tramp", then it defeats the whole purpose.

I don't want to spread trampish functionality somewhere else. But Tramp
is broken by design: its syntax is ambigous, and sometimes Tramp cannot
decide merely on the file name syntax whether this is the intended file
name to be used on the wire.

That's why it needs advice from the caller: "don't take this file name
serious, I'm not interested in a working connection yet". That does not
mean that Tramp wouldn't use an established connection if it exists
already, it simply means that Tramp doesn't open a new connection if
there isn't one.

Minibuffer decoration is such a case where Tramp needs such an advice,
and file name completion is another case. An incomplete file name does
not need a working connection. Consequently, some predicates used in
file name completion (like `file-exists-p') will give proper results
only when the connection is established finally. But that might be

`non-essential' bound to t looks to me perfect for such an advice. If
you believe it is an abuse of that variable, please give me a hint how
Tramp could get such an advice otherwise.

It is not "that's how I use it in Tramp". Since I hack for Tramp (11
years these days) this problem eats a serious amount of my maintenance
time. I would be more than happy if it could be solved finally,
somehow. Due to the misdesigned Tramp file name syntax, I don't see how
to solve it inside Tramp.

>         Stefan

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]