Auto-refresh files when using tramp

[Origin]: http://emacs.stackexchange.com/questions/9338/auto-refresh-files-when-using-tramp

I am viewing remote log files using tramp mode in emacs. Is there a way to get tramp to auto-refresh these buffers when they change remotely? If this is not possible, is there a way to reload a buffer every time it is opened?

I have tried to set (global-auto-revert-mode t), but this does not work.


Edit: Just found out that this is intended behaviour:

You can also tell Emacs to revert buffers periodically. To do this for a specific buffer, enable the minor mode Auto-Revert mode by typing M-x auto-revert-mode. This automatically reverts the current buffer every five seconds; you can change the interval through the variable auto-revert-interval. To do the same for all file buffers, type M-x global-auto-revert-mode to enable Global Auto-Revert mode. These minor modes do not check or revert remote files, because that is usually too slow.

shareimprove this question

There is a customizable variable named auto-revert-remote-files, which does what you want.

shareimprove this answer
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s