Emacs: cannot turn on auto-revert-mode by default

1

There's this emacs minor-mode called "auto-revert-mode" which automatically reverts the file buffer every 5 seconds.

In my .emacs file I just have the line (auto-revert-mode 1) and nothing else, but whenever I start an emacs session I still have to turn it on manually.

What's going on here? How come I can't turn auto-revert-mode at startup?

Eddy

Posted 2011-08-16T10:48:01.967

Reputation: 2 897

Answers

2

From the function's documentation:

This is a minor mode that affects only the current buffer.
Use `global-auto-revert-mode' to automatically revert all buffers.
Use `auto-revert-tail-mode' if you know that the file will only grow
without being changed in the part that is already in the buffer.

So you should use global-auto-revert-mode for your purpose.

Juancho

Posted 2011-08-16T10:48:01.967

Reputation: 2 187