From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Nicolas Goaziou Newsgroups: gmane.emacs.devel Subject: Re: Arithmetic range error Date: Sun, 10 Feb 2019 13:59:46 +0100 Message-ID: <87va1r6bp9.fsf@nicolasgoaziou.fr> References: <87k1iaft1p.fsf@yandex.com> <8736oye8gm.fsf@yandex.com> <83va1upgdp.fsf@gnu.org> <83r2cipeah.fsf@gnu.org> <87o97l6e1g.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="20621"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 10 14:00:43 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsoix-0005Fi-Lt for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2019 14:00:43 +0100 Original-Received: from localhost ([127.0.0.1]:58796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsoiw-000831-Hv for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2019 08:00:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsoiB-00082w-5e for emacs-devel@gnu.org; Sun, 10 Feb 2019 07:59:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsoiA-0001ic-5z for emacs-devel@gnu.org; Sun, 10 Feb 2019 07:59:55 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:52545) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsoi9-0001gp-WB for emacs-devel@gnu.org; Sun, 10 Feb 2019 07:59:54 -0500 X-Originating-IP: 185.131.40.67 Original-Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 381B960002; Sun, 10 Feb 2019 12:59:47 +0000 (UTC) In-Reply-To: (Paul Eggert's message of "Sun, 10 Feb 2019 02:06:20 -0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.183.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233183 Archived-At: Hello, Paul Eggert 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