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 DB23E431FCB
\r
6 for <notmuch@notmuchmail.org>; Sun, 15 Jul 2012 11:01:03 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 s1PQRv7jBAGC for <notmuch@notmuchmail.org>;
\r
16 Sun, 15 Jul 2012 11:01:03 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 3A5C1431FBC
\r
20 for <notmuch@notmuchmail.org>; Sun, 15 Jul 2012 11:01:03 -0700 (PDT)
\r
21 X-AuditID: 12074422-b7f1f6d00000090b-46-5003055cb924
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 6A.0B.02315.C5503005; Sun, 15 Jul 2012 14:01:00 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q6FI0xK0012943;
\r
27 Sun, 15 Jul 2012 14:00:59 -0400
\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 q6FI0vs2027633
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Sun, 15 Jul 2012 14:00:58 -0400 (EDT)
\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 1SqT7p-00073S-9H; Sun, 15 Jul 2012 14:00:57 -0400
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
\r
39 Subject: Re: [PATCH v3 0/8] emacs: JSON-based search cleanups
\r
40 In-Reply-To: <87a9z1at22.fsf@qmul.ac.uk>
\r
41 References: <1342140319-19859-1-git-send-email-amdragon@mit.edu>
\r
42 <1342306940-7499-1-git-send-email-amdragon@mit.edu>
\r
43 <87a9z1at22.fsf@qmul.ac.uk>
\r
44 User-Agent: Notmuch/0.13.2+59~g78b98ba (http://notmuchmail.org) Emacs/23.3.1
\r
46 Date: Sun, 15 Jul 2012 14:00:57 -0400
\r
47 Message-ID: <87ipdorjja.fsf@awakening.csail.mit.edu>
\r
49 Content-Type: text/plain; charset=us-ascii
\r
50 X-Brightmail-Tracker:
\r
51 H4sIAAAAAAAAA+NgFvrEIsWRmVeSWpSXmKPExsUixG6nrhvDyhxgsL1X0mLPPi+L1XN5LK7f
\r
52 nMnswOxx9zSXx85Zd9k9nq26xRzAHMVlk5Kak1mWWqRvl8CVcWvlKvaC/fwVq9+/Zm5gvMfT
\r
53 xcjJISFgInGw9zwzhC0mceHeerYuRi4OIYF9jBJrZsxghXA2MErMmnePCcI5ySTxu28KVNkS
\r
54 RomFZ24zgvSzCWhIbNu/HMwWEXCVePrtM9hcZgE5ia9TF7J0MXJwCAvYSrTvrAMxOYHKWy6a
\r
55 Q4yZwCjxd8tbdpC4qECCxMHjNSCdLAKqEksO94J18gJd+natBUiYV0BQ4uTMJywQw7Ukbvx7
\r
56 yTSBUXAWktQsJKkFjEyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdE31cjNL9FJTSjcxgoPWRWkH
\r
57 48+DSocYBTgYlXh4xcSYAoRYE8uKK3MPMUpyMCmJ8ir9AwrxJeWnVGYkFmfEF5XmpBYfYpTg
\r
58 YFYS4eXeBpTjTUmsrEotyodJSXOwKInzXku56S8kkJ5YkpqdmlqQWgSTleHgUJLg3crCHCAk
\r
59 WJSanlqRlplTgpBm4uAEGc4DNLwQpIa3uCAxtzgzHSJ/ilFRSpz3LEhCACSRUZoH1wtLKq8Y
\r
60 xYFeEebdBVLFA0xIcN2vgAYzAQ22LAG5urgkESEl1cDoknbtDrNnxOVj8ff/mrW9SZIwb+q9
\r
61 9j9ic2me1nmTPUGlFnmdJw9mOT597SYu3FPqVHGhJjhwZ7bbyU/5swPUCuol0w32rn4evoNZ
\r
62 e/o8Bw1m1btmzWuFjLlOGAq3f/+xc/pvy8U/Gr//lshi2laxUcoxnjWKl3vTWaPbodPCDQMm
\r
63 cDWxCiqxFGckGmoxFxUnAgDuw4RnBQMAAA==
\r
64 X-BeenThere: notmuch@notmuchmail.org
\r
65 X-Mailman-Version: 2.1.13
\r
67 List-Id: "Use and development of the notmuch mail system."
\r
68 <notmuch.notmuchmail.org>
\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
72 List-Post: <mailto:notmuch@notmuchmail.org>
\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
75 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
76 X-List-Received-Date: Sun, 15 Jul 2012 18:01:04 -0000
\r
78 On Sun, 15 Jul 2012, Mark Walters <markwalters1009@gmail.com> wrote:
\r
79 > On Sun, 15 Jul 2012, Austin Clements <amdragon@MIT.EDU> wrote:
\r
80 >> This version swaps out the notmuch-search-do-results macro for a
\r
81 >> higher-order function, notmuch-search-foreach-result. This requires
\r
82 >> less squiting to understand and clearly distinguishes the arguments
\r
83 >> passed in to the function from the arguments passed to the callback.
\r
84 >> This version also updates the docstring for
\r
85 >> notmuch-search-result-format to mention that multi-line result formats
\r
86 >> work and how to enter them, and it adds a NEWS patch.
\r
90 > I am afraid I have found a minor (but reproducible) bug in the line
\r
91 > re-drawing even with single line results. Find a search result with a
\r
92 > partially elided author field and put the cursor after the ellipsis in
\r
93 > that line. Then update the tags. The result gets redrawn with ellipsis
\r
94 > written out in full. Re-redrawing with the cursor after the author field
\r
95 > redraws the line with the keeping the ellipsis written out in full,
\r
96 > whereas re-redrawing the line with cursor before the author field gets
\r
97 > it written with the correct ellipsis.
\r
101 I can think of two ways to fix this. We could generate the author
\r
102 elision overlays lazily (say, via jit-lock). This would have the added
\r
103 benefit of eliminating what I think is the last quadratic factor in
\r
104 building search buffers, but there are much easier ways to do that. Or,
\r
105 I could scrap the insert-before-markers nonsense and manipulate point
\r
106 directly in notmuch-search-update-result, with the caveat that the
\r
107 little bit of support it had for doing sane things in some situations
\r
108 involving save-excursions would be lost. Given that we never call
\r
109 notmuch-search-update-result inside a save-excursion (precisely because
\r
110 I couldn't reliably hit the narrow window of situations it could handle
\r
111 when there were save-excursions involved), I'd lean toward the latter
\r