Re: [PATCH v3 0/8] emacs: JSON-based search cleanups
authorAustin Clements <amdragon@MIT.EDU>
Sun, 15 Jul 2012 18:00:57 +0000 (14:00 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:20 +0000 (09:48 -0800)
6b/15811651ff5a5ba980c2b707311b99d50f251f [new file with mode: 0644]

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