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