[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: Stefan Monnier
Subject: Re: [Emacs-diffs] trunk r113958: * minibuffer.el (completion--sifn-requote): Bind `non-essential'.
Date: Thu, 22 Aug 2013 11:39:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> So we're in the middle of minibuffer--complete-and-exit which calls
>> try-completion.  That's very definitely not "non-essential".
> Not `minibuffer--complete-and-exit'.  But the completion functions I
> would call non-essential.

Huh?  You did notice that the command's name has "-complete-" in it, right?

> As said, I don't know too much about completion code in minibuffer.el
> (and the functions' docstrings don't help much).  Maybe
> `completion--sifn-requote' is not suited to bind `non-essential'. But
> there are other `completion--*' functions in the backtrace, up to
> `minibuffer--complete-and-exit'.

They're all just computing the completion.

>> Yes, it could be a "complete but ambiguous/erroneous" file name, but it
>> could also be a "not yet complete file name".  So maybe, if there's no
>> ":" nor "/" after "/ssh:", we should refrain from signaling an error.
> 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

> I don't know which further plans you have with `non-essential'.  But its
> setting to t is acknowledged so far only in ange-ftp and Tramp.

So far.

> 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.


reply via email to

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