[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Arithmetic range error
From: |
Colin Baxter |
Subject: |
Re: [O] Arithmetic range error |
Date: |
Thu, 07 Feb 2019 18:49:42 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
>>>>> Kyle Meyer <address@hidden> writes:
> Colin Baxter <address@hidden> writes:
>> Publishing an org file today, the html output looks ok but I get
>> the compilation error:
>>
>> Arithmetic range error: "floor", 1549541220.7500212
>>
>> I get the error with org-version 9.2.1
>> (release_9.2.1-200-g18b85a) but not with org-version 8.2.10.
>>
>> Looking at 'org-publish-cache-ctime-of-src' in the file
>> `ox-publish.el', its not obvious to me where the error is coming
>> from. Ditto after looking in NEWS and the git commit logs.
>>
>> Can anyone help?
> This looks to be due to the backport of Emacs's 662bee7d7,
> specifically:
> * lisp/ox-publish.el (org-publish-cache-ctime-of-src): Prefer
> float-time to doing time arithmetic by hand. [...] @@ -1364,8
> +1366,7 @@ (defun org-publish-cache-ctime-of-src (file)
> (expand-file-name (or (file-symlink-p file) file)
> (file-name-directory file))))) (if (not attr) (error "No such
> file: \"%s\"" file) - (+ (ash (car (nth 5 attr)) 16) - (cadr (nth
> 5 attr)))))) + (floor (float-time
> (file-attribute-modification-time attr))))))
> I won't have a chance to investigate further though until (my EST)
> tonight.
I can now confirm that if the above commit is reversed then my
Arithmetic range error disappears.
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index d9fc8d2..2144aa1 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -1366,7 +1366,9 @@ does not exist."
(expand-file-name (or (file-symlink-p file) file)
(file-name-directory file)))))
(if (not attr) (error "No such file: \"%s\"" file)
- (floor (float-time (file-attribute-modification-time attr))))))
+ (+ (ash (car (nth 5 attr)) 16)
+ (cadr (nth 5 attr))))))
+;; (floor (float-time (file-attribute-modification-time attr))))))
(provide 'ox-publish)
Best wishes,
Colin Baxter
address@hidden
Re: [O] Arithmetic range error, Robert Pluim, 2019/02/07
Re: [O] Arithmetic range error, Nicolas Goaziou, 2019/02/07