Re: [PATCH] emacs: Make the queries used in the all-tags section
authorAustin Clements <amdragon@mit.edu>
Wed, 25 May 2011 14:44:51 +0000 (10:44 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:20 +0000 (09:38 -0800)
4d/fb259802dcd78faf6897f7d9b79ff0b6cddb82 [new file with mode: 0644]

diff --git a/4d/fb259802dcd78faf6897f7d9b79ff0b6cddb82 b/4d/fb259802dcd78faf6897f7d9b79ff0b6cddb82
new file mode 100644 (file)
index 0000000..ab91cbd
--- /dev/null
@@ -0,0 +1,105 @@
+Return-Path: <amdragon@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id AB444431FD0\r
+       for <notmuch@notmuchmail.org>; Wed, 25 May 2011 07:44:52 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id HpowIKPFK6nV for <notmuch@notmuchmail.org>;\r
+       Wed, 25 May 2011 07:44:52 -0700 (PDT)\r
+Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com\r
+       [209.85.216.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 136CE431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 25 May 2011 07:44:52 -0700 (PDT)\r
+Received: by qyk7 with SMTP id 7so2463252qyk.5\r
+       for <notmuch@notmuchmail.org>; Wed, 25 May 2011 07:44:51 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:mime-version:sender:in-reply-to:references:date\r
+       :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+       :content-transfer-encoding;\r
+       bh=5/TcBN5q7tBtD53ySpEDf8g+G8TPWILY7DSoGrXZYAI=;\r
+       b=i+tRZ70U82juMQ6KL1kmJufmAXLq1fPQ9nL3E7KvTG/ROlu4A8QP/H/boTjWGu+2SP\r
+       BQtW9qdUEfOo+9IzfOhUS+6llLUXSzBfhHYDO/xw7qHl6O3cRSHFpOUh0bly9mL/GqYO\r
+       GUQ74QcK6hT/IbGtwfSE1PVjDNgzEMy7O918M=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=mime-version:sender:in-reply-to:references:date\r
+       :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+       :content-transfer-encoding;\r
+       b=UYZW+S7ftVaens/23AXhteJ/cNvI14OwV0R4aCqXqRsM0ydcWS4XiYp5KAl9R0W9+N\r
+       CjA186+2OKtE/9J9ixeXA1A2kOR4r7vtt3+B99Wjrto7dCUTiiF/y0evn8vvB8wQRtG9\r
+       /kMKsPObjj1swIypXkmBltEsEKZSdlhJQc+Mc=\r
+MIME-Version: 1.0\r
+Received: by 10.229.35.1 with SMTP id n1mr3858840qcd.84.1306334691178; Wed, 25\r
+       May 2011 07:44:51 -0700 (PDT)\r
+Sender: amdragon@gmail.com\r
+Received: by 10.229.188.68 with HTTP; Wed, 25 May 2011 07:44:51 -0700 (PDT)\r
+In-Reply-To: <871uznqeox.fsf@tredergarh.home.box>\r
+References: <87fwoath2s.fsf@gilead.home.box>\r
+       <BANLkTinKS5LbQsZuK8HyCzj+Lo4xqa2Sfg@mail.gmail.com>\r
+       <871uznqeox.fsf@tredergarh.home.box>\r
+Date: Wed, 25 May 2011 10:44:51 -0400\r
+X-Google-Sender-Auth: EfzZJtuuv2FJr-NyLDKKVKCv2jM\r
+Message-ID: <BANLkTin0+O=mubHF7JNpw4u3DQDQJQ5zbw@mail.gmail.com>\r
+Subject: Re: [PATCH] emacs: Make the queries used in the all-tags section\r
+From: Austin Clements <amdragon@mit.edu>\r
+To: Daniel Schoepe <daniel.schoepe@googlemail.com>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 25 May 2011 14:44:52 -0000\r
+\r
+On Wed, May 25, 2011 at 6:04 AM, Daniel Schoepe\r
+<daniel.schoepe@googlemail.com> wrote:\r
+> On Wed, 25 May 2011 00:10:43 -0400, Austin Clements <amdragon@mit.edu> wr=\r
+ote:\r
+>> Out of curiosity, what use cases do you envision for this? =A0So far\r
+>> I've only heard two, both of which seem like great ideas, but neither\r
+>> of which require such a heavy-handed solution: displaying unread\r
+>> counts for tags rather than total counts, and hiding unused tags.\r
+>\r
+> Another thing I use this for, is to hide messages/threads with a\r
+> "killed"-tag.\r
+\r
+Ah, interesting.\r
+\r
+> I think a sensible compromise would be to allow either a function or a\r
+> string that is appended (which people could set to "and tag:unread") for\r
+> the proposed configuration variable and additionally to add a\r
+> variable that lists tags that should be hidden (which would also be\r
+> easily modifiable in M-x customize).\r
+\r
+In principle, I completely agree, but the little parser in my head\r
+screams "parse error!  parse error!" when I feed it "and tag:unread"\r
+and that bothers me.\r
+\r
+May I suggest a slightly different way of looking at this that will\r
+quell my inner parser?  Instead of configuring a weird "query\r
+fragment" like "and tag:unread" to be string-concatenated with the tag\r
+query, configure a *filter* query like merely "tag:unread" that\r
+narrows down what you'd like to be counted within the scope of a tag.\r
+The implementations are hardly different---simply generate the query\r
+"tag:<tag> and ( <filter> )"---but a filter is a well-formed query,\r
+not some string fragment.  Furthermore, the user can't get bitten by\r
+precedence and wind up with a query that counts messages that don't\r
+even have that tag.\r