From 4d896c097760f34cbe040589a5966bcf3752991d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Aug 2022 00:38:34 -0700 Subject: [PATCH] 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 312a4a2a828..3902af7d2f6 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 -- 2.39.2