Re: [PATCH] nmbug: allow excluded messages
David Bremnerwrites: > "W. Trevor King" writes: > >> On Sat, Oct 22, 2016 at 08:59:40AM +0100, Mark Walters wrote: >>> This makes nmbug work even if the notmuch mailing list messages are >>> excluded (i.e., have a tag in the excluded tags list). >>> … >>> (I think this is the only place it is needed, but I don't use nmbug >>> much so I haven't tested thoroughly.) >>> … >>> --- a/devel/nmbug/nmbug >>> +++ b/devel/nmbug/nmbug >>> @@ -580,7 +580,7 @@ def get_status(): >>> maybe_deleted = _diff_index(index=index, filter='D') >>> for id, tags in maybe_deleted.items(): >>> (_, stdout, stderr) = _spawn( >>> -args=['notmuch', 'search', '--output=files', >>> 'id:{0}'.format(id)], >>> +args=['notmuch', 'search', '--output=files', >>> '--exclude=false', 'id:{0}'.format(id)], >>> stdout=_subprocess.PIPE, >>> wait=True) >> >> Besides this call, we also use ‘notmuch search …’ in get_tags. We may >> need an --exclude=false there too to cover folks who exclude a tag >> used by nmbug. >> >> And ‘notmuch dump …’ doesn't appear to take an --exclude flag, >> although it's based on searching so I'm not sure why not. > > the exclude API is opt in, so the default is no excludes That was a bit terse, sorry. So the reason excludes don't matter for dump and restore is because the dump and restore code doesn't set any excludes. Trevor is probably correct about the other use of search also needing the same flag. I can also imagine someone with some non-notmuch-bug-tracking use of nmbug wanting to have that configurable, but I guess we could cross that bridge when we come to it. d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] nmbug: allow excluded messages
"W. Trevor King"writes: > On Sat, Oct 22, 2016 at 08:59:40AM +0100, Mark Walters wrote: >> This makes nmbug work even if the notmuch mailing list messages are >> excluded (i.e., have a tag in the excluded tags list). >> … >> (I think this is the only place it is needed, but I don't use nmbug >> much so I haven't tested thoroughly.) >> … >> --- a/devel/nmbug/nmbug >> +++ b/devel/nmbug/nmbug >> @@ -580,7 +580,7 @@ def get_status(): >> maybe_deleted = _diff_index(index=index, filter='D') >> for id, tags in maybe_deleted.items(): >> (_, stdout, stderr) = _spawn( >> -args=['notmuch', 'search', '--output=files', >> 'id:{0}'.format(id)], >> +args=['notmuch', 'search', '--output=files', '--exclude=false', >> 'id:{0}'.format(id)], >> stdout=_subprocess.PIPE, >> wait=True) > > Besides this call, we also use ‘notmuch search …’ in get_tags. We may > need an --exclude=false there too to cover folks who exclude a tag > used by nmbug. > > And ‘notmuch dump …’ doesn't appear to take an --exclude flag, > although it's based on searching so I'm not sure why not. the exclude API is opt in, so the default is no excludes ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] nmbug: allow excluded messages
On Sat, Oct 22, 2016 at 08:59:40AM +0100, Mark Walters wrote: > This makes nmbug work even if the notmuch mailing list messages are > excluded (i.e., have a tag in the excluded tags list). > … > (I think this is the only place it is needed, but I don't use nmbug > much so I haven't tested thoroughly.) > … > --- a/devel/nmbug/nmbug > +++ b/devel/nmbug/nmbug > @@ -580,7 +580,7 @@ def get_status(): > maybe_deleted = _diff_index(index=index, filter='D') > for id, tags in maybe_deleted.items(): > (_, stdout, stderr) = _spawn( > -args=['notmuch', 'search', '--output=files', > 'id:{0}'.format(id)], > +args=['notmuch', 'search', '--output=files', '--exclude=false', > 'id:{0}'.format(id)], > stdout=_subprocess.PIPE, > wait=True) Besides this call, we also use ‘notmuch search …’ in get_tags. We may need an --exclude=false there too to cover folks who exclude a tag used by nmbug. And ‘notmuch dump …’ doesn't appear to take an --exclude flag, although it's based on searching so I'm not sure why not. Anyhow, the idea looks good to me. I'm just not clear enough on exclude handling to know if this patch sufficiently covers it. Cheers, Trevor -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy signature.asc Description: OpenPGP digital signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] nmbug: allow excluded messages
On Sat, Oct 22 2016, Mark Walterswrote: > This makes nmbug work even if the notmuch mailing list messages are > excluded (i.e., have a tag in the excluded tags list). > --- > > I keep all my mailing list emails under an excluded tag (initially > this was to test the exclude code thoroughly, but I find it convenient > to keep day to day email and mailing list email separate). However, > this confuses nmbug -- would the following patch be acceptable? +1 Tomi > > (I think this is the only place it is needed, but I don't use nmbug > much so I haven't tested thoroughly.) > > Best wishes > > Mark > > devel/nmbug/nmbug | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug > index 6febf16..dc565c4 100755 > --- a/devel/nmbug/nmbug > +++ b/devel/nmbug/nmbug > @@ -580,7 +580,7 @@ def get_status(): > maybe_deleted = _diff_index(index=index, filter='D') > for id, tags in maybe_deleted.items(): > (_, stdout, stderr) = _spawn( > -args=['notmuch', 'search', '--output=files', > 'id:{0}'.format(id)], > +args=['notmuch', 'search', '--output=files', '--exclude=false', > 'id:{0}'.format(id)], > stdout=_subprocess.PIPE, > wait=True) > if stdout: > -- > 2.1.4 > > ___ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] nmbug: allow excluded messages
Mark Walterswrites: > This makes nmbug work even if the notmuch mailing list messages are > excluded (i.e., have a tag in the excluded tags list). > --- > > I keep all my mailing list emails under an excluded tag (initially > this was to test the exclude code thoroughly, but I find it convenient > to keep day to day email and mailing list email separate). However, > this confuses nmbug -- would the following patch be acceptable? > > (I think this is the only place it is needed, but I don't use nmbug > much so I haven't tested thoroughly.) No objections from me. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] nmbug: allow excluded messages
This makes nmbug work even if the notmuch mailing list messages are excluded (i.e., have a tag in the excluded tags list). --- I keep all my mailing list emails under an excluded tag (initially this was to test the exclude code thoroughly, but I find it convenient to keep day to day email and mailing list email separate). However, this confuses nmbug -- would the following patch be acceptable? (I think this is the only place it is needed, but I don't use nmbug much so I haven't tested thoroughly.) Best wishes Mark devel/nmbug/nmbug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug index 6febf16..dc565c4 100755 --- a/devel/nmbug/nmbug +++ b/devel/nmbug/nmbug @@ -580,7 +580,7 @@ def get_status(): maybe_deleted = _diff_index(index=index, filter='D') for id, tags in maybe_deleted.items(): (_, stdout, stderr) = _spawn( -args=['notmuch', 'search', '--output=files', 'id:{0}'.format(id)], +args=['notmuch', 'search', '--output=files', '--exclude=false', 'id:{0}'.format(id)], stdout=_subprocess.PIPE, wait=True) if stdout: -- 2.1.4 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch