[PATCH v2 (rebased) 0/3] Improve the display of matching/non-matching authors.
[notmuch-archives.git] / f8 / 388c7ad4a9ff49237b6fa31e9abcaf8795cd61
1 Return-Path: <markwalters1009@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 2BAB2421163\r
6         for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 05:14:54 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id ou5p4yOWf59o for <notmuch@notmuchmail.org>;\r
18         Sun, 18 Aug 2013 05:14:48 -0700 (PDT)\r
19 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com\r
20         [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id BB5E1431FD0\r
23         for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 05:14:47 -0700 (PDT)\r
24 Received: by mail-wi0-f169.google.com with SMTP id f14so2902213wiw.2\r
25         for <notmuch@notmuchmail.org>; Sun, 18 Aug 2013 05:14:45 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
28         bh=ER/JPS+bch1EHRerTB5t6hFWxmz5YcXbqvv8zEJwtLE=;\r
29         b=MyZclYq9JQ4+Ty/d1TjybZMWUy77HXOv6zjKvYaHUt7ByhRNICzrtSmTI23p1tXGR1\r
30         9x+yuVrHINUEJsjceGlN5IVDd+jnL/wPGHmiqmEl1V8TuVCiGnj8SQ3q0Uqs0RIZqW1y\r
31         80QurVANsR0Uc4A3WYS+nXgordAc79GIYWnb4BWjPmZxA9Lq/XBQQTRDZDCB39eslKlS\r
32         9z7XYtWSwRfl/Phhq+AWQx+l3GkPKcZwzswN8txU5Xa511EFAE3L60uD8US6V0dqlnEO\r
33         Trz3wNay8Sz9skaPXhwlRY0l/ai1XcK6BaC8pQETN9pVW1M8D4Pp/iHtU4FPaYwjmgxU\r
34         u5xw==\r
35 X-Received: by 10.194.123.199 with SMTP id mc7mr107828wjb.43.1376828085185;\r
36         Sun, 18 Aug 2013 05:14:45 -0700 (PDT)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id iz19sm9054786wic.9.1969.12.31.16.00.00\r
39         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
40         Sun, 18 Aug 2013 05:14:44 -0700 (PDT)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH v2 01/11] contrib: pick: override notmuch-show-get-prop\r
44 Date: Sun, 18 Aug 2013 13:14:29 +0100\r
45 Message-Id: <1376828079-21455-2-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 In-Reply-To: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com>\r
48 References: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Sun, 18 Aug 2013 12:14:54 -0000\r
62 \r
63 We override notmuch-show-get-prop so that many of the show functions\r
64 can be used in notmuch-pick without modification. The main use is that\r
65 it means notmuch-show-get-message-id `works' in pick. Thus we get all\r
66 the stash functions and several other `for free' in pick.\r
67 ---\r
68  contrib/notmuch-pick/notmuch-pick.el |   16 ++++++++++++++++\r
69  1 files changed, 16 insertions(+), 0 deletions(-)\r
70 \r
71 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
72 index 7f5f729..04e37ee 100644\r
73 --- a/contrib/notmuch-pick/notmuch-pick.el\r
74 +++ b/contrib/notmuch-pick/notmuch-pick.el\r
75 @@ -238,6 +238,22 @@ Some useful entries are:\r
76      (beginning-of-line)\r
77      (get-text-property (point) :notmuch-message-properties)))\r
78  \r
79 +;; XXX This should really be a lib function but we are trying to\r
80 +;; reduce impact on the code base.\r
81 +(defun notmuch-show-get-prop (prop &optional props)\r
82 +  "This is a pick overridden version of notmuch-show-get-prop\r
83 +\r
84 +It gets property PROP from PROPS or, if PROPS is nil, the current\r
85 +message in either pick or show. This means that several functions\r
86 +in notmuch-show now work unchanged in pick as they just need the\r
87 +correct message properties."\r
88 +  (let ((props (or props\r
89 +                  (cond ((eq major-mode 'notmuch-show-mode)\r
90 +                         (notmuch-show-get-message-properties))\r
91 +                        ((eq major-mode 'notmuch-pick-mode)\r
92 +                         (notmuch-pick-get-message-properties))))))\r
93 +    (plist-get props prop)))\r
94 +\r
95  (defun notmuch-pick-set-message-properties (props)\r
96    (save-excursion\r
97      (beginning-of-line)\r
98 -- \r
99 1.7.9.1\r
100 \r