emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-export-as-pdf > Deleting the pdf file
@ 2009-11-23 14:14 Francesco Pizzolante
  2009-11-23 14:38 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Francesco Pizzolante @ 2009-11-23 14:14 UTC (permalink / raw)
  To: mailing-list-org-mode

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-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: org-export-as-pdf > Deleting the pdf file
  2009-11-23 14:14 org-export-as-pdf > Deleting the pdf file Francesco Pizzolante
@ 2009-11-23 14:38 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-11-23 14:38 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-23 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-23 14:14 org-export-as-pdf > Deleting the pdf file Francesco Pizzolante
2009-11-23 14:38 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).