emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4d896c0977 14/16: Use list-form timestamps in .nnmh-articles


From: Paul Eggert
Subject: master 4d896c0977 14/16: Use list-form timestamps in .nnmh-articles
Date: Mon, 1 Aug 2022 04:17:28 -0400 (EDT)

branch: master
commit 4d896c097760f34cbe040589a5966bcf3752991d
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Use list-form timestamps in .nnmh-articles
    
    * lisp/gnus/nnmh.el (nnmh-update-gnus-unreads): Store list form
    timestamps into .nnmh-articles, even if current-time-list is nil.
    That way, older Emacs versions can read them.
---
 lisp/gnus/nnmh.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el
index 312a4a2a82..3902af7d2f 100644
--- a/lisp/gnus/nnmh.el
+++ b/lisp/gnus/nnmh.el
@@ -547,14 +547,17 @@ as unread by Gnus.")
          (push (car art) new))))
     ;; Go through all the new articles and add them, and their
     ;; time-stamps, to the list.
+    ;; Use list format for timestamps, so Emacs <27 can read .nnmh-articles.
     (setq articles
          (nconc articles
                 (mapcar
                  (lambda (art)
                    (cons art
-                         (file-attribute-modification-time
-                          (file-attributes
-                           (concat dir (int-to-string art))))))
+                         (when-let ((modtime
+                                     (file-attribute-modification-time
+                                      (file-attributes
+                                       (concat dir (int-to-string art))))))
+                           (time-convert modtime 'list))))
                  new)))
     ;; Make Gnus mark all new articles as unread.
     (when new



reply via email to

[Prev in Thread] Current Thread [Next in Thread]