Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:

> Colin Baxter <m43...@yandex.com> writes:
>
>> 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))))))
>
> I think it is worth reporting it to Emacs devel list, because the
> commented code doesn't look wrong.

And in the report it'd be good to include some of the information asked
for elsewhere in this thread (full backtrace, system details) as well as
a recipe to reproduce.  I haven't had any luck triggering the issue,
but that's unsurprisingly given that the code looks correct and the
number reported in the error isn't extreme:

    (floor 1549541220.7500212) ; => 1549541220
    (format-time-string
     "%Y-%m-%d %I:%M:%S"
     (seconds-to-time 1549541220.7500212)) ; => "2019-02-07 07:07:00"

-- 
Kyle

Reply via email to