12

Is there a way Emacs can automatically refresh the buffer showing the dvi right after my LaTeX compilation? Thank you.

Dervin Thunk
  • 19,515
  • 28
  • 127
  • 217

2 Answers2

22

The global auto revert is not always desirable, in fact I only use it for for the DocView to see the new output of pdflatex.

The following will allow auto revert for the DocView major mode

(add-hook 'doc-view-mode-hook 'auto-revert-mode)
Jesper.Reenberg
  • 5,944
  • 23
  • 31
  • 6
    +1, this automation is exactly what I wanted and makes sense for read-only doc-view mode buffers, but would be potentially dangerous for other buffers. – Flexo May 18 '11 at 13:35
21

Use interactive function:

auto-revert-mode

to enable reloading when the file changes.

Jürgen Hötzel
  • 18,997
  • 3
  • 42
  • 58