From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Anthony Cowley <acowley@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-latex-compile timestamp checks
Date: Sat, 16 Jan 2016 15:16:14 +0100 [thread overview]
Message-ID: <87wpr9r4nl.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <FE7910BA-727F-4E22-A154-D443871CD958@gmail.com> (Anthony Cowley's message of "Fri, 15 Jan 2016 15:34:13 -0500")
Hello,
Anthony Cowley <acowley@gmail.com> writes:
> * 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
> ---
> lisp/ox-latex.el | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
> index a57677b..f803b7e 100644
> --- a/lisp/ox-latex.el
> +++ b/lisp/ox-latex.el
> @@ -3576,7 +3576,8 @@ 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))
> + (time-less-p (subseq (nth 5 (file-attributes pdffile)) 0 2)
> + (subseq time 0 2)))
This sounds good. Thank you.
Although, I suggest to use `cl-subseq' instead of its alias. Also, it
may be worth commenting that trick right into the source.
Eventually, I think at least ox-texinfo.el, ox-man.el and ox-groff.el
need a similar trick.
Rasmus, what do you think?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2016-01-16 14:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 23:24 [PATCH] org-latex-compile timestamp checks Anthony Cowley
2016-01-15 12:13 ` Rasmus
2016-01-15 20:34 ` Anthony Cowley
2016-01-16 14:16 ` Nicolas Goaziou [this message]
2016-01-16 15:17 ` Rasmus
2016-01-16 23:21 ` Anthony Cowley
2016-01-21 9:54 ` Nicolas Goaziou
2016-01-21 15:53 ` Rasmus
2016-01-26 19:56 ` Anthony Cowley
2016-01-26 22:14 ` Rasmus
2016-01-26 22:20 ` Nicolas Goaziou
2016-01-26 22:25 ` Rasmus
2016-01-28 9:05 ` Nicolas Goaziou
2016-01-28 10:10 ` Rasmus
2016-01-28 15:48 ` Anthony Cowley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wpr9r4nl.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=acowley@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.