0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 20:37:51 +00:00

ox-latex: PDF generation timestamp check

* lisp/ox-latex.el (org-latex-compile): Improve timestamp check on HFS+
  filesystem by only considering 1-second clock resolution.

Previously, the call to (current-time) could return a timestamp with
a non-zero microsecond or picosecond fields, while the file attribute
always has zeros for these fields.  The check that the generated file is
newer than the reference timestamp only succeeded when the time to
generate the file crossed a 1-second clock interval.

TINYCHANGE
This commit is contained in:
Anthony Cowley 2016-01-14 18:13:45 -05:00 committed by Nicolas Goaziou
parent f02d15d677
commit a37996910e

View file

@ -3468,7 +3468,10 @@ Return PDF file name or an error if it couldn't be produced."
;; Check for process failure. Provide collected errors if
;; possible.
(if (or (not (file-exists-p pdffile))
(time-less-p (nth 5 (file-attributes pdffile)) time))
;; Only compare times up to whole seconds as some filesystems
;; (e.g. HFS+) do not retain any finer granularity.
(time-less-p (org-sublist (nth 5 (file-attributes pdffile)) 1 2)
(org-sublist time 1 2)))
(error (format "PDF file %s wasn't produced" pdffile))
;; Else remove log files, when specified, and signal end of
;; process to user, along with any error encountered.