branch: externals/preview-auto
commit 4b403bbe2e0893a59d5d6377d952b0a9dedc65c5
Author: Paul Nelson <[email protected]>
Commit: Paul Nelson <[email protected]>

    ; Document VC revision file support in preview-auto
    
    * README.org: Add section explaining how to handle VC revision files.
---
 README.org | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/README.org b/README.org
index 04347219b2..c6738bb6b6 100644
--- a/README.org
+++ b/README.org
@@ -91,6 +91,13 @@ It also works in buffers running other major modes.  (For 
example, I use it to p
 #+end_src
 The default behavior is that in programming modes, only the comments are 
searched for latex code.  You can customize this via the defcustom 
=preview-auto-check-function=.
 
+** VC revision files (vc.el)
+When you visit a revision or version backup created by =vc.el= (e.g., via =C-x 
v ~=), Emacs uses file names like =paper.tex.~REV~=.  AUCTeX decides whether a 
buffer's file already has a TeX extension using =TeX-file-extensions=, and 
=preview-latex= (hence =preview-auto=) relies on that when computing the master 
file via =TeX-master-file=.  The default list does not match =tex.~REV~=, so 
AUCTeX treats these files as extension-less and appends =.tex=, producing wrong 
master/aux names and b [...]
+#+begin_src elisp
+(add-to-list 'TeX-file-extensions "tex\\.~[^~]+~")
+#+end_src
+=preview-auto= should then work fine in such buffers.
+
 ** tikzpicture support
 According to section B.4.5 of the =preview-latex= info manual, support for the 
tikzpicture environment can be enabled by adding the following lines to your 
document preamble:
 #+begin_src latex

Reply via email to