emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arithmetic range error


From: Nicolas Goaziou
Subject: Re: Arithmetic range error
Date: Sun, 10 Feb 2019 13:59:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Paul Eggert <address@hidden> writes:

> I don't see why it's necessary to assume the list representation in
> ox-publish.el here:
>
>   (let* ((key (org-publish-timestamp-filename filename pub-dir pub-func))
>          (pstamp (pcase (org-publish-cache-get key)
>                    ;; Old format, convert it back to a time value.
>                    ((and stamp (pred wholenump)) (seconds-to-time stamp))
>                    (stamp stamp)))

It's simply because I hadn't realized `time-less-p' also handled integers.

> The call to seconds-to-time is not needed since the only use of pstamp
> is in (time-less-p pstamp ctime), which works just fine with integer
> timestamps. That is, you can simplify the above code to the following:
>
>   (let* ((key (org-publish-timestamp-filename filename pub-dir pub-func))
>          (pstamp (org-publish-cache-get key))

Fixed. Thank you for the heads up.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]