[PATCH] vim: fix regex after "notmuch show" output change
On Fri, Mar 30, 2012 at 1:02 AM, Jakob wrote: > The new field "excluded" was added to the output and made this regex fail. > --- > ?vim/plugin/notmuch.vim | ? ?5 +++-- > ?1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim > index 21985c7..8f27fb9 100644 > --- a/vim/plugin/notmuch.vim > +++ b/vim/plugin/notmuch.vim > @@ -48,7 +48,7 @@ let s:notmuch_defaults = { > ? ? ? ? \ 'g:notmuch_show_part_end_regexp': ? ? ? ? ?' part}' ? ? ? ? ? ? ? ? > ? , > ? ? ? ? \ 'g:notmuch_show_marker_regexp': ? ? ? ? ? ?' > \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', > ? ? ? ? \ > - ? ? ? ?\ 'g:notmuch_show_message_parse_regexp': ? ? '\(id:[^ ]*\) > depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', > + ? ? ? ?\ 'g:notmuch_show_message_parse_regexp': ? ? '\(id:[^ ]*\) > depth:\([0-9]*\) match:\([0-9]*\) excluded:\([0-9]*\) filename:\(.*\)$', > ? ? ? ? \ 'g:notmuch_show_tags_regexp': ? ? ? ? ? ? ?'(\([^)]*\))$' ? ? ? ? ? > ? ? , > ? ? ? ? \ > ? ? ? ? \ 'g:notmuch_show_signature_regexp': ? ? ? ? '^\(-- \?\|_\+\)$' ? ? ? > ? ? , > @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? let msg['id'] = m[1] > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? let msg['depth'] = m[2] > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? let msg['match'] = m[3] > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?let msg['filename'] = m[4] > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?let msg['excluded'] = m[4] > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?let msg['filename'] = m[5] > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? endif > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? let in_message = 1 > -- Thanks. Pushed. -- Felipe Contreras
Re: [PATCH] vim: fix regex after notmuch show output change
On Fri, Mar 30, 2012 at 1:02 AM, Jakob ja...@pipefour.org wrote: The new field excluded was added to the output and made this regex fail. --- vim/plugin/notmuch.vim | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 21985c7..8f27fb9 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -48,7 +48,7 @@ let s:notmuch_defaults = { \ 'g:notmuch_show_part_end_regexp': ' part}' , \ 'g:notmuch_show_marker_regexp': ' \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', \ - \ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', + \ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) excluded:\([0-9]*\) filename:\(.*\)$', \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' , \ \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' , @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) let msg['id'] = m[1] let msg['depth'] = m[2] let msg['match'] = m[3] - let msg['filename'] = m[4] + let msg['excluded'] = m[4] + let msg['filename'] = m[5] endif let in_message = 1 -- Thanks. Pushed. -- Felipe Contreras ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] vim: fix regex after "notmuch show" output change
On Fri, Mar 30 2012, Jakob wrote: > The new field "excluded" was added to the output and made this regex fail. > --- LGTM. Tomi > vim/plugin/notmuch.vim |5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim > index 21985c7..8f27fb9 100644 > --- a/vim/plugin/notmuch.vim > +++ b/vim/plugin/notmuch.vim > @@ -48,7 +48,7 @@ let s:notmuch_defaults = { > \ 'g:notmuch_show_part_end_regexp': 'part}' >, > \ 'g:notmuch_show_marker_regexp':' > \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', > \ > -\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) > depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', > +\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) > depth:\([0-9]*\) match:\([0-9]*\) excluded:\([0-9]*\) filename:\(.*\)$', > \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' > , > \ > \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' > , > @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) > let msg['id'] = m[1] > let msg['depth'] = m[2] > let msg['match'] = m[3] > -let msg['filename'] = m[4] > +let msg['excluded'] = m[4] > +let msg['filename'] = m[5] > endif > > let in_message = 1 > -- > 1.7.9.1 > > ___ > notmuch mailing list > notmuch at notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] vim: fix regex after "notmuch show" output change
The new field "excluded" was added to the output and made this regex fail. --- vim/plugin/notmuch.vim |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 21985c7..8f27fb9 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -48,7 +48,7 @@ let s:notmuch_defaults = { \ 'g:notmuch_show_part_end_regexp': 'part}' , \ 'g:notmuch_show_marker_regexp':' \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', \ -\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', +\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) excluded:\([0-9]*\) filename:\(.*\)$', \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' , \ \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' , @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) let msg['id'] = m[1] let msg['depth'] = m[2] let msg['match'] = m[3] -let msg['filename'] = m[4] +let msg['excluded'] = m[4] +let msg['filename'] = m[5] endif let in_message = 1 -- 1.7.9.1
[PATCH] vim: fix regex after "notmuch show" output change
On Sun, 25 Mar 2012 22:42:53 +0300, Tomi Ollila wrote: > I meant about the syntax: \([[0-9]*\) i.e. 2 opening [[:s Good eye! The regex worked, but I guess I was matching digits /and/ open-brackets. I'll fix that. Thanks, Jakob
Re: [PATCH] vim: fix regex after notmuch show output change
On Sun, 25 Mar 2012 22:42:53 +0300, Tomi Ollila tomi.oll...@iki.fi wrote: I meant about the syntax: \([[0-9]*\) i.e. 2 opening [[:s Good eye! The regex worked, but I guess I was matching digits /and/ open-brackets. I'll fix that. Thanks, Jakob ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] vim: fix regex after notmuch show output change
The new field excluded was added to the output and made this regex fail. --- vim/plugin/notmuch.vim |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 21985c7..8f27fb9 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -48,7 +48,7 @@ let s:notmuch_defaults = { \ 'g:notmuch_show_part_end_regexp': 'part}' , \ 'g:notmuch_show_marker_regexp':' \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', \ -\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', +\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) excluded:\([0-9]*\) filename:\(.*\)$', \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' , \ \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' , @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) let msg['id'] = m[1] let msg['depth'] = m[2] let msg['match'] = m[3] -let msg['filename'] = m[4] +let msg['excluded'] = m[4] +let msg['filename'] = m[5] endif let in_message = 1 -- 1.7.9.1 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] vim: fix regex after notmuch show output change
On Fri, Mar 30 2012, Jakob ja...@pipefour.org wrote: The new field excluded was added to the output and made this regex fail. --- LGTM. Tomi vim/plugin/notmuch.vim |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 21985c7..8f27fb9 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -48,7 +48,7 @@ let s:notmuch_defaults = { \ 'g:notmuch_show_part_end_regexp': 'part}' , \ 'g:notmuch_show_marker_regexp':' \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', \ -\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', +\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) excluded:\([0-9]*\) filename:\(.*\)$', \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' , \ \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' , @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) let msg['id'] = m[1] let msg['depth'] = m[2] let msg['match'] = m[3] -let msg['filename'] = m[4] +let msg['excluded'] = m[4] +let msg['filename'] = m[5] endif let in_message = 1 -- 1.7.9.1 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] vim: fix regex after "notmuch show" output change
Jakob writes: > On Sat, 24 Mar 2012 10:58:59 +0200, Tomi Ollila wrote: >> Is this regexp part below good ? >> >> > +... match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', ... >> >> ( --> excluded:\([[0-9]*\) <-- ) > > Yeah, that was the core of the change. With this new field in the > output, the old regex didn't match at all. You can see the fix working by > trying to use the vim plugin as-is and trying to reply to a message or > view a message's ID or any number of other things that fail right now. > After updating this regex, everything starts working again. I meant about the syntax: \([[0-9]*\) i.e. 2 opening [[:s > > Thanks, > Jakob Tomi
[PATCH] vim: fix regex after "notmuch show" output change
On Sat, 24 Mar 2012 10:58:59 +0200, Tomi Ollila wrote: > Is this regexp part below good ? > > > +... match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', ... > > ( --> excluded:\([[0-9]*\) <-- ) Yeah, that was the core of the change. With this new field in the output, the old regex didn't match at all. You can see the fix working by trying to use the vim plugin as-is and trying to reply to a message or view a message's ID or any number of other things that fail right now. After updating this regex, everything starts working again. Thanks, Jakob
Re: [PATCH] vim: fix regex after notmuch show output change
On Sat, 24 Mar 2012 10:58:59 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: Is this regexp part below good ? +... match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', ... ( -- excluded:\([[0-9]*\) -- ) Yeah, that was the core of the change. With this new field in the output, the old regex didn't match at all. You can see the fix working by trying to use the vim plugin as-is and trying to reply to a message or view a message's ID or any number of other things that fail right now. After updating this regex, everything starts working again. Thanks, Jakob ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] vim: fix regex after notmuch show output change
Jakob ja...@pipefour.org writes: On Sat, 24 Mar 2012 10:58:59 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: Is this regexp part below good ? +... match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', ... ( -- excluded:\([[0-9]*\) -- ) Yeah, that was the core of the change. With this new field in the output, the old regex didn't match at all. You can see the fix working by trying to use the vim plugin as-is and trying to reply to a message or view a message's ID or any number of other things that fail right now. After updating this regex, everything starts working again. I meant about the syntax: \([[0-9]*\) i.e. 2 opening [[:s Thanks, Jakob Tomi ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] vim: fix regex after "notmuch show" output change
Jakob writes: > The new field "excluded" was added to the output and made this regex fail. > --- Is this regexp part below good ? > +... match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', ... ( --> excluded:\([[0-9]*\) <-- ) Otherwise lookg good (I think). Tomi > vim/plugin/notmuch.vim |5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim > index 21985c7..92e1b50 100644 > --- a/vim/plugin/notmuch.vim > +++ b/vim/plugin/notmuch.vim > @@ -48,7 +48,7 @@ let s:notmuch_defaults = { > \ 'g:notmuch_show_part_end_regexp': 'part}' >, > \ 'g:notmuch_show_marker_regexp':' > \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', > \ > -\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) > depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', > +\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) > depth:\([0-9]*\) match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', > \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' > , > \ > \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' > , > @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) > let msg['id'] = m[1] > let msg['depth'] = m[2] > let msg['match'] = m[3] > -let msg['filename'] = m[4] > +let msg['excluded'] = m[4] > +let msg['filename'] = m[5] > endif > > let in_message = 1 > -- > 1.7.9.1 > > ___ > notmuch mailing list > notmuch at notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] vim: fix regex after notmuch show output change
Jakob ja...@pipefour.org writes: The new field excluded was added to the output and made this regex fail. --- Is this regexp part below good ? +... match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', ... ( -- excluded:\([[0-9]*\) -- ) Otherwise lookg good (I think). Tomi vim/plugin/notmuch.vim |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 21985c7..92e1b50 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -48,7 +48,7 @@ let s:notmuch_defaults = { \ 'g:notmuch_show_part_end_regexp': 'part}' , \ 'g:notmuch_show_marker_regexp':' \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', \ -\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', +\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' , \ \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' , @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) let msg['id'] = m[1] let msg['depth'] = m[2] let msg['match'] = m[3] -let msg['filename'] = m[4] +let msg['excluded'] = m[4] +let msg['filename'] = m[5] endif let in_message = 1 -- 1.7.9.1 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] vim: fix regex after "notmuch show" output change
The new field "excluded" was added to the output and made this regex fail. --- vim/plugin/notmuch.vim |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 21985c7..92e1b50 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -48,7 +48,7 @@ let s:notmuch_defaults = { \ 'g:notmuch_show_part_end_regexp': 'part}' , \ 'g:notmuch_show_marker_regexp':' \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', \ -\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', +\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' , \ \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' , @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) let msg['id'] = m[1] let msg['depth'] = m[2] let msg['match'] = m[3] -let msg['filename'] = m[4] +let msg['excluded'] = m[4] +let msg['filename'] = m[5] endif let in_message = 1 -- 1.7.9.1
[PATCH] vim: fix regex after notmuch show output change
The new field excluded was added to the output and made this regex fail. --- vim/plugin/notmuch.vim |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 21985c7..92e1b50 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -48,7 +48,7 @@ let s:notmuch_defaults = { \ 'g:notmuch_show_part_end_regexp': 'part}' , \ 'g:notmuch_show_marker_regexp':' \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$', \ -\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) filename:\(.*\)$', +\ 'g:notmuch_show_message_parse_regexp': '\(id:[^ ]*\) depth:\([0-9]*\) match:\([0-9]*\) excluded:\([[0-9]*\) filename:\(.*\)$', \ 'g:notmuch_show_tags_regexp': '(\([^)]*\))$' , \ \ 'g:notmuch_show_signature_regexp': '^\(-- \?\|_\+\)$' , @@ -870,7 +870,8 @@ function! s:NM_cmd_show_parse(inlines) let msg['id'] = m[1] let msg['depth'] = m[2] let msg['match'] = m[3] -let msg['filename'] = m[4] +let msg['excluded'] = m[4] +let msg['filename'] = m[5] endif let in_message = 1 -- 1.7.9.1 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch