From 79caaaeadf15c916028773176eb8e7789124f30f Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Mon, 16 Jul 2012 14:00:57 +2000 Subject: [PATCH] Re: [PATCH v3 0/8] emacs: JSON-based search cleanups --- 6b/15811651ff5a5ba980c2b707311b99d50f251f | 112 ++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 6b/15811651ff5a5ba980c2b707311b99d50f251f diff --git a/6b/15811651ff5a5ba980c2b707311b99d50f251f b/6b/15811651ff5a5ba980c2b707311b99d50f251f new file mode 100644 index 000000000..e111b7c91 --- /dev/null +++ b/6b/15811651ff5a5ba980c2b707311b99d50f251f @@ -0,0 +1,112 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id DB23E431FCB + for ; Sun, 15 Jul 2012 11:01:03 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id s1PQRv7jBAGC for ; + Sun, 15 Jul 2012 11:01:03 -0700 (PDT) +Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU + [18.7.68.34]) + by olra.theworths.org (Postfix) with ESMTP id 3A5C1431FBC + for ; Sun, 15 Jul 2012 11:01:03 -0700 (PDT) +X-AuditID: 12074422-b7f1f6d00000090b-46-5003055cb924 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP + id 6A.0B.02315.C5503005; Sun, 15 Jul 2012 14:01:00 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q6FI0xK0012943; + Sun, 15 Jul 2012 14:00:59 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6FI0vs2027633 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Sun, 15 Jul 2012 14:00:58 -0400 (EDT) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1SqT7p-00073S-9H; Sun, 15 Jul 2012 14:00:57 -0400 +From: Austin Clements +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH v3 0/8] emacs: JSON-based search cleanups +In-Reply-To: <87a9z1at22.fsf@qmul.ac.uk> +References: <1342140319-19859-1-git-send-email-amdragon@mit.edu> + <1342306940-7499-1-git-send-email-amdragon@mit.edu> + <87a9z1at22.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.13.2+59~g78b98ba (http://notmuchmail.org) Emacs/23.3.1 + (i486-pc-linux-gnu) +Date: Sun, 15 Jul 2012 14:00:57 -0400 +Message-ID: <87ipdorjja.fsf@awakening.csail.mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFvrEIsWRmVeSWpSXmKPExsUixG6nrhvDyhxgsL1X0mLPPi+L1XN5LK7f + nMnswOxx9zSXx85Zd9k9nq26xRzAHMVlk5Kak1mWWqRvl8CVcWvlKvaC/fwVq9+/Zm5gvMfT + xcjJISFgInGw9zwzhC0mceHeerYuRi4OIYF9jBJrZsxghXA2MErMmnePCcI5ySTxu28KVNkS + RomFZ24zgvSzCWhIbNu/HMwWEXCVePrtM9hcZgE5ia9TF7J0MXJwCAvYSrTvrAMxOYHKWy6a + Q4yZwCjxd8tbdpC4qECCxMHjNSCdLAKqEksO94J18gJd+natBUiYV0BQ4uTMJywQw7Ukbvx7 + yTSBUXAWktQsJKkFjEyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdE31cjNL9FJTSjcxgoPWRWkH + 48+DSocYBTgYlXh4xcSYAoRYE8uKK3MPMUpyMCmJ8ir9AwrxJeWnVGYkFmfEF5XmpBYfYpTg + YFYS4eXeBpTjTUmsrEotyodJSXOwKInzXku56S8kkJ5YkpqdmlqQWgSTleHgUJLg3crCHCAk + WJSanlqRlplTgpBm4uAEGc4DNLwQpIa3uCAxtzgzHSJ/ilFRSpz3LEhCACSRUZoH1wtLKq8Y + xYFeEebdBVLFA0xIcN2vgAYzAQ22LAG5urgkESEl1cDoknbtDrNnxOVj8ff/mrW9SZIwb+q9 + 9j9ic2me1nmTPUGlFnmdJw9mOT597SYu3FPqVHGhJjhwZ7bbyU/5swPUCuol0w32rn4evoNZ + e/o8Bw1m1btmzWuFjLlOGAq3f/+xc/pvy8U/Gr//lshi2laxUcoxnjWKl3vTWaPbodPCDQMm + cDWxCiqxFGckGmoxFxUnAgDuw4RnBQMAAA== +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 15 Jul 2012 18:01:04 -0000 + +On Sun, 15 Jul 2012, Mark Walters wrote: +> On Sun, 15 Jul 2012, Austin Clements wrote: +>> This version swaps out the notmuch-search-do-results macro for a +>> higher-order function, notmuch-search-foreach-result. This requires +>> less squiting to understand and clearly distinguishes the arguments +>> passed in to the function from the arguments passed to the callback. +>> This version also updates the docstring for +>> notmuch-search-result-format to mention that multi-line result formats +>> work and how to enter them, and it adds a NEWS patch. +> +> Hello +> +> I am afraid I have found a minor (but reproducible) bug in the line +> re-drawing even with single line results. Find a search result with a +> partially elided author field and put the cursor after the ellipsis in +> that line. Then update the tags. The result gets redrawn with ellipsis +> written out in full. Re-redrawing with the cursor after the author field +> redraws the line with the keeping the ellipsis written out in full, +> whereas re-redrawing the line with cursor before the author field gets +> it written with the correct ellipsis. + +Arrrg, overlays. + +I can think of two ways to fix this. We could generate the author +elision overlays lazily (say, via jit-lock). This would have the added +benefit of eliminating what I think is the last quadratic factor in +building search buffers, but there are much easier ways to do that. Or, +I could scrap the insert-before-markers nonsense and manipulate point +directly in notmuch-search-update-result, with the caveat that the +little bit of support it had for doing sane things in some situations +involving save-excursions would be lost. Given that we never call +notmuch-search-update-result inside a save-excursion (precisely because +I couldn't reliably hit the narrow window of situations it could handle +when there were save-excursions involved), I'd lean toward the latter +option. -- 2.26.2