From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-export-as-pdf > Deleting the pdf file Date: Mon, 23 Nov 2009 15:38:10 +0100 Message-ID: <98293640-3AE2-4044-B4D4-7938F1C68B62@gmail.com> References: <877hthz5tg.fsf@missioncriticalit.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCa3Y-00016c-06 for emacs-orgmode@gnu.org; Mon, 23 Nov 2009 09:38:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCa3S-0000vD-U4 for emacs-orgmode@gnu.org; Mon, 23 Nov 2009 09:38:19 -0500 Received: from [199.232.76.173] (port=60809 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCa3S-0000uy-P9 for emacs-orgmode@gnu.org; Mon, 23 Nov 2009 09:38:14 -0500 Received: from fg-out-1718.google.com ([72.14.220.153]:26442) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCa3S-0002hQ-9p for emacs-orgmode@gnu.org; Mon, 23 Nov 2009 09:38:14 -0500 Received: by fg-out-1718.google.com with SMTP id e21so816699fga.12 for ; Mon, 23 Nov 2009 06:38:13 -0800 (PST) In-Reply-To: <877hthz5tg.fsf@missioncriticalit.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Francesco Pizzolante Cc: mailing-list-org-mode Applied, thanks. - Carsten On Nov 23, 2009, at 3:14 PM, Francesco Pizzolante wrote: > 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 > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten