From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Arithmetic range error Date: Thu, 07 Feb 2019 22:02:54 -0500 Message-ID: <871s4j56e9.fsf@kyleam.com> References: <87ef8jwzs5.fsf@yandex.com> <874l9f68ok.fsf@kyleam.com> <87ftszwi0p.fsf@yandex.com> <87womb5net.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:44372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grwRP-0006hj-Lw for emacs-orgmode@gnu.org; Thu, 07 Feb 2019 22:03:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grwRN-0002pA-Qe for emacs-orgmode@gnu.org; Thu, 07 Feb 2019 22:02:59 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:60769) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grwRN-0002oM-HN for emacs-orgmode@gnu.org; Thu, 07 Feb 2019 22:02:57 -0500 In-Reply-To: <87womb5net.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Colin Baxter Cc: emacs-orgmode@gnu.org, Nicolas Goaziou Nicolas Goaziou writes: > Colin Baxter 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