unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@mit.edu>
To: Daniel Schoepe <daniel.schoepe@googlemail.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: Make the queries used in the all-tags section
Date: Wed, 25 May 2011 10:44:51 -0400	[thread overview]
Message-ID: <BANLkTin0+O=mubHF7JNpw4u3DQDQJQ5zbw@mail.gmail.com> (raw)
In-Reply-To: <871uznqeox.fsf@tredergarh.home.box>

On Wed, May 25, 2011 at 6:04 AM, Daniel Schoepe
<daniel.schoepe@googlemail.com> wrote:
> On Wed, 25 May 2011 00:10:43 -0400, Austin Clements <amdragon@mit.edu> wrote:
>> Out of curiosity, what use cases do you envision for this?  So far
>> I've only heard two, both of which seem like great ideas, but neither
>> of which require such a heavy-handed solution: displaying unread
>> counts for tags rather than total counts, and hiding unused tags.
>
> Another thing I use this for, is to hide messages/threads with a
> "killed"-tag.

Ah, interesting.

> I think a sensible compromise would be to allow either a function or a
> string that is appended (which people could set to "and tag:unread") for
> the proposed configuration variable and additionally to add a
> variable that lists tags that should be hidden (which would also be
> easily modifiable in M-x customize).

In principle, I completely agree, but the little parser in my head
screams "parse error!  parse error!" when I feed it "and tag:unread"
and that bothers me.

May I suggest a slightly different way of looking at this that will
quell my inner parser?  Instead of configuring a weird "query
fragment" like "and tag:unread" to be string-concatenated with the tag
query, configure a *filter* query like merely "tag:unread" that
narrows down what you'd like to be counted within the scope of a tag.
The implementations are hardly different---simply generate the query
"tag:<tag> and ( <filter> )"---but a filter is a well-formed query,
not some string fragment.  Furthermore, the user can't get bitten by
precedence and wind up with a query that counts messages that don't
even have that tag.

  reply	other threads:[~2011-05-25 14:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 23:18 [PATCH] emacs: Make the queries used in the all-tags section Daniel Schoepe
2011-05-24 20:39 ` Carl Worth
2011-05-24 21:01   ` Daniel Schoepe
2011-05-24 22:04     ` Carl Worth
2011-05-25  4:10 ` Austin Clements
2011-05-25 10:04   ` Daniel Schoepe
2011-05-25 14:44     ` Austin Clements [this message]
2011-05-25 16:51       ` Daniel Schoepe
2011-05-25 17:56         ` Daniel Schoepe
2011-05-25 19:11           ` Austin Clements
2011-05-25 21:21             ` Daniel Schoepe
2011-05-25 22:42               ` Austin Clements
2011-05-25 23:21                 ` Daniel Schoepe
2011-05-26  1:05                   ` Carl Worth
2011-05-26 22:04               ` Carl Worth
2011-05-27  3:56                 ` Daniel Kahn Gillmor
  -- strict thread matches above, loose matches on Subject: below --
2011-05-26  3:27 Austin Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTin0+O=mubHF7JNpw4u3DQDQJQ5zbw@mail.gmail.com' \
    --to=amdragon@mit.edu \
    --cc=daniel.schoepe@googlemail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).