summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorDavid Edmondson <dme@dme.org>2010-05-19 07:44:18 +0100
committerCarl Worth <cworth@cworth.org>2010-06-03 19:09:18 -0700
commitfc37771a712db1fbd42bc07fd18ea92a189b5ba2 (patch)
treed9a6a782daceda6fc4c0b6c71c940feaa468831b /emacs
parent35343710a2a64e80974aaf4d4222feb43474113a (diff)
emacs: Allow the display of absolute dates in the header line.
Add `notmuch-show-relative-dates' to control whether the summary line in `notmuch-show' mode displays relative dates (e.g. '26 mins. ago') or the full date string from the message. Default to `t' for compatibility with the previous behaviour.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-show.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index b0815a0..686e203 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -58,6 +58,11 @@ any given message."
:group 'notmuch
:type 'boolean)
+(defcustom notmuch-show-relative-dates t
+ "Display relative dates in the message summary line."
+ :group 'notmuch
+ :type 'boolean)
+
(defvar notmuch-show-markup-headers-hook '(notmuch-show-colour-headers)
"A list of functions called to decorate the headers listed in
`notmuch-message-headers'.")
@@ -405,7 +410,9 @@ current buffer, if possible."
(setq message-start (point-marker))
(notmuch-show-insert-headerline headers
- (or (plist-get msg :date_relative)
+ (or (if notmuch-show-relative-dates
+ (plist-get msg :date_relative)
+ nil)
(plist-get headers :Date))
(plist-get msg :tags) depth)