emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] org-export-as-pdf > Deleting the pdf file


From: Francesco Pizzolante
Subject: [Orgmode] org-export-as-pdf > Deleting the pdf file
Date: Mon, 23 Nov 2009 15:14:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi,

When working with LaTeX files (and now with org files as well), we are used to
open the resulting PDF files with "Sumatra PDF" viewer. It is very handy because
it does not lock the file (like Adobe Reader) and thus enables us to recompile
it while it is still open. It is then refreshed automatically at the end of
the compilation.

While using the "org-export-as-pdf" function, we are not able to get the same
behavior as the function deletes the pdf file before the compilation. The
deletion fails because the pdf file is opened in the viewer.

Would it be possible to avoid deleting the pdf file before compilation?

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 5aa6409..6e1356d 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -698,7 +698,6 @@ when PUB-DIR is set, use this as the publishing directory."
                       (re-search-forward "\\\\bibliography{" nil t))))
         cmd)
     (with-current-buffer outbuf (erase-buffer))
-    (and (file-exists-p pdffile) (delete-file pdffile))
     (message "Processing LaTeX file...")
     (if (and cmds (symbolp cmds))
        (funcall cmds file)
--8<---------------cut here---------------end--------------->8---

Thanks,
Francesco




reply via email to

[Prev in Thread] Current Thread [Next in Thread]