unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Allow the display of absolute dates in the header line.
@ 2010-05-19  6:44 David Edmondson
  2010-05-19 17:45 ` Dirk Hohndel
  2010-06-04  2:09 ` Carl Worth
  0 siblings, 2 replies; 3+ messages in thread
From: David Edmondson @ 2010-05-19  6:44 UTC (permalink / raw)
  To: notmuch

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.
---

Re:
> <dirkhh> one thing I'd love for 0.4 (and haven't seen a patch for) is the
> 	   ability to disable the "xxmins. ago" and simply have it always
> 	   display the time a message arrived

 emacs/notmuch-show.el |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 5b0050a..2a95e62 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -64,6 +64,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'.")
@@ -592,7 +597,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)
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] emacs: Allow the display of absolute dates in the header line.
  2010-05-19  6:44 [PATCH] emacs: Allow the display of absolute dates in the header line David Edmondson
@ 2010-05-19 17:45 ` Dirk Hohndel
  2010-06-04  2:09 ` Carl Worth
  1 sibling, 0 replies; 3+ messages in thread
From: Dirk Hohndel @ 2010-05-19 17:45 UTC (permalink / raw)
  To: David Edmondson, notmuch

On Wed, 19 May 2010 07:44:18 +0100, David Edmondson <dme@dme.org> wrote:
> 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.

Excellent - thanks for providing this (and all I did was mention it
briefly on IRC... I love this project)

/D

-- 
Dirk Hohndel
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] emacs: Allow the display of absolute dates in the header line.
  2010-05-19  6:44 [PATCH] emacs: Allow the display of absolute dates in the header line David Edmondson
  2010-05-19 17:45 ` Dirk Hohndel
@ 2010-06-04  2:09 ` Carl Worth
  1 sibling, 0 replies; 3+ messages in thread
From: Carl Worth @ 2010-06-04  2:09 UTC (permalink / raw)
  To: David Edmondson, notmuch

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

On Wed, 19 May 2010 07:44:18 +0100, David Edmondson <dme@dme.org> wrote:
> 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.

Applied locally for the next big push.

-Carl

-- 
carl.d.worth@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-04  2:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19  6:44 [PATCH] emacs: Allow the display of absolute dates in the header line David Edmondson
2010-05-19 17:45 ` Dirk Hohndel
2010-06-04  2:09 ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).