[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How hide the seconds in article header's date?
From: |
Madhu |
Subject: |
Re: How hide the seconds in article header's date? |
Date: |
Tue, 24 May 2011 19:59:30 -0000 |
* Damien Wyart <4d9f3568$0$26327$426a74cc@news.free.fr> :
Wrote on Fri, 08 Apr 2011 18:18:48 +0200:
| * Richard Riley <rileyrg@googlemail.com> in gnu.emacs.gnus:
|> > (setq gnus-article-date-headers 'original)
|> > (setq gnus-article-update-date-headers nil)
|
|> That removes the lapsed altogether. I think the direction was more to
|> keep lapsed (not animated) but not include seconds or?
|
|> e.g combined-lapsed without the seconds would be nice.
|
| Yes, that might be closer to what the op would like. After some source
| reading, it looks like that would require quite deep hacking inside
| article-lapsed-string, so I can't propose a working solution quickly.
Turns out there an easy kludge to hide the seconds:
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 9767798..ca9c17a 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3588,6 +3588,7 @@ possible values."
;; through the time units for years, weeks, etc,
;; and divide things to see whether that results
;; in positive answers.
+ (let ((article-time-units (butlast article-time-units)))
(mapconcat
(lambda (unit)
(if (or (zerop (setq num (ffloor (/ sec (cdr unit)))))
@@ -3604,7 +3605,7 @@ possible values."
(if (> num 1) "s" ""))
(setq prev t
segments (1+ segments)))))
- article-time-units "")
+ article-time-units ""))
;; If dates are odd, then it might appear like the
;; article was sent in the future.
(if (> real-sec 0)