Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 42 / 4f1f7a4842575a25c62950386713eb1c879421
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 4785341ED7D\r
6         for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 20:43: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.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 Pifu7UV9qry5 for <notmuch@notmuchmail.org>;\r
16         Fri, 13 Jul 2012 20:43:43 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
18         [18.9.25.14])\r
19         by olra.theworths.org (Postfix) with ESMTP id 0FF3842117A\r
20         for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 20:43:39 -0700 (PDT)\r
21 X-AuditID: 1209190e-b7fb56d0000008b2-57-5000eaeb5c98\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
23         by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 5B.44.02226.BEAE0005; Fri, 13 Jul 2012 23:43:39 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q6E3hct1029856; \r
27         Fri, 13 Jul 2012 23:43:38 -0400\r
28 Received: from drake.dyndns.org\r
29         (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
30         [209.6.116.242]) (authenticated bits=0)\r
31         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
32         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6E3haXi021322\r
33         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
34         Fri, 13 Jul 2012 23:43:38 -0400 (EDT)\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
36         (envelope-from <amdragon@mit.edu>)\r
37         id 1SptGa-0000Zt-Iq; Fri, 13 Jul 2012 23:43:36 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH v2 0/7] emacs: JSON-based search cleanups\r
41 Date: Fri, 13 Jul 2012 23:43:19 -0400\r
42 Message-Id: <1342237406-32507-1-git-send-email-amdragon@mit.edu>\r
43 X-Mailer: git-send-email 1.7.10\r
44 In-Reply-To: <1342140319-19859-1-git-send-email-amdragon@mit.edu>\r
45 References: <1342140319-19859-1-git-send-email-amdragon@mit.edu>\r
46 X-Brightmail-Tracker:\r
47  H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixCmqrPv6FUOAwcUpnBar5/JYXL85k9mB\r
48         yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgyrjyZT9LwQb+ipbXZxgbGA/ydDFyckgImEi0\r
49         XHzAAmGLSVy4t56ti5GLQ0hgH6PEj2MHmSGcDYwSG7rXMEI4j5gkGg9eZYdw5jJKrF6xmRmk\r
50         n01AQ2Lb/uWMILaIgLTEzruzWUFsZgFZiR/n/4DZwgKWEtemHmIHsVkEVCUat5wH6+UVcJDY\r
51         cqWbEeIOeYmn9/vYQGxOAUeJDV8ugPUKAdU0HpvJPIGRfwEjwypG2ZTcKt3cxMyc4tRk3eLk\r
52         xLy81CJdY73czBK91JTSTYzgUJLk28H49aDSIUYBDkYlHt5Mf4YAIdbEsuLK3EOMkhxMSqK8\r
53         vMBAFOJLyk+pzEgszogvKs1JLT7EKMHBrCTCa94GlONNSaysSi3Kh0lJc7AoifNeSbnpLySQ\r
54         nliSmp2aWpBaBJOV4eBQkuDtARkqWJSanlqRlplTgpBm4uAEGc4DNHwySA1vcUFibnFmOkT+\r
55         FKOilDhvAUhCACSRUZoH1wuL9VeM4kCvCPNWglTxANMEXPcroMFMQINn/fznDzS4JBEhJdXA\r
56         WJ2rmVu2zSSe7VB+UfyDJS+VH7oVaey+em4Tp+5yjl7+1EWzDC7/Wfj2YkDUlVJbk/rNU/fo\r
57         ZL9f/623d23u2aRJO1d/XLvWbMaPDSuen5172Sfsueea09feNm10OhN3tHSW8J3+dvWX5myi\r
58         isvMzi5ZvD7w1xTmM61xTHVsPb3Pr39MDvh8vUOJpTgj0VCLuag4EQATnypY0AIAAA==\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.13\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63         <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Sat, 14 Jul 2012 03:43:44 -0000\r
72 \r
73 This version updates the docstrings for notmuch-search-update-result\r
74 and notmuch-search-show-result and fixes the scrolling artifact in\r
75 notmuch-search-update-result.  I also updated the commit message of\r
76 patch 7 to mention that it changes the behavior of\r
77 notmuch-search-previous-thread.\r
78 \r
79 The diff against v1 is below.\r
80 \r
81 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
82 index 2ece97d..7302fa7 100644\r
83 --- a/emacs/notmuch.el\r
84 +++ b/emacs/notmuch.el\r
85 @@ -583,10 +583,12 @@ This function advances the next thread when finished."\r
86    (notmuch-search-next-thread))\r
87  \r
88  (defun notmuch-search-update-result (result &optional pos)\r
89 -  "Update the result object of the current thread and redraw it."\r
90 +  "Replace the result object of the thread at POS (or point) by\r
91 +RESULT and redraw it."\r
92    (let ((start (notmuch-search-result-beginning pos))\r
93         (end (notmuch-search-result-end pos))\r
94         (init-point (point))\r
95 +       (init-start (window-start))\r
96         (inhibit-read-only t))\r
97      ;; Delete the current thread\r
98      (delete-region start end)\r
99 @@ -603,7 +605,9 @@ This function advances the next thread when finished."\r
100              (new-point (if (= init-point end)\r
101                             new-end\r
102                           (min init-point (- new-end 1)))))\r
103 -       (insert-before-markers (delete-and-extract-region start new-point))))))\r
104 +       (insert-before-markers (delete-and-extract-region start new-point))))\r
105 +    ;; We also may have shifted the window scroll.  Fix it.\r
106 +    (set-window-start (selected-window) init-start)))\r
107  \r
108  (defun notmuch-search-process-sentinel (proc msg)\r
109    "Add a message to let user know when \"notmuch search\" exits"\r
110 @@ -766,6 +770,7 @@ non-authors is found, assume that all of the authors match."\r
111                           'face 'notmuch-tag-face))))))\r
112  \r
113  (defun notmuch-search-show-result (result &optional pos)\r
114 +  "Insert RESULT at POS or the end of the buffer if POS is null."\r
115    ;; Ignore excluded matches\r
116    (unless (= (plist-get result :matched) 0)\r
117      (let ((beg (or pos (point-max))))\r
118 \r