Re: [PATCH v2 4/7] emacs: Use result text properties for search result iteration
authorAustin Clements <amdragon@MIT.EDU>
Sat, 14 Jul 2012 21:51:56 +0000 (17:51 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:19 +0000 (09:48 -0800)
52/525b22d9818b6b2542dfc1c4c17b9b1bf74598 [new file with mode: 0644]

diff --git a/52/525b22d9818b6b2542dfc1c4c17b9b1bf74598 b/52/525b22d9818b6b2542dfc1c4c17b9b1bf74598
new file mode 100644 (file)
index 0000000..9a5387a
--- /dev/null
@@ -0,0 +1,133 @@
+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 E26DC431FBD\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Jul 2012 14:51:59 -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 xFWcgx+RzJ9E for <notmuch@notmuchmail.org>;\r
+       Sat, 14 Jul 2012 14:51:59 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id 49F4A431FBC\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Jul 2012 14:51:59 -0700 (PDT)\r
+X-AuditID: 1209190e-b7fb56d0000008b2-cf-5001e9fe9459\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 23.66.02226.EF9E1005; Sat, 14 Jul 2012 17:51:58 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q6ELpw1E027764; \r
+       Sat, 14 Jul 2012 17:51:58 -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 q6ELpuFd003423\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sat, 14 Jul 2012 17:51:57 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1SqAFo-0003px-Ou; Sat, 14 Jul 2012 17:51:56 -0400\r
+Date: Sat, 14 Jul 2012 17:51:56 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>\r
+Subject: Re: [PATCH v2 4/7] emacs: Use result text properties for search\r
+       result iteration\r
+Message-ID: <20120714215156.GH31670@mit.edu>\r
+References: <1342140319-19859-1-git-send-email-amdragon@mit.edu>\r
+       <1342237406-32507-1-git-send-email-amdragon@mit.edu>\r
+       <1342237406-32507-5-git-send-email-amdragon@mit.edu>\r
+       <87d33yf8bi.fsf@servo.finestructure.net>\r
+       <20120714195003.GF31670@mit.edu>\r
+       <874npaqc60.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <874npaqc60.fsf@servo.finestructure.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpgleLIzCtJLcpLzFFi42IRYrdT0f33kjHAYPYhE4s9+7wsrt+cyezA\r
+       5HH3NJfHs1W3mAOYorhsUlJzMstSi/TtErgylsxpYS34LVCx5t4apgbGSbxdjBwcEgImErva\r
+       wroYOYFMMYkL99azdTFycQgJ7GOU2LBvJjuEs4FR4ue7/8wQzkkmiZVNDSwgLUICSxgllj3Q\r
+       BLFZBFQlZr2cwwZiswloSGzbv5wRxBYRMJPo+fIHzGYWkJb49ruZCcQWFoiW6OmdC1bPK6Aj\r
+       ceH/ZXaImcuZJFrOp0PEBSVOznzCAtGrJXHj30smkKtB5iz/xwES5hQwlZj4qAVsvKiAisSU\r
+       k9vYJjAKzULSPQtJ9yyE7gWMzKsYZVNyq3RzEzNzilOTdYuTE/PyUot0jfVyM0v0UlNKNzGC\r
+       AppTkm8H49eDSocYBTgYlXh4M/0ZAoRYE8uKK3MPMUpyMCmJ8l54zhggxJeUn1KZkVicEV9U\r
+       mpNafIhRgoNZSYSXvxMox5uSWFmVWpQPk5LmYFES572SctNfSCA9sSQ1OzW1ILUIJivDwaEk\r
+       wVsBjFwhwaLU9NSKtMycEoQ0EwcnyHAeoOGyIDW8xQWJucWZ6RD5U4yKUuK8RiAJAZBERmke\r
+       XC8s4bxiFAd6RZi3GKSKB5is4LpfAQ1mAho86+c/f6DBJYkIKakGRpZyu3eHuzfNr93aN+fl\r
+       U/Hw/Rfqc+QVo58dLnWdUFm3z143n+NPmIajwuLkeVaf5sqdaw7f8e3v5cU8hYdipweKis8M\r
+       XaQwnU/0Tw3jNRPud56Fx/eY5NuJlvw2tjFcNit76aqWKx5TfDZmKMtyxBRbvrwbwHj13DzF\r
+       Ixc1/339fuJeOveLeUosxRmJhlrMRcWJAAykmtITAwAA\r
+Cc: notmuch@notmuchmail.org\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: Sat, 14 Jul 2012 21:52:00 -0000\r
+\r
+Quoth Jameson Graef Rollins on Jul 14 at  2:13 pm:\r
+> On Sat, Jul 14 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> > That's strange.  What was the error?\r
+> >\r
+> > I've been testing with\r
+> >    (("date" . "%12s ")\r
+> >     ("count" . "%-7s ")\r
+> >     ("authors" . "%-20s ")\r
+> >     ("subject" . "\n%s ")\r
+> >     ("tags" . "(%s)"))\r
+> > But maybe there are other cases it doesn't handle correctly?\r
+> \r
+> Hrm.  The error was:\r
+> \r
+>   error in process filter: wrong type argument: wholenump, -13\r
+> \r
+> However, that's in my test emacs setup.  It works fine in my normal\r
+> emacs session.  Lets assume this is just a problem with my setup that\r
+> I'll look into.\r
+\r
+Interesting.  The "error in process filter" suggests that it is\r
+happening somewhere in the notmuch code under the search process\r
+filter, so it's probably some combination of something unusual in your\r
+environment and this patch.  If you M-x toggle-debug-on-error, will it\r
+drop you into the debugger when this happens?\r
+\r
+> The other problem I seem to be running into is that the\r
+> customize-variable interface definitely doesn't handle newlines very\r
+> well.  If I try to add a '\n' in the interface it gets escaped, so I end\r
+> up with:\r
+> \r
+>      ("subject" . "\\n%s ")\r
+> \r
+> If I add the '\n' manually in my config, notmuch-search then interprets\r
+> the string correctly and adds newlines to the search results, but then\r
+> the customize-variable interface interprets the newline and adds a\r
+> newline the string field that kind makes the interface a little weird.\r
+> Is there "proper" way to add a newline to a string value in the\r
+> customize-variable interface that I'm not aware of?\r
+\r
+I think this is just a sharp corner in customize and there's notmuch\r
+we can do about it.  I believe the "proper" way to enter the newline\r
+directly in customize is to hit C-q C-j (same way you get a raw\r
+newline in any other buffer).  Given that I wouldn't expect anyone to\r
+guess that, though, we could mention this in the defcustom's\r
+docstring.\r
+\r
+> In any event, this is in no way a blocker for this patch series.  This\r
+> is all totally tangential.  The patch series is great.\r
+> \r
+> jamie.\r