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 3812F429E34
\r
6 for <notmuch@notmuchmail.org>; Thu, 22 Aug 2013 10:10:40 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 NqRQX-BaXTxD for <notmuch@notmuchmail.org>;
\r
18 Thu, 22 Aug 2013 10:10:34 -0700 (PDT)
\r
19 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com
\r
20 [74.125.82.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
21 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
22 2DDEA431FC4 for <notmuch@notmuchmail.org>; Thu, 22 Aug 2013 10:10:34 -0700
\r
24 Received: by mail-wg0-f43.google.com with SMTP id z12so1895251wgg.22
\r
25 for <notmuch@notmuchmail.org>; Thu, 22 Aug 2013 10:10:33 -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=bchxadbWwBtCNTD+kpl16ewsiqhXuhaC3L8NTghZkU8G8j5g70IRT5pwD3DyPNA2MZ
\r
30 qPpNmHOc3+jxLW8I0RGDdK97h2imCH0uhTLIxFY/yQ3r0NP9N12O1Z081ZcyL1GHHdOi
\r
31 +qp1v8iKr8P3M+kqg+EtQomku9jWYpQeodOQJo/0rPDh/MFUNRtp2Eh7XMeE/v7jU1nR
\r
32 PGO/bq+Cp/rwM8kgIdUUHjehVhwfwIjTktr4S/Oap15hsSEgorpvp2PCwXlbvdGMWa54
\r
33 71LPsJSLN8quA5GrAHFvfjJwHrzE2SZPgdmfn00xJ8OKlaRV+2+Nem42gH/clQ0dsxHN
\r
35 X-Received: by 10.180.19.196 with SMTP id h4mr10563675wie.38.1377191432997;
\r
36 Thu, 22 Aug 2013 10:10:32 -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 i5sm39986792wiw.7.1969.12.31.16.00.00
\r
39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
40 Thu, 22 Aug 2013 10:10:32 -0700 (PDT)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH v3 01/11] contrib: pick: override notmuch-show-get-prop
\r
44 Date: Thu, 22 Aug 2013 18:10:16 +0100
\r
45 Message-Id: <1377191427-6821-2-git-send-email-markwalters1009@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.9.1
\r
47 In-Reply-To: <1377191427-6821-1-git-send-email-markwalters1009@gmail.com>
\r
48 References: <1377191427-6821-1-git-send-email-markwalters1009@gmail.com>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\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: Thu, 22 Aug 2013 17:10:40 -0000
\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
68 contrib/notmuch-pick/notmuch-pick.el | 16 ++++++++++++++++
\r
69 1 files changed, 16 insertions(+), 0 deletions(-)
\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
77 (get-text-property (point) :notmuch-message-properties)))
\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
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
95 (defun notmuch-pick-set-message-properties (props)
\r