I would like to analyze a log file in
emacs while it is growing. Is it possible to have a buffer follow a file? It is not needed that the file be editable (which raises all sort of questions): read-only mode would suffice.
- I open the logfile en emacs
- I am looking for some error in the logfile
- I realize it is not there because the buffer is not up-to-date
- I have to manually reload the buffer (
I would like to improve this workflow by letting
emacs do the reloading automagically. Maybe a periodic
revert-buffer? How to setup such periodic reloading?
auto-revert-tail-mode to do this... I have following in my
~/.emacs (just to convenience...):
(add-to-list 'auto-mode-alist '("\\.log\\'" . auto-revert-mode))