Re: Bug? notmuch-emacs: "All tags" in notmuch-hello does not show all tags

2022-01-20 Thread David Bremner
Tomi Ollila  writes:

> On Sun, Apr 22 2018, Gregor Zattler wrote:
>
>> Hi Tomi, notmuch-emacs developers,
>> * Tomi Ollila  [2018-04-21; 20:38]:
>> [...]
>>> That doesn't mean there could not be a bug there, just
>>> that I cannot reproduce it...
>>
>> Thanks for your investigation.
>>
>> I now prepared a minimal example, please extract the archive in
>> /tmp.  It contains a quite minmalistic .notmuch-config, a Maildir
>> with one email and a test script which runs notmuch new, notmuch
>> tag, starts emacs with no configuration and hopefully shows
>> notmuch-hello.[1] Please klick on "show", you'll see only one
>> tag: "spam", klick on "spam" you'll see this one email shown with
>> its four (!) tags: "inbox", "new" and "certaintag" are not shown
>> in "All tags".
>>
>> At least this is what I see with emacs25 and emacs27 and current
>> notmuch.
>>
>> Do you see the same?
>
>
> Yes, I can reproduce -- only "spam" is seen
>
> To look what happened I ran (in notmuch source dir):
>
> $ NOTMUCH_CONFIG=/tmp/.notmuch-config strace -f -e trace=execve,read,write -o 
> ttt ./devel/try-emacs-mua -Q
>
> based on that output:
>
> $ NOTMUCH_CONFIG=/tmp/.notmuch-config notmuch search --output=tags '*'
> certaintag
> inbox
> new
> spam
>
> $ NOTMUCH_CONFIG=/tmp/.notmuch-config notmuch count --batch
> tag:certaintag
> 0
> tag:new
> 0
> tag:spam
> 1
> tag:inbox
> 0
> tag:foobar
> 0
>
> NOTMUCH_CONFIG=/tmp/.notmuch-config notmuch count --batch --exclude=false
> tag:certaintag
> 1
> tag:new
> 1
> tag:spam
> 1
> tag:inbox
> 1
>
> 1
> tag:foobar
> 0
>
> So, currently, whenever count is zero, the tag is now shown in all tags
> listing (but we know we have the tag since queried earlier). But, at least
> in this case we should get real count and have that '--exclude=false' there,
> and then the count is always positive number.
>
> At least some SMOP is required to get this fixed.
>
> Tomi

This bug should be fixed in commit

 cc180507b03d9826c92d48ee91dbd9bb5f15cd56

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Bug? notmuch-emacs: "All tags" in notmuch-hello does not show all tags

2018-04-22 Thread Tomi Ollila
On Sun, Apr 22 2018, Gregor Zattler wrote:

> Hi Tomi, notmuch-emacs developers,
> * Tomi Ollila  [2018-04-21; 20:38]:
> [...]
>> That doesn't mean there could not be a bug there, just
>> that I cannot reproduce it...
>
> Thanks for your investigation.
>
> I now prepared a minimal example, please extract the archive in
> /tmp.  It contains a quite minmalistic .notmuch-config, a Maildir
> with one email and a test script which runs notmuch new, notmuch
> tag, starts emacs with no configuration and hopefully shows
> notmuch-hello.[1] Please klick on "show", you'll see only one
> tag: "spam", klick on "spam" you'll see this one email shown with
> its four (!) tags: "inbox", "new" and "certaintag" are not shown
> in "All tags".
>
> At least this is what I see with emacs25 and emacs27 and current
> notmuch.
>
> Do you see the same?


Yes, I can reproduce -- only "spam" is seen

To look what happened I ran (in notmuch source dir):

$ NOTMUCH_CONFIG=/tmp/.notmuch-config strace -f -e trace=execve,read,write -o 
ttt ./devel/try-emacs-mua -Q

based on that output:

$ NOTMUCH_CONFIG=/tmp/.notmuch-config notmuch search --output=tags '*'
certaintag
inbox
new
spam

$ NOTMUCH_CONFIG=/tmp/.notmuch-config notmuch count --batch
tag:certaintag
0
tag:new
0
tag:spam
1
tag:inbox
0
tag:foobar
0

NOTMUCH_CONFIG=/tmp/.notmuch-config notmuch count --batch --exclude=false
tag:certaintag
1
tag:new
1
tag:spam
1
tag:inbox
1

1
tag:foobar
0

So, currently, whenever count is zero, the tag is now shown in all tags
listing (but we know we have the tag since queried earlier). But, at least
in this case we should get real count and have that '--exclude=false' there,
and then the count is always positive number.

At least some SMOP is required to get this fixed.

Tomi

>
>
> Thanks for investing time in this issue.  Regards, gregor
>
> [1] The script tries to guess your notmuch/emacs source path as
> load-path for emacs.  If this fails please edit the emacs
> invocation according to your local setup
> [database]
> path=/tmp/Mail
>
> [user]
> name=Test User
> primary_email=t...@example.org
> other_email=
>
> [new]
> tags=new;unread;inbox;
>
> [search]
> exclude_tags=deleted;spam;
>
> [maildir]
> synchronize_flags=true
>
> From: t...@example.org
> To: t...@example.org
> Subject: test single tag and tag +spam
> Message-ID: 
>
> Look an email!
> #!/bin/bash
>
> export NOTMUCH_CONFIG=/tmp/.notmuch-config
> notmuch new
> notmuch tag +spam +certaintag -- mid:tes...@example.com
> emacs -L "$(locate notmuch/emacs/notmuch.el | head -n 1 | sed -e 
> 's/notmuch.el//')" -Q --eval "(require 'notmuch)" -f notmuch-hello
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug? notmuch-emacs: "All tags" in notmuch-hello does not show all tags

2018-04-21 Thread Gregor Zattler
Hi Tomi, notmuch-emacs developers,
* Tomi Ollila  [2018-04-21; 20:38]:
[...]
> That doesn't mean there could not be a bug there, just
> that I cannot reproduce it...

Thanks for your investigation.

I now prepared a minimal example, please extract the archive in
/tmp.  It contains a quite minmalistic .notmuch-config, a Maildir
with one email and a test script which runs notmuch new, notmuch
tag, starts emacs with no configuration and hopefully shows
notmuch-hello.[1] Please klick on "show", you'll see only one
tag: "spam", klick on "spam" you'll see this one email shown with
its four (!) tags: "inbox", "new" and "certaintag" are not shown
in "All tags".

At least this is what I see with emacs25 and emacs27 and current
notmuch.

Do you see the same?


Thanks for investing time in this issue.  Regards, gregor

[1] The script tries to guess your notmuch/emacs source path as
load-path for emacs.  If this fails please edit the emacs
invocation according to your local setup


minimal-example.tar
Description: Unix tar archive
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Bug? notmuch-emacs: "All tags" in notmuch-hello does not show all tags

2018-04-21 Thread Tomi Ollila
On Fri, Apr 20 2018, Gregor Zattler wrote:

> Dear notmuch-emacs developers,
>
> I use a certain tag which until now is only used with regards to
> one single message which is also tagged "spam".  This certain tag
> is among the output of notmuch search --output=tags '*'
>
> The part of notmuch-hello which is supposed to show "All tags"
> does not show this certain tag.  But it shows the certain tag with
> count = 1 if I remove the tag "spam" from this message.  The same
> happens if this message is tagged "deleted" instead of "spam".
>
>
> My ~/.notmuch-config contains:
>
> [search]
> exclude_tags=deleted;spam;
>
>
> The relevant section of my customzation.el contains:
>
>  '(notmuch-hello-sections
>'(notmuch-hello-insert-search notmuch-hello-insert-saved-searches 
> notmuch-hello-insert-recent-searches
>  (notmuch-hello-insert-tags-section "All 
> tags" :initially-hidden t nil nil)))
>
>
> I can show the message in question with a search for
> (is:spam OR NOT is:spam OR is:deleted OR NOT is:deleted) AND is:certaintag
> notmuch-emacs then shows the single message and its tags.  Among
> those is the certain tag.
>
>
> I expected the certain tag to be shown in the notmuch-hello
> section "All tags" and consider it a bug that this is not the case.
>
> My guess is that somewhere in the code notmuch count is called
> without --exclude=false.

Hmm.

Notmuch emacs client runs `notmuch search --output=tags '*'` 
and then `notmuch count --batch` for those. If that 'certain'
tag was in output of notmuch search --output=tags '*' then I
don't see a reason it not showing up (unless it somehow were
included in notmuch-hello-hide-tags, but I cannot see how it
could be there). 

I personally don't have any tags excluded and nothing related
to *hello* in my ~/.emacs.d/custom.el -- and now that I 
experimented with [search] exclude_tags I just could not get
it to work in any related way (the tag I try to exclude is
seen in search --output=tags '*' and in notmuch count --batch
outputs...

$ notmuch config get search.exclude_tags
tbd
$
$ notmuch count --batch
tag:tbd
1
$
$ notmuch search --output=tags '*' | grep tbd
tbd

Finally, I tried adding another tag to the one message
with this 'tbd' -- and that another tag is shown in
"All tags:" output.

That doesn't mean there could not be a bug there, just
that I cannot reproduce it...

Tomi

>
>
> Ciao; Gregor
> -- 
>  -... --- .-. . -.. ..--.. ...-.-
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch