1

I use DocView Mode to display .pdf compilations via "latex-preview-pane-mode." Recently, Emacs will ask me "file ____.pdf changed on disk. Reread from disk? (yes or no)".

Typing "yes" each time disrupts my workflow. I have tried setting auto-revert-mode for the DocView buffer, but this did not help. Is there any way to fix this, or any idea why it changed suddenly (no changes to my .emacs.d in the recent past).

Joshua Kast
  • 340
  • 1
  • 7

3 Answers3

1

To achieve what Tristan suggests, first I tried M-x customize-variable RET revert-without-query, but couldn't get very far, so I wrote this in my init.el file:

(setq revert-without-query '(".pdf"))

and I'm happily udating my pdf files from org-mode without getting queried every time. (I use pdf-tools).

Source: fourth answer to a similar question in stackoverflow

pilgix
  • 323
  • 2
  • 9
0
(defun revert-buffer-no-confirm ()
"Revert buffer without confirmation."
(interactive)
(revert-buffer :ignore-auto :noconfirm))

Source: http://www.emacswiki.org/emacs-en/download/misc-cmds.el

Maybe this function could help you out

ramsay
  • 3,197
  • 2
  • 14
  • 13
0

Take a look at the variable revert-without-query. From the Emacs Lisp documentation:

This variable holds a list of files that should be reverted without query. The value is a list of regular expressions. If the visited file name matches one of these regular expressions, and the file has changed on disk but the buffer is not modified, then ‘revert-buffer’ reverts the file without asking the user for confirmation.

Adding .+\.pdf to the list should make buffers visiting pdf files revert when you change the file on disk.

Tristan
  • 1
  • 1