Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 4b / b72348bc8ce2b4af1a17b75d1138dab759fde6
1 Return-Path: <amdragon@mit.edu>\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 62549431FD0\r
6         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 16:14:51 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id N0oI0dbJhi53 for <notmuch@notmuchmail.org>;\r
16         Sat, 17 Dec 2011 16:14:51 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU\r
18         [18.9.25.12])\r
19         by olra.theworths.org (Postfix) with ESMTP id CEEA9431FB6\r
20         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 16:14:50 -0800 (PST)\r
21 X-AuditID: 1209190c-b7fad6d000000920-b0-4eed307ab2f3\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
23         by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id B5.35.02336.A703DEE4; Sat, 17 Dec 2011 19:14:50 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id pBI0EnwG031589; \r
27         Sat, 17 Dec 2011 19:14:50 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBI0EmXI004513\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Sat, 17 Dec 2011 19:14:49 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1Rc4QB-0007Sx-NZ; Sat, 17 Dec 2011 19:16:07 -0500\r
37 Date: Sat, 17 Dec 2011 19:16:07 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
40 Subject: Re: [PATCH v3 4/4] emacs: do not call `notmuch-hello-mode' on update\r
41 Message-ID: <20111218001607.GL19427@mit.edu>\r
42 References: <1324095619-10870-1-git-send-email-dmitry.kurochkin@gmail.com>\r
43         <1324165154-5728-1-git-send-email-dmitry.kurochkin@gmail.com>\r
44         <1324165154-5728-5-git-send-email-dmitry.kurochkin@gmail.com>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=us-ascii\r
47 Content-Disposition: inline\r
48 In-Reply-To: <1324165154-5728-5-git-send-email-dmitry.kurochkin@gmail.com>\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)\r
50 X-Brightmail-Tracker:\r
51  H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT0a0yeOtn8GODnMXVrf3sFtdvzmR2\r
52         YPLYOesuu8ezVbeYA5iiuGxSUnMyy1KL9O0SuDK2fFrJWrCIv2LH1jmsDYwfubsY2TkkBEwk\r
53         rhh3MXICWWISF+6tZ+ti5OIQEtjHKLH+zhwWkISQwAZGiWmXoyASJ5kkds/6xwqRWMIoceBi\r
54         EojNIqAqsW1WFyOIzSagIbFt/3IwW0TAUOLWxVfMIDazgLTEt9/NTCC2sICvxPR9c9lBbF4B\r
55         HYl/v5+xQCw4xSixYMo+NoiEoMTJmU9YIJq1JG78ewnUzAE2aPk/DpAwp4CXxIbt/8Hmiwqo\r
56         SEw5uY1tAqPQLCTds5B0z0LoXsDIvIpRNiW3Sjc3MTOnODVZtzg5MS8vtUjXUC83s0QvNaV0\r
57         EyMopDkleXYwvjmodIhRgINRiYc3s/q1nxBrYllxZe4hRkkOJiVRXh/tt35CfEn5KZUZicUZ\r
58         8UWlOanFhxglOJiVRHjVwt/4CfGmJFZWpRblw6SkOViUxHmrdz30ExJITyxJzU5NLUgtgsnK\r
59         cHAoSfBO1wcaKliUmp5akZaZU4KQZuLgBBnOAzS8CaSGt7ggMbc4Mx0if4pRUUqcdz5IQgAk\r
60         kVGaB9cLSzmvGMWBXhHmbQep4gGmK7juV0CDmYAG9wWCXF1ckoiQkmpgXBehzmXTekthW0/g\r
61         HmHThM/vTiirr+CWCKsP65YOvTBt5UrJFY9MJdxXnNvQZFLSvFFGtKKopu7dmeDm+D2tCWlz\r
62         rvdcfzZrTvDyKUaV7tabFTW0vwnaz2o4GCMx5xGDrH3LBsuItQXMnbsWPwoTCGfP/NC3sUSR\r
63         /5nFl+uH9HboPnmz6LuVEktxRqKhFnNRcSIAZT8I8BQDAAA=\r
64 Cc: notmuch@notmuchmail.org\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Sun, 18 Dec 2011 00:14:51 -0000\r
78 \r
79 This series looks good to me.  Just one nit below.\r
80 \r
81 Quoth Dmitry Kurochkin on Dec 18 at  3:39 am:\r
82 > `notmuch-hello' should call `notmuch-hello-mode' function only when\r
83 > run for the first time.  But before the change, `notmuch-hello' used\r
84 > `kill-all-local-variables' to remove editable widgets fields.  This\r
85 > caused the major mode to be reset, and `notmuch-hello-mode' to be\r
86 > called every time.\r
87\r
88 > The patch manually deletes all editable widget fields and removes\r
89 > `kill-all-local-variables' call.\r
90 > ---\r
91 >  emacs/notmuch-hello.el |   10 ++++++----\r
92 >  test/emacs             |    1 -\r
93 >  2 files changed, 6 insertions(+), 5 deletions(-)\r
94\r
95 > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
96 > index ca3a381..c158e89 100644\r
97 > --- a/emacs/notmuch-hello.el\r
98 > +++ b/emacs/notmuch-hello.el\r
99 > @@ -403,11 +403,13 @@ Complete list of currently available key bindings:\r
100 >                    (progn\r
101 >                      (widget-forward 1)\r
102 >                      (widget-value (widget-at)))\r
103 > -                (error nil)))))\r
104 > +                (error nil))))\r
105 > +     (inhibit-read-only t))\r
106 >  \r
107 > -    (kill-all-local-variables)\r
108 > -    (let ((inhibit-read-only t))\r
109 > -      (erase-buffer))\r
110 > +    ;; delete all editable widget fields\r
111 \r
112 It would be good to explain why this is necessary, so future\r
113 generations of notmuchers aren't as confused as I was by why this\r
114 dance is needed.\r
115 \r
116 > +    (mapc 'widget-delete widget-field-list)\r
117 > +\r
118 > +    (erase-buffer)\r
119 >  \r
120 >      (unless (eq major-mode 'notmuch-hello-mode)\r
121 >        (notmuch-hello-mode))\r
122 > diff --git a/test/emacs b/test/emacs\r
123 > index b4c2444..dffad0f 100755\r
124 > --- a/test/emacs\r
125 > +++ b/test/emacs\r
126 > @@ -486,7 +486,6 @@ counter=$(test_emacs \\r
127 >  test_expect_equal "$counter" 1\r
128 >  \r
129 >  test_begin_subtest "notmuch-hello-mode hook is not called on updates"\r
130 > -test_subtest_known_broken\r
131 >  counter=$(test_emacs \\r
132 >      '(let ((notmuch-hello-mode-hook-counter 0))\r
133 >         (kill-buffer "*notmuch-hello*")\r