18

I've been using Tramp mode on my Emacs to edit files remotely. I'm also using ido mode. When I add a new file in the same directory of a file I opened using Tramp, I couldn't get Tramp to find the new file(with C-x C-f). Is there a way to refresh Tramp?

2 Answers 2

30

Your question is about ido-mode used with tramp. To refresh ido auto-complete while in the process of finding a file, you can press C-l, to execute: ido-reread-directory.

Sign up to request clarification or add additional context in comments.

3 Comments

Worked for me once, but not any more. No Idea why. Says: Symbol's value as variable is void: ido-cur-item. Any solutions?
@reza.safiyat that is because you need to call it within the context of opening a file or a directory. To try this, using ido-find-file go to a directory you want to refresh and hit "C-l" (within the ido buffer). It will refresh the directory you are currently looking at.
Funny: for me, I just went to directory I would like to refresh with C-f then I just press C-l and it have refreshed.
13

As documented here, you can press g in the dired buffer to run revert-buffer and refresh the directory listing.

1 Comment

g is the usual 'refresh the buffer contents' binding, and works in lots of Emacs modes.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.