RE: [Spam-verdenking][english 100%] RE: Reply all - issue
[notmuch-archives.git] / 97 / 4e168a31ae68fc1da60fe98a8bcea541823f70
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 0014F431FB6\r
6         for <notmuch@notmuchmail.org>; Sun,  2 Dec 2012 13:29:09 -0800 (PST)\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 GJ7fFLtFveeB for <notmuch@notmuchmail.org>;\r
18         Sun,  2 Dec 2012 13:29:09 -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 60BA6431FAE\r
23         for <notmuch@notmuchmail.org>; Sun,  2 Dec 2012 13:29:09 -0800 (PST)\r
24 Received: by mail-we0-f181.google.com with SMTP id t11so1042712wey.26\r
25         for <notmuch@notmuchmail.org>; Sun, 02 Dec 2012 13:29:08 -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;\r
28         bh=30BgykevuL32lyltuVomXx+LXtjE+eMSXP5aHfvR0PA=;\r
29         b=dOg57CoBpSSP+D9SMRQKHkvHEv7hRwouipFv1r5mMIYcJMOTLpWz17ikhtCjAQe82/\r
30         R54Lm9YUXx0oFj/gW1TzMQEDTGq+rFA8YF5TJle0ZP2JR8YidmuxsIHdAjTJi/VMMguJ\r
31         J4MVZ7loKeHWaQN1P9UY4Zd8LtVGXlZRB/4q3s6HPMosOY7GiOueZGbKPGVFqH4DarCE\r
32         NddpOL8B5Zut7kZ2xAwy7vbuN/a7TC09LOIkzIA/HRutY4wP3cyrnSUcbcED6KopwP0S\r
33         PSNbPF4bsrbzUldUfii1ZMorONJNUeHoRKLKD9WoN4gD8FQSKWVFJ/AmbP+UG2c51r1t\r
34         9Ijw==\r
35 Received: by 10.216.24.212 with SMTP id x62mr2440921wex.204.1354483747864;\r
36         Sun, 02 Dec 2012 13:29:07 -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 w5sm9677863wiz.10.2012.12.02.13.29.06\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sun, 02 Dec 2012 13:29:06 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [RFC PATCH] emacs: show: make show-get-message-prop usable from pick\r
44 Date: Sun,  2 Dec 2012 21:29:04 +0000\r
45 Message-Id: <1354483744-27541-1-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Sun, 02 Dec 2012 21:29:10 -0000\r
60 \r
61 Make notmuch-show-get-prop choose the get-message-properties routine\r
62 based on the major mode. This make it usable from notmuch-pick and\r
63 thus a large number of functions are usable directly from\r
64 notmuch-show.el and do not need to be reimplemented in pick.\r
65 ---\r
66 \r
67 With this change (and a corresponding very small change in pick) I can\r
68 use a large number of functions straight from show in pick-mode. The\r
69 only change they need is that when they get a message property (most\r
70 commonly the message-id) they use the correct routine. This makes the\r
71 choice of the routine based on the major-mode.\r
72 \r
73 It seems to work and could save quite a lot of code being essentially\r
74 duplicated. Would something like this be acceptable? Would it be way\r
75 too slow? Is there some much better way? Any comments (including "Just\r
76 don't do that") gratefully received.\r
77 \r
78 Best wishes\r
79 \r
80 Mark\r
81 \r
82 \r
83 \r
84  emacs/notmuch-show.el |    7 ++++++-\r
85  1 files changed, 6 insertions(+), 1 deletions(-)\r
86 \r
87 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
88 index 4d6c014..3e68871 100644\r
89 --- a/emacs/notmuch-show.el\r
90 +++ b/emacs/notmuch-show.el\r
91 @@ -1378,6 +1378,10 @@ Some useful entries are:\r
92      (notmuch-show-move-to-message-top)\r
93      (get-text-property (point) :notmuch-message-properties)))\r
94  \r
95 +(defun notmuch-show-mode-get-message-properties ()\r
96 +  "Wrapper for notmuch-show-get-message-properties"\r
97 +  (notmuch-show-get-message-properties))\r
98 +\r
99  (defun notmuch-show-set-prop (prop val &optional props)\r
100    (let ((inhibit-read-only t)\r
101         (props (or props\r
102 @@ -1387,7 +1391,8 @@ Some useful entries are:\r
103  \r
104  (defun notmuch-show-get-prop (prop &optional props)\r
105    (let ((props (or props\r
106 -                  (notmuch-show-get-message-properties))))\r
107 +                  (funcall (intern (concat (symbol-name major-mode)\r
108 +                                           "-get-message-properties"))))))\r
109      (plist-get props prop)))\r
110  \r
111  (defun notmuch-show-get-message-id (&optional bare)\r
112 -- \r
113 1.7.9.1\r
114 \r