From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Add catch-up all LaTeX errors Date: Thu, 27 Mar 2014 11:02:13 +0100 Message-ID: <87txakrmca.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT78Y-0006KM-QL for emacs-orgmode@gnu.org; Thu, 27 Mar 2014 06:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT78L-000327-In for emacs-orgmode@gnu.org; Thu, 27 Mar 2014 06:02:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:42338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT78L-00031v-DP for emacs-orgmode@gnu.org; Thu, 27 Mar 2014 06:02:01 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WT78K-0001UG-4z for emacs-orgmode@gnu.org; Thu, 27 Mar 2014 11:02:00 +0100 In-Reply-To: <8638i4aixi.fsf@somewhere.org> (Sebastien Vauban's message of "Wed, 26 Mar 2014 19:55:37 +0100") 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org Hello, 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". 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. Regards, -- Nicolas Goaziou