Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / b6 / 5ae9d882d7fd69a9b4b2f4a5cc606e766630b1
1 Return-Path: <m.walters@qmul.ac.uk>\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 132E6431FAF\r
6         for <notmuch@notmuchmail.org>; Tue,  6 May 2014 00:27:44 -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.502\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.502 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 3mdqgK-iOZHB for <notmuch@notmuchmail.org>;\r
17         Tue,  6 May 2014 00:27:40 -0700 (PDT)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id DECA7431FAE\r
22         for <notmuch@notmuchmail.org>; Tue,  6 May 2014 00:27:39 -0700 (PDT)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1WhZm1-0007r6-6z; Tue, 06 May 2014 08:27:35 +0100\r
27 Received: from 92.40.112.41.threembb.co.uk ([92.40.112.41] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1WhZlz-0003yw-RN; Tue, 06 May 2014 08:26:45 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: David Edmondson <dme@dme.org>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH] emacs: put current query as default value\r
34         in      notmuch-read-query\r
35 In-Reply-To: <cunha53fm8v.fsf@hotblack-desiato.hh.sledj.net>\r
36 References: <1399133579-9106-1-git-send-email-markwalters1009@gmail.com>\r
37         <cunha53fm8v.fsf@hotblack-desiato.hh.sledj.net>\r
38 User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1\r
39         (x86_64-pc-linux-gnu)\r
40 Date: Tue, 06 May 2014 08:26:41 +0100\r
41 Message-ID: <874n134bbi.fsf@qmul.ac.uk>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=us-ascii\r
44 X-Sender-Host-Address: 92.40.112.41\r
45 X-QM-Geographic: According to ripencc,\r
46         this message was delivered by a machine in Britain (UK) (GB).\r
47 X-QM-SPAM-Info: Sender has good ham record.  :)\r
48 X-QM-Body-MD5: c5d35f0bd92d7a4b2b27f0ac4cb78817 (of first 20000 bytes)\r
49 X-SpamAssassin-Score: 0.0\r
50 X-SpamAssassin-SpamBar: /\r
51 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
52         determine if it is\r
53         spam. We require at least 5.0 points to mark a message as spam.\r
54         This message scored 0.0 points. Summary of the scoring: \r
55         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
56         provider *      (markwalters1009[at]gmail.com)\r
57 X-QM-Scan-Virus: ClamAV says the message is clean\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Tue, 06 May 2014 07:27:44 -0000\r
71 \r
72 \r
73 Hi\r
74 \r
75 On Tue, 06 May 2014, David Edmondson <dme@dme.org> wrote:\r
76 > On Sat, May 03 2014, Mark Walters wrote:\r
77 >> An alternative to putting the logic in notmuch-read-query would be to\r
78 >> store the query in a consistently named buffer local variable in all\r
79 >> the modes. If we want to show the actually run query in notmuch-show\r
80 >> above then this is probably the neatest solution.\r
81 >\r
82 > Could per-mode query functions not simply pass the default as an\r
83 > optional second argument to `notmuch-read-query'?\r
84 \r
85 They could but at the moment notmuch-search and notmuch-tree are both\r
86 bound in the global key map and they in turn call notmuch-read-query. \r
87 \r
88 I guess we could add an argument to notmuch-search and notmuch-tree\r
89 for the default argument (which they would pass to\r
90 notmuch-read-query). Then calling modes which know a search value\r
91 (show,search and tree) could override the global keymap (probably using\r
92 remap or something to mean that they keep any customised binding) to\r
93 link into something which passes the default value through.\r
94 \r
95 One variant which might be nicer than the current version would be to\r
96 have something like\r
97 (let ((current-query (case major-mode\r
98                            (notmuch-show-mode (notmuch-show-get-current-query))\r
99                            (notmuch-tree-mode (notmuch-tree-get-current-query))\r
100                            (notmuch-search-mode (notmuch-search-get-current-query))))))\r
101 \r
102 so at least all the logic for calculating the current query can live in\r
103 the relevant file.\r
104 \r
105 What do you think?\r
106 \r
107 Best wishes\r
108 \r
109 Mark\r
110 \r