]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Allow the display of absolute dates in the header line.
authorDavid Edmondson <dme@dme.org>
Wed, 19 May 2010 06:44:18 +0000 (07:44 +0100)
committerCarl Worth <cworth@cworth.org>
Fri, 4 Jun 2010 02:09:18 +0000 (19:09 -0700)
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.

emacs/notmuch-show.el

index b0815a02d05da0abbfe5af9c265e4733aaaa4df8..686e203702d05ec018afc0f8e9bcff843f218fba 100644 (file)
@@ -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)