--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\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 C167F431FB6\r
+ for <notmuch@notmuchmail.org>; Fri, 7 Dec 2012 00:10:02 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 kLJ1mCMr7VnQ for <notmuch@notmuchmail.org>;\r
+ Fri, 7 Dec 2012 00:10:02 -0800 (PST)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 294E6431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 7 Dec 2012 00:10:02 -0800 (PST)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1Tgt0S-0007zr-SZ; Fri, 07 Dec 2012 08:10:01 +0000\r
+Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1Tgt0S-0001Ax-Jm; Fri, 07 Dec 2012 08:10:00 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs: show: make show-get-message-prop usable from pick\r
+In-Reply-To: <87ip8kszde.fsf@qmul.ac.uk>\r
+References: <1354483744-27541-1-git-send-email-markwalters1009@gmail.com>\r
+ <1354486881-32456-1-git-send-email-markwalters1009@gmail.com>\r
+ <87ip8kszde.fsf@qmul.ac.uk>\r
+User-Agent: Notmuch/0.14+81~g9730584 (http://notmuchmail.org) Emacs/23.4.1\r
+ (i486-pc-linux-gnu)\r
+Date: Fri, 07 Dec 2012 08:09:59 +0000\r
+Message-ID: <87pq2m5lm0.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 93.97.24.31\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: 135fd6ac426c3bcf669834b6fd99a5e3 (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.7\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored -1.7 points.\r
+ Summary of the scoring: \r
+ * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+ * medium trust\r
+ * [138.37.6.40 listed in list.dnswl.org]\r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * 0.6 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\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: Fri, 07 Dec 2012 08:10:02 -0000\r
+\r
+\r
+Just in case anyone is thinking about this: there is a much better\r
+solution. I just redefine notmuch-show-get-prop in notmuch-pick and I\r
+can achieve exactly the same. Hence forget this patch/thread\r
+\r
+Many thanks\r
+\r
+Mark\r
+\r
+\r
+\r
+Mark Walters <markwalters1009@gmail.com> writes:\r
+\r
+> Hi\r
+>\r
+> On Sun, 02 Dec 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
+>> Make notmuch-show-get-prop choose the get-message-properties routine\r
+>> based on the major mode. This make it usable from notmuch-pick and\r
+>> thus a large number of functions are usable directly from\r
+>> notmuch-show.el and do not need to be reimplemented in pick.\r
+>> ---\r
+>>\r
+>> Ok so the previous version was me being stupid. I was wanting to avoid\r
+>> errors caused by notmuch-pick-get-message-properties not existing but\r
+>> the obvious solution is just to define it in a trivial fashion as\r
+>> here.\r
+>\r
+> and to continue the stupidity the first hunk is no longer needed: it's\r
+> just the second hunk now.\r
+>\r
+> MW\r
+>\r
+>>\r
+>> Anyway would this be acceptable?\r
+>>\r
+>> Best wishes\r
+>>\r
+>> Mark\r
+>>\r
+>>\r
+>> emacs/notmuch-show.el | 10 +++++++++-\r
+>> 1 files changed, 9 insertions(+), 1 deletions(-)\r
+>>\r
+>> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+>> index 4d6c014..b7f64e3 100644\r
+>> --- a/emacs/notmuch-show.el\r
+>> +++ b/emacs/notmuch-show.el\r
+>> @@ -1378,6 +1378,10 @@ Some useful entries are:\r
+>> (notmuch-show-move-to-message-top)\r
+>> (get-text-property (point) :notmuch-message-properties)))\r
+>> \r
+>> +(defun notmuch-show-mode-get-message-properties ()\r
+>> + "Wrapper for notmuch-show-get-message-properties"\r
+>> + (notmuch-show-get-message-properties))\r
+>> +\r
+>> (defun notmuch-show-set-prop (prop val &optional props)\r
+>> (let ((inhibit-read-only t)\r
+>> (props (or props\r
+>> @@ -1385,9 +1389,13 @@ Some useful entries are:\r
+>> (plist-put props prop val)\r
+>> (notmuch-show-set-message-properties props)))\r
+>> \r
+>> +(defun notmuch-pick-get-message-properties ())\r
+>> +\r
+>> (defun notmuch-show-get-prop (prop &optional props)\r
+>> (let ((props (or props\r
+>> - (notmuch-show-get-message-properties))))\r
+>> + (if (eq major-mode 'notmuch-show-mode)\r
+>> + (notmuch-show-get-message-properties)\r
+>> + (notmuch-pick-get-message-properties)))))\r
+>> (plist-get props prop)))\r
+>> \r
+>> (defun notmuch-show-get-message-id (&optional bare)\r
+>> -- \r
+>> 1.7.9.1\r