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 C7D5F4196F2 for ; Fri, 23 Apr 2010 04:54:26 -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] 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 xkse3Qud2RbV for ; Fri, 23 Apr 2010 04:54:26 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by olra.theworths.org (Postfix) with ESMTP id F0724431FC1 for ; Fri, 23 Apr 2010 04:54:25 -0700 (PDT) Received: by wyf23 with SMTP id 23so1405988wyf.26 for ; Fri, 23 Apr 2010 04:54:25 -0700 (PDT) Received: by 10.216.158.12 with SMTP id p12mr2874809wek.152.1272023664676; Fri, 23 Apr 2010 04:54:24 -0700 (PDT) Received: from ut.hh.sledj.net (gmp-ea-fw-1.sun.com [192.18.1.36]) by mx.google.com with ESMTPS id r29sm92802wbv.9.2010.04.23.04.54.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Apr 2010 04:54:23 -0700 (PDT) Received: by ut.hh.sledj.net (Postfix, from userid 1000) id CF1F2594135; Fri, 23 Apr 2010 12:54:22 +0100 (BST) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH] emacs: Allow headers to be shown by default in show mode Date: Fri, 23 Apr 2010 12:54:21 +0100 Message-Id: <1272023661-14038-1-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.0 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: Fri, 23 Apr 2010 11:54:26 -0000 Add `notmuch-show-headers-visible' which, when set `t', causes headers to be shown by default. --- emacs/notmuch-show.el | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index cd859f0..3ea07c8 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -42,6 +42,11 @@ that if this order is changed the headers shown when a message is collapsed will change.") +(defcustom notmuch-show-headers-visible nil + "Should the headers be visible by default?" + :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-show-headers'.") @@ -433,8 +438,8 @@ current buffer, if possible." ;; the content). (notmuch-show-set-message-properties msg) - ;; Headers are hidden by default. - (notmuch-show-headers-visible msg nil) + ;; Set header visibility. + (notmuch-show-headers-visible msg notmuch-show-headers-visible) ;; Message visibility depends on whether it matched the search ;; criteria. -- 1.7.0