GNU bug report logs - #28921
[PROPOSED] Fix xdg timestamp error on 32-bit Emacs

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sat, 21 Oct 2017 03:06:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Subject: bug#28921: closed (Re: bug#28921: [PROPOSED] Fix xdg timestamp
 error on 32-bit Emacs)
Date: Sun, 22 Oct 2017 07:42:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#28921: [PROPOSED] Fix xdg timestamp error on 32-bit Emacs

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 28921 <at> debbugs.gnu.org.

-- 
28921: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28921
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: mvoteiza <at> udel.edu, 28921-done <at> debbugs.gnu.org
Subject: Re: bug#28921: [PROPOSED] Fix xdg timestamp error on 32-bit Emacs
Date: Sun, 22 Oct 2017 00:41:08 -0700
Tino Calancha wrote:
> Maybe you could use here the new accesor `file-attribute-modification-time':

Thanks, good idea, I installed it that way into emacs-26. I prefer this to 
float-time because float-time loses information on platforms like GNU/Linux 
where typical file timestamps these days have about 61 bits of precision, which 
is more than the 53 bits that Emacs floats have.

[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: bug-gnu-emacs <at> gnu.org,
	mvoteiza <at> udel.edu
Cc: Paul Eggert <eggert <at> cs.ucla.edu>
Subject: [PROPOSED] Fix xdg timestamp error on 32-bit Emacs
Date: Fri, 20 Oct 2017 20:04:55 -0700
* lisp/xdg.el (xdg-thumb-mtime): Return an Emacs timestamp,
not an integer.  This avoids signaling an error on 32-bit
Emacs, where timestamps typically do not fit into fixnums.
---
 lisp/xdg.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/xdg.el b/lisp/xdg.el
index 76106f4258..6dcef74e4e 100644
--- a/lisp/xdg.el
+++ b/lisp/xdg.el
@@ -93,8 +93,8 @@ xdg-thumb-name
   (concat (md5 (xdg-thumb-uri filename)) ".png"))
 
 (defun xdg-thumb-mtime (filename)
-  "Return modification time of FILENAME as integral seconds from the epoch."
-  (floor (float-time (nth 5 (file-attributes filename)))))
+  "Return modification time of FILENAME as an Emacs timestamp."
+  (nth 5 (file-attributes filename)))
 
 
 ;; XDG User Directories
-- 
2.13.6




This bug report was last modified 7 years and 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.