I am using emacs+skim to preview latex on macs, and I use auctex preview-latex from time to time. the problem is, after I run C-c C-p C-d in emacs to preview entire document, the pdf file is now deleted, and skim show a bunch of formulas (as Sumatra does on Windows). Then I recompile and run C-c C-v to see file in skim, but skill still shows a bunch of formulas in separate pages. While in Sumatra, it shows immediately the newly compiled pdf file, despite that it was deleted a while ago due to preivew-latex. Is there a way to fix this on mac?
p.s.
This seems only to happen when the entire document is previewed in emacs, for example, C-c C-p C-e does not cause this problem.
At first skim ask permission to revert for every newly generated pdf file, but the "secret preference" mentioned in the post resolves the issue.
Syncmenu), which probably gives you the yes / no option, and that is why you (like all of us) have Googled the hidden option:defaults write -app Skim SKAutoReloadFileUpdate -boolean trueIt sounds like you need to program in a close the current window on Skim, however, I haven't researched the Applescript equivalent (just close the entire program). I'll add to my todo-list a close window Applescript if no one resolves this for you. – lawlist Jun 26 '14 at 03:23(defun test () (interactive) (let ((script (concat "set myWindowTitle to \"envelope.pdf\"\n" "tell application \"System Events\"\n" "tell application \"Skim\" to close (every window whose name contains myWindowTitle)\n" "end tell\n" ))) (start-process "osascript-getinfo" nil "osascript" "-e" script)))Of course, we'll substitute envelope.pdf for the real one. – lawlist Jun 26 '14 at 05:47close-skim-windowapplescript into a non-AUCTeX solution in theelispfunctionlatexmkin the following link: http://tex.stackexchange.com/a/156617/26911 The original poster could (in theory) use that type of mechanism to close the window of the improperly displayed *.pdf so that a new window gets generated during the compilation process. If someone would like to turn that into an AUCTeX solution for the original poster, please feel free to use my idea. – lawlist Jun 26 '14 at 16:40(defun revert-pdf () (interactive) (let ((script (concat "tell application \"Skim\"\n" "activate\n" "tell application \"System Events\" to tell process \"Skim\"\n" "click (menu item 1 where its name starts with \"Revert\") of menu 1 of menu bar item \"File\" of menu bar 1\n" "end tell\n" "end tell"))) (start-process "osascript-getinfo" nil "osascript" "-e" script)))– lawlist Jun 27 '14 at 15:40