Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4E7844196F3 for ; Wed, 19 May 2010 01:54:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OW8gVHBUrwUy for ; Wed, 19 May 2010 01:53:55 -0700 (PDT) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by olra.theworths.org (Postfix) with ESMTP id 7D0D84196F5 for ; Wed, 19 May 2010 01:53:43 -0700 (PDT) Received: by ewy5 with SMTP id 5so1814158ewy.0 for ; Wed, 19 May 2010 01:53:42 -0700 (PDT) Received: by 10.213.49.146 with SMTP id v18mr3201090ebf.25.1274259220816; Wed, 19 May 2010 01:53:40 -0700 (PDT) Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com [83.217.165.81]) by mx.google.com with ESMTPS id 13sm3502756ewy.13.2010.05.19.01.53.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 May 2010 01:53:39 -0700 (PDT) Received: by ut.hh.sledj.net (Postfix, from userid 1000) id 05DD6594082; Wed, 19 May 2010 07:44:25 +0100 (BST) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH] emacs: Allow the display of absolute dates in the header line. Date: Wed, 19 May 2010 07:44:18 +0100 Message-Id: <1274251458-31253-1-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.1 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 08:54:08 -0000 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: > 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