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.


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

  • This gives me: Symbol's function definition is void: auto-revert-remote-files. – Beginner Feb 18 '15 at 12:02
  • This flag has been introduced with Emacs 24.4, so it might be, that your Emacs version is too old. – Martin Feb 18 '15 at 15:39
  • M-x emacs-version says: GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-24 on LEG570 – Beginner Feb 18 '15 at 15:42
  • M-x customize-variable RET auto-revert-remote-files RET – politza Feb 18 '15 at 21:51
  • That's really strange, because I use the same version. Please check, if there is a file autorevert.el.gz in in your lisp folder of the emacs distribution. If you find the variable name in there, you probably don't haven't loaded it at the time you try to customize the variable. – Martin Feb 20 '15 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.