emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Colin Baxter <m43cap@yandex.com>
Cc: emacs-orgmode@gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: Arithmetic range error
Date: Thu, 07 Feb 2019 22:02:54 -0500	[thread overview]
Message-ID: <871s4j56e9.fsf@kyleam.com> (raw)
In-Reply-To: <87womb5net.fsf@nicolasgoaziou.fr>

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Colin Baxter <m43cap@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	other threads:[~2019-02-08  3:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 12:26 Arithmetic range error Colin Baxter
2019-02-07 13:15 ` Kyle Meyer
2019-02-07 14:27   ` Colin Baxter
2019-02-07 16:11     ` Colin Baxter
2019-02-07 18:49   ` Colin Baxter
2019-02-07 20:55     ` Nicolas Goaziou
2019-02-08  3:02       ` Kyle Meyer [this message]
2019-02-08  8:54         ` Colin Baxter
2019-02-07 13:22 ` Robert Pluim
2019-02-07 13:27 ` Nicolas Goaziou

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871s4j56e9.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=m43cap@yandex.com \
    --cc=mail@nicolasgoaziou.fr \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).