Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing a continuous "revert-buffer" aka Textpad

Tags:

emacs

elisp

One of my colleagues uses TextPad, and one feature I found really useful is the Auto-Reload. (The feature has been described in this SO quesion: Alternative to TextPad's Prompt to Reload File). Basically, it keeps reloading the file without any prompt from the user, which is really helpful when monitoring log files that are updated in real-time. Is there something similar available for Emacs? If not, can anyone whip up the required elisp magic?

like image 623
vedang Avatar asked Mar 24 '10 06:03

vedang


1 Answers

M-x auto-revert-mode

I should add that for log tails, there is the more specific auto-revert-tail-mode, and that if you like it as a general feature (my case), you can turn on global-auto-revert-mode, to revert all buffers. Beware of remote files in that case.

like image 104
Bahbar Avatar answered Oct 09 '22 02:10

Bahbar