[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode
From: |
Stefan Monnier |
Subject: |
bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode |
Date: |
Fri, 18 Mar 2016 12:06:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> What do you expect (file-name-directory "/davs:") to return else?
IIUC "/davs:hello.c" is parsed as a reference to a file on the host
"davs" and we nowadays signal an error in that case telling the user to
use an explicit "/ssh:davs:hello.c" instead.
At least that's how I interpret the
tramp-file-name-handler: Host name must not match method "davs"
(replace "davs" with "adb" and friends depending on your particular
case) we get in the recipe.
So, assuming this interpretation is correct, I think "/davs:" should not
be considered a valid "directory" name.
So I see two options:
- (file-name-directory "/davs:") returns "/"
- (file-name-directory "/davs:") returns "/davs:" and Tramp accepts
(file-name-all-completions "" "/davs:") without signaling an error.
> And yes, in this case no trailing slash is added. Hmm, maybe it shall
> return "/davs:./". Would this be better?
I don't know what are the tradeoffs in this regard, so I have no
preference in this regard. But what (file-name-directory "/davs:")
returns should be a directory name that file-name-all-completions can
use and to the extent that "/davs:" is the prefix of valid file names,
file-name-all-completions should not signal an error (it's acceptable if
it doesn't actually lists all those valid file names, OTOH).
Stefan
bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode, Stefan Monnier, 2016/03/16