[notmuch] [PATCH] Allow empty name for thread author with vim plugin
authorJonathan McDowell <noodles@earth.li>
Mon, 30 Nov 2009 22:10:42 +0000 (22:10 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:47 +0000 (09:35 -0800)
71/326cd44d0b05431b9c2e84a2c67119a9948801 [new file with mode: 0644]

diff --git a/71/326cd44d0b05431b9c2e84a2c67119a9948801 b/71/326cd44d0b05431b9c2e84a2c67119a9948801
new file mode 100644 (file)
index 0000000..45ca5e4
--- /dev/null
@@ -0,0 +1,82 @@
+Return-Path: <noodles@earth.li>\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 945D5431FBC\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Nov 2009 14:10:47 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 k-m1DJ2O56PI for <notmuch@notmuchmail.org>;\r
+       Mon, 30 Nov 2009 14:10:46 -0800 (PST)\r
+Received: from mout.perfora.net (mout.perfora.net [74.208.4.194])\r
+       by olra.theworths.org (Postfix) with ESMTP id CF1B9431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 30 Nov 2009 14:10:46 -0800 (PST)\r
+Received: from the.earth.li (the.earth.li [217.147.81.2])\r
+       by mx.perfora.net (node=mxus2) with ESMTP (Nemesis)\r
+       id 0LiEbD-1NtqGD0nf1-00n0Vt for notmuch@notmuchmail.org;\r
+       Mon, 30 Nov 2009 17:10:46 -0500\r
+Received: from noodles by the.earth.li with local (Exim 4.69)\r
+       (envelope-from <noodles@earth.li>)\r
+       id 1NFESA-00021D-Rn; Mon, 30 Nov 2009 22:10:42 +0000\r
+Date: Mon, 30 Nov 2009 22:10:42 +0000\r
+From: Jonathan McDowell <noodles@earth.li>\r
+To: Bart Trojanowski <bart@jukie.net>\r
+Message-ID: <20091130221042.GZ15144@earth.li>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+User-Agent: Mutt/1.5.18 (2008-05-17)\r
+X-Mailman-Approved-At: Mon, 30 Nov 2009 23:41:13 -0800\r
+Cc: notmuch@notmuchmail.org\r
+Subject: [notmuch] [PATCH] Allow empty name for thread author with vim plugin\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\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: Mon, 30 Nov 2009 22:10:47 -0000\r
+\r
+Hi.\r
+\r
+I've been playing with notmuch + the vim plugin and been getting "ERROR\r
+PARSING" displayed. Turns out this is due to lines like:\r
+\r
+thread:55334d46382493cd49226a1a20ad335f   2000-11-20 [1/1] ; New Enquiry (inbox unread)\r
+\r
+where the author of the mail is empty. The simple patch below seems to\r
+make things happier for me.\r
+\r
+Signed-Off-By: Jonathan McDowell <noodles@earth.li>\r
+\r
+-----\r
+diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim\r
+index b415f50..728adaa 100644\r
+--- a/vim/plugin/notmuch.vim\r
++++ b/vim/plugin/notmuch.vim\r
+@@ -249,7 +249,7 @@ function! s:NM_cmd_search(words)\r
+         setlocal nowrap\r
+ endfunction\r
+ function! s:NM_cmd_search_fmtline(line)\r
+-        let m = matchlist(a:line, '^\(thread:\S\+\)\s\([^]]\+\]\) \([^;]\+\); \(.*\) (\([^(]*\))$')\r
++        let m = matchlist(a:line, '^\(thread:\S\+\)\s\([^]]\+\]\) \([^;]*\); \(.*\) (\([^(]*\))$')\r
+         if !len(m)\r
+                 return 'ERROR PARSING: ' . a:line\r
+         endif\r
+-----\r
+\r
+\r
+J.\r
+\r
+-- \r
+] http://www.earth.li/~noodles/ [] "Why 'maybe' for everything?" "I'm  [\r
+]  PGP/GPG Key @ the.earth.li   []        using fluffy logic."         [\r
+] via keyserver, web or email.  []                                     [\r
+] RSA: 4096/2DA8B985            []                                     [\r