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 36285431FB6
\r
6 for <notmuch@notmuchmail.org>; Sun, 2 Dec 2012 14:21:39 -0800 (PST)
\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 n1jXLEIy-wK0 for <notmuch@notmuchmail.org>;
\r
18 Sun, 2 Dec 2012 14:21:35 -0800 (PST)
\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com
\r
20 [74.125.82.181]) (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 B83DA431FAE
\r
23 for <notmuch@notmuchmail.org>; Sun, 2 Dec 2012 14:21:34 -0800 (PST)
\r
24 Received: by mail-we0-f181.google.com with SMTP id t11so1057869wey.26
\r
25 for <notmuch@notmuchmail.org>; Sun, 02 Dec 2012 14:21:33 -0800 (PST)
\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:x-mailer:in-reply-to:references;
\r
28 bh=tTvhuYdxToiYMJ0A4tBp+S87+m5odwo63xEndvqdsd4=;
\r
29 b=AyCl75yEriKi6vbmacNVq5B5o0JNXUtF1s7HUCzQSL97dARgCFklVf6GrSo00Czbac
\r
30 6qwHJpFYyQ9AIhyEEjibmA8IwD3WmzYs1LpYjQjuFtmT4iZuRvmTFWGztgWIbWgkyXQS
\r
31 yoo/XebWGU9dNeoL6UKfDSBSEho9frT08hk0ZOeBDacKfR8v4WmWT559A0jfXBlqMffv
\r
32 YAt82s6OjKlyClLQNnS/9Sj1ymVlZxc3lDvADXrO6rhftLY5LsZIG0owQAVdlJXsa93w
\r
33 CLa92UiC2pVuzwVGXZ0VfAXr9A/HFIS/LPABYwXgi6zgP+QIfC/RcYcAg+vn+j5PyGcy
\r
35 Received: by 10.216.209.70 with SMTP id r48mr2776155weo.196.1354486893615;
\r
36 Sun, 02 Dec 2012 14:21:33 -0800 (PST)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPS id bd7sm9858720wib.8.2012.12.02.14.21.31
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Sun, 02 Dec 2012 14:21:32 -0800 (PST)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH] emacs: show: make show-get-message-prop usable from pick
\r
44 Date: Sun, 2 Dec 2012 22:21:21 +0000
\r
45 Message-Id: <1354486881-32456-1-git-send-email-markwalters1009@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.9.1
\r
47 In-Reply-To: <1354483744-27541-1-git-send-email-markwalters1009@gmail.com>
\r
48 References: <1354483744-27541-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: Sun, 02 Dec 2012 22:21:39 -0000
\r
63 Make notmuch-show-get-prop choose the get-message-properties routine
\r
64 based on the major mode. This make it usable from notmuch-pick and
\r
65 thus a large number of functions are usable directly from
\r
66 notmuch-show.el and do not need to be reimplemented in pick.
\r
69 Ok so the previous version was me being stupid. I was wanting to avoid
\r
70 errors caused by notmuch-pick-get-message-properties not existing but
\r
71 the obvious solution is just to define it in a trivial fashion as
\r
74 Anyway would this be acceptable?
\r
81 emacs/notmuch-show.el | 10 +++++++++-
\r
82 1 files changed, 9 insertions(+), 1 deletions(-)
\r
84 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
85 index 4d6c014..b7f64e3 100644
\r
86 --- a/emacs/notmuch-show.el
\r
87 +++ b/emacs/notmuch-show.el
\r
88 @@ -1378,6 +1378,10 @@ Some useful entries are:
\r
89 (notmuch-show-move-to-message-top)
\r
90 (get-text-property (point) :notmuch-message-properties)))
\r
92 +(defun notmuch-show-mode-get-message-properties ()
\r
93 + "Wrapper for notmuch-show-get-message-properties"
\r
94 + (notmuch-show-get-message-properties))
\r
96 (defun notmuch-show-set-prop (prop val &optional props)
\r
97 (let ((inhibit-read-only t)
\r
99 @@ -1385,9 +1389,13 @@ Some useful entries are:
\r
100 (plist-put props prop val)
\r
101 (notmuch-show-set-message-properties props)))
\r
103 +(defun notmuch-pick-get-message-properties ())
\r
105 (defun notmuch-show-get-prop (prop &optional props)
\r
106 (let ((props (or props
\r
107 - (notmuch-show-get-message-properties))))
\r
108 + (if (eq major-mode 'notmuch-show-mode)
\r
109 + (notmuch-show-get-message-properties)
\r
110 + (notmuch-pick-get-message-properties)))))
\r
111 (plist-get props prop)))
\r
113 (defun notmuch-show-get-message-id (&optional bare)
\r