＠Vin: this goes back to 20.x days, so presumably is in 21.4. I don't
know if file-attributes uses make_time in 21.4, though.
Something like this patch should be applied to any version people
happen to be using. I'm wondering if we shouldn't have more regular
handling of time values in core (eg, always using a true list of three
integers as in #'current-time). Of course we'd have to continue
accepting conses (as produced by editfns.c:make_time), and probably
dotted lists (as documented in #'format-time-string).
I'm surprised this was not reported before. 32768 seconds is more
than 9 hours, and .cvsignore (now irrelevant) is included in the hg
checkout in the info/ directory and has the same timestamp as dir.
Perhaps in the past it wasn't picked up by #'Info-directory-files?
Info-dir-outdated-p fails because dired.c:Ffile_attributes uses
make_time to report file timestamps, and that returns a *cons* of (max
16-bit) integers. Thus there is no cadr of the timestamp.
The patch below assumes that data structure. On the other hand,
#'current-time returns a *list* of 3 integers (the third being
microseconds if available, not restricted to 16 bits). This is all
quite a mess (especially the handling of sizeof(time_t) vs. bignums in
I wonder if lisp_to_time should be exported to Lisp.
diff -r 63ae8a489fed lisp/ChangeLog
--- a/lisp/ChangeLog Thu Mar 09 21:39:44 2017 +0000
+++ b/lisp/ChangeLog Thu Apr 27 21:31:58 2017 +0900
＠＠ -0,0 +1,5 ＠＠
+2017-04-27 Stephen J. Turnbull <stephen(a)xemacs.org>
+ * info.el (Info-dir-outdated-p):
+ Fix cons-of-shorts time comparison.
diff -r 63ae8a489fed lisp/info.el
--- a/lisp/info.el Thu Mar 09 21:39:44 2017 +0000
+++ b/lisp/info.el Thu Apr 27 21:31:58 2017 +0900
＠＠ -1132,8 +1132,7 ＠＠
(setq f-mod-time (nth 5 (file-attributes f)))
(setq newer (or (> (car f-mod-time) (car dir-mod-time))
(and (= (car f-mod-time) (car dir-mod-time))
- (> (car (cdr f-mod-time))
- (car (cdr dir-mod-time))))))
+ (> (cdr f-mod-time) (cdr dir-mod-time)))))
(if (and (file-readable-p f) newer)
(cons f Info-dir-newer-info-files)))))
Associate Professor Division of Policy and Planning Science
Faculty of Systems and Information
Email: turnbull(a)sk.tsukuba.ac.jp University of Tsukuba
Tel: 029-853-5175 Tennodai 1-1-1, Tsukuba 305-8573 JAPAN