-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ivy TRAMP navigation from arbitrary directory #283
Comments
Thanks for noticing, the behavior broke 2 weeks ago. You can get into TRAMP from any directory with |
Aha, I'm starting to see what it is doing. The additional slash in ivy is required to indicate a TRAMP path. Your solution does work from any directory. This works for me, but there's possibly two things that might make it better:
Backspacing to the root directory |
They are listed by Emacs itself, I don't want to interfere. The problem is that Ivy doesn't have proper handlers for every item of // yet. They can be added in the future, eventually. |
* ivy.el (ivy-alt-done): `file-directory-p' errors when given "/ssh:" or "/sudo::". Re #283
* ivy.el (ivy-alt-done): Update. Re #283
Hmm.. I'm not seeing why those two cases should be treated differently though. ivy should pass the same value in both cases. Bad (from /etc): I looked through the code and this might be incorrect. Based on the next expression, it looks like (and
(not (equal ivy-text ""))
(file-directory-p ivy-text)
(ignore-errors
(file-directory-p ivy-text))
(setq dir (expand-file-name
ivy-text ivy--directory))) And what is actually wanted is: (and
(not (equal ivy-text ""))
(file-directory-p
(setq dir (expand-file-name
ivy-text ivy--directory)))) Otherwise file-directory-p is just based on the CWD and Not sure if I've misevaluated or if it causes other bugs, since I'm not very familiar with the codebase, but basic testing seems to work for both the above cases. |
You're using the compatibility bindings here, left just in case the recommended method breaks. The recommended method is
What I meant by // not working is e.g. C-x C-f // In any case, if there's something still missing in your opinion, send a PR, it's easier to look at the code. |
Not sure if that's a mistyping, but I don't mean sudo::/ in the /etc directory. I mean accessing the qualified "/sudo::/" while the current working directory is /etc. It happens that you can construct this path quickly with
This does work at the moment, but your current working directory has to be Went ahead and submitted a PR with the proposed change. |
Hi all. I'm was basically asking about the following: C-x C-f From any other directory, it works as expected. |
@PythonNut If I understood correctly, what you want to do is not to open a What you need to type is C-x C-f |
Hey, submitted a PR (#285) with better TRAMP support for
That should be fixed in 6666cf8 above. The problem was that it was checking the directory relative to the CWD, instead of what you had in the minibuffer. This was causing it to fail a conditional and go to the catch-all I can perform your key sequence and get the correct result with the version in MELPA. Does your sequence now work as expected for you? |
When using
find-file
orcounsel-find-file
to navigate through TRAMP-supported protocols, ivy doesn't seem to bring up any completion matches for filesystem navigation, unless I start at/
on my local machine.To reproduce (with
/etc
as current working directory):C-x C-f
<backspace>
sudo::/
<tab>
Additionally (any other directory than
/
as cwd):C-x C-f
//sudo::/
<tab>
The above displays no matches. An additional
<tab>
will result in navigation to the dired buffer for/
(asroot@machine
).C-j
andC-m
do the same.The following works (with
/
as the current working directory):C-x C-f
sudo::/
<tab>
I see issue #241, which seems to be similar, but I don't see a solution that works for me there. I do get completion by using the single
/
or three slash prefix///
mentioned there, but it comes up in a separate Completions buffer instead of through ivy for some reason.The text was updated successfully, but these errors were encountered: