* [PATCH] Allow empty name for thread author with vim plugin
@ 2009-11-30 22:10 Jonathan McDowell
0 siblings, 0 replies; only message in thread
From: Jonathan McDowell @ 2009-11-30 22:10 UTC (permalink / raw)
To: Bart Trojanowski; +Cc: notmuch
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 <noodles@earth.li>
-----
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 [] [
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-11-30 22:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-30 22:10 [PATCH] Allow empty name for thread author with vim plugin Jonathan McDowell
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).