From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3046F6DE0AD0 for ; Sun, 22 Apr 2018 01:52:43 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.475 X-Spam-Level: X-Spam-Status: No, score=0.475 tagged_above=-999 required=5 tests=[AWL=-0.177, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W2-dQqwAA1sp for ; Sun, 22 Apr 2018 01:52:42 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id C0B9F6DE0ACB for ; Sun, 22 Apr 2018 01:52:40 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id B5A2110006A; Sun, 22 Apr 2018 11:52:17 +0300 (EEST) From: Tomi Ollila To: Gregor Zattler , Notmuch Mail Subject: Re: Bug? notmuch-emacs: "All tags" in notmuch-hello does not show all tags In-Reply-To: <877ep0kx52.fsf@len.workgroup> References: <87wox1vovj.fsf@len.workgroup> <877ep0kx52.fsf@len.workgroup> User-Agent: Notmuch/0.26.1+22~g888240d (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2018 08:52:43 -0000 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=test@example.org > other_email= > > [new] > tags=new;unread;inbox; > > [search] > exclude_tags=deleted;spam; > > [maildir] > synchronize_flags=true > > From: test@example.org > To: test@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:test23@example.com > emacs -L "$(locate notmuch/emacs/notmuch.el | head -n 1 | sed -e 's/notmuch.el//')" -Q --eval "(require 'notmuch)" -f notmuch-hello