From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien Vauban Subject: Re: [PATCH] Add catch-up all LaTeX errors Date: Thu, 27 Mar 2014 11:17:46 +0100 Message-ID: <86r45o9c8l.fsf@somewhere.org> References: <87vc14i5wp.fsf@somewhere.org> <87siq5gh6w.fsf@somewhere.org> <87zjkdt3le.fsf@gmail.com> <87mwgdgea9.fsf@somewhere.org> <87vbv1szuv.fsf@gmail.com> <8638i4aixi.fsf@somewhere.org> <87txakrmca.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, Nicolas Goaziou wrote: > Sebastien Vauban writes: > >> FWIW, I'm using this in some export code I have: >> >> (let* ((orgfile (buffer-file-name)) >> (base-name (file-name-base orgfile)) >> (htmlfile (concat base-name ".html")) >> (pdffile (concat base-name ".pdf"))) >> ... >> (when (file-exists-p pdffile) >> (if (file-newer-than-file-p orgfile pdffile) >> (org-latex-export-to-pdf) >> (message "PDF is up to date with Org file")))) >> >> That way, we know if the PDF file has been (re-)produced: it must be >> newer than the Org file... > > True, but, unfortunately, `org-latex-compile' has no access to > "orgfile". Isn't `orgfile' equal to `org-babel-exp-reference-buffer' in `org-latex-compile'? > It is possible to rely on `file-attributes' and compare creation time of > the pdf file before export (if any) and the one after the export. Best regards, Seb -- Sebastien Vauban