[PATCH] Run `notmuch-show-hook' after setting `header-line-format'
authorDamien Cassou <damien.cassou@gmail.com>
Mon, 17 Sep 2012 16:43:28 +0000 (18:43 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:33 +0000 (09:49 -0800)
5f/eb4383d031adb7bd405e934854b245242f511f [new file with mode: 0644]

diff --git a/5f/eb4383d031adb7bd405e934854b245242f511f b/5f/eb4383d031adb7bd405e934854b245242f511f
new file mode 100644 (file)
index 0000000..8682af3
--- /dev/null
@@ -0,0 +1,90 @@
+Return-Path: <damien.cassou@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C24D7431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 17 Sep 2012 09:43:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id FKYj-SQAGREK for <notmuch@notmuchmail.org>;\r
+       Mon, 17 Sep 2012 09:43:35 -0700 (PDT)\r
+Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com\r
+ [74.125.82.45])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 2122C431FAE   for <notmuch@notmuchmail.org>; Mon, 17 Sep 2012 09:43:34 -0700\r
+ (PDT)\r
+Received: by wgbdq12 with SMTP id dq12so4703563wgb.2\r
+       for <notmuch@notmuchmail.org>; Mon, 17 Sep 2012 09:43:33 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:subject:user-agent:date:message-id:mime-version\r
+       :content-type; bh=MSEDRup9dZ6NCH91CbmFiBi9GYcejBwlPx5UtasSO6E=;\r
+       b=itiiBhfRWFKQVvQyiUHyBc8VBGfI5E/qADd/ZWT3tQ+8EjAWDse+wNu86wahvpsC6z\r
+       yGMXLptAT9Y/kJtKeHMDr9h/VIkvfbTogqd4Ic6Ty+GtWfCNQ88XIHPGQBidX2RI8KIx\r
+       JaiO5gW64J2t5a9R5Y5RqaGnGs70WMpVL6fJjptJWQpgS6e4uDxJorFkU99309PKmaNC\r
+       /cWbJNQTWcIJTMpZnu3Sjx2ynW1YLW2QH94yFabilHqaQyC3pJV5vMCSX1UpV0E0jkUp\r
+       aAyLF5e6Kc/8/2Di/TLK9LlahQHOFZbScgBQqukzSNdETMZMG1WI0UPQxeJmVFa7LlRX\r
+       lMQA==\r
+Received: by 10.180.104.197 with SMTP id gg5mr17296118wib.9.1347900213845;\r
+       Mon, 17 Sep 2012 09:43:33 -0700 (PDT)\r
+Received: from luz3 ([78.251.247.165])\r
+       by mx.google.com with ESMTPS id el6sm18545485wib.8.2012.09.17.09.43.32\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 17 Sep 2012 09:43:32 -0700 (PDT)\r
+From: Damien Cassou <damien.cassou@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] Run `notmuch-show-hook' after setting `header-line-format'\r
+User-Agent: Notmuch/0.14 (http://notmuchmail.org) Emacs/24.2.50.1\r
+       (i686-pc-linux-gnu)\r
+Date: Mon, 17 Sep 2012 18:43:28 +0200\r
+Message-ID: <87pq5kior3.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 17 Sep 2012 16:43:36 -0000\r
+\r
+This patch makes it possible for notmuch-show hooks to change the\r
+header line.\r
+\r
+Signed-off-by: Damien Cassou <damien.cassou@gmail.com>\r
+---\r
+ emacs/notmuch-show.el |    6 +++---\r
+ 1 file changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index ce5ea6f..16008b4 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1070,10 +1070,10 @@ function is used."\r
+\r
+       (jit-lock-register #'notmuch-show-buttonise-links)\r
+\r
+-      (run-hooks 'notmuch-show-hook))\r
++      ;; Set the header line to the subject of the first message.\r
++      (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))\r
+\r
+-    ;; Set the header line to the subject of the first message.\r
+-    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))))\r
++      (run-hooks 'notmuch-show-hook))))\r
+\r
+ (defun notmuch-show-capture-state ()\r
+   "Capture the state of the current buffer.\r
+--\r
+1.7.9.5\r