unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] vim: fix regex after "notmuch show" output change
@ 2012-03-22  4:31 Jakob
  2012-03-24  8:58 ` Tomi Ollila
  0 siblings, 1 reply; 8+ messages in thread
From: Jakob @ 2012-03-22  4:31 UTC (permalink / raw)
  To: notmuch

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':          '\fpart}'                   ,
         \ 'g:notmuch_show_marker_regexp':            '\f\\(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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] vim: fix regex after "notmuch show" output change
  2012-03-22  4:31 [PATCH] vim: fix regex after "notmuch show" output change Jakob
@ 2012-03-24  8:58 ` Tomi Ollila
  2012-03-25 19:07   ` Jakob
  0 siblings, 1 reply; 8+ messages in thread
From: Tomi Ollila @ 2012-03-24  8:58 UTC (permalink / raw)
  To: Jakob, notmuch

Jakob <jakob@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':          '\fpart}'                   ,
>          \ 'g:notmuch_show_marker_regexp':            '\f\\(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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] vim: fix regex after "notmuch show" output change
  2012-03-24  8:58 ` Tomi Ollila
@ 2012-03-25 19:07   ` Jakob
  2012-03-25 19:42     ` Tomi Ollila
  0 siblings, 1 reply; 8+ messages in thread
From: Jakob @ 2012-03-25 19:07 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

On Sat, 24 Mar 2012 10:58:59 +0200, Tomi Ollila <tomi.ollila@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] vim: fix regex after "notmuch show" output change
  2012-03-25 19:07   ` Jakob
@ 2012-03-25 19:42     ` Tomi Ollila
  2012-03-29 21:49       ` Jakob
  0 siblings, 1 reply; 8+ messages in thread
From: Tomi Ollila @ 2012-03-25 19:42 UTC (permalink / raw)
  To: Jakob, notmuch

Jakob <jakob@pipefour.org> writes:

> On Sat, 24 Mar 2012 10:58:59 +0200, Tomi Ollila <tomi.ollila@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] vim: fix regex after "notmuch show" output change
  2012-03-25 19:42     ` Tomi Ollila
@ 2012-03-29 21:49       ` Jakob
  2012-03-29 22:02         ` Jakob
  0 siblings, 1 reply; 8+ messages in thread
From: Jakob @ 2012-03-29 21:49 UTC (permalink / raw)
  To: Tomi Ollila; +Cc: notmuch

On Sun, 25 Mar 2012 22:42:53 +0300, Tomi Ollila <tomi.ollila@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] vim: fix regex after "notmuch show" output change
  2012-03-29 21:49       ` Jakob
@ 2012-03-29 22:02         ` Jakob
  2012-03-30  5:51           ` Tomi Ollila
  2012-04-21  2:22           ` Felipe Contreras
  0 siblings, 2 replies; 8+ messages in thread
From: Jakob @ 2012-03-29 22:02 UTC (permalink / raw)
  To: notmuch

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':          '\fpart}'                   ,
         \ 'g:notmuch_show_marker_regexp':            '\f\\(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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] vim: fix regex after "notmuch show" output change
  2012-03-29 22:02         ` Jakob
@ 2012-03-30  5:51           ` Tomi Ollila
  2012-04-21  2:22           ` Felipe Contreras
  1 sibling, 0 replies; 8+ messages in thread
From: Tomi Ollila @ 2012-03-30  5:51 UTC (permalink / raw)
  To: Jakob, notmuch

On Fri, Mar 30 2012, Jakob <jakob@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':          '\fpart}'                   ,
>          \ 'g:notmuch_show_marker_regexp':            '\f\\(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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] vim: fix regex after "notmuch show" output change
  2012-03-29 22:02         ` Jakob
  2012-03-30  5:51           ` Tomi Ollila
@ 2012-04-21  2:22           ` Felipe Contreras
  1 sibling, 0 replies; 8+ messages in thread
From: Felipe Contreras @ 2012-04-21  2:22 UTC (permalink / raw)
  To: Jakob; +Cc: notmuch

On Fri, Mar 30, 2012 at 1:02 AM, Jakob <jakob@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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-21  2:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-22  4:31 [PATCH] vim: fix regex after "notmuch show" output change Jakob
2012-03-24  8:58 ` Tomi Ollila
2012-03-25 19:07   ` Jakob
2012-03-25 19:42     ` Tomi Ollila
2012-03-29 21:49       ` Jakob
2012-03-29 22:02         ` Jakob
2012-03-30  5:51           ` Tomi Ollila
2012-04-21  2:22           ` Felipe Contreras

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).