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