Refresh remote directory in Emacs Tramp Mode
Asked Answered
B

2

17

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?

Benzine answered 21/11, 2012 at 10:25 Comment(0)
O
13

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

Ogletree answered 21/11, 2012 at 10:41 Comment(1)
g is the usual 'refresh the buffer contents' binding, and works in lots of Emacs modes.Copartner
S
29

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.

Sym answered 30/9, 2014 at 18:27 Comment(3)
Worked for me once, but not any more. No Idea why. Says: Symbol's value as variable is void: ido-cur-item. Any solutions?Manganous
@Manganous 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.Chronogram
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.Ordinance
O
13

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

Ogletree answered 21/11, 2012 at 10:41 Comment(1)
g is the usual 'refresh the buffer contents' binding, and works in lots of Emacs modes.Copartner

© 2022 - 2024 — McMap. All rights reserved.