Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 159B4431FB6 for ; Wed, 25 May 2011 15:42:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rFK-QfU+QgE9 for ; Wed, 25 May 2011 15:42:31 -0700 (PDT) Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 127B7429E28 for ; Wed, 25 May 2011 15:42:31 -0700 (PDT) Received: by qwb7 with SMTP id 7so116194qwb.26 for ; Wed, 25 May 2011 15:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5ursYtAqnEGrMbeg9tRWlD28be1FXJWS5/bMznQurDs=; b=Ir5orwYuZY68ivrKEuMv3QmfyPi6+grPwVf/2AtwDq5QweTmPK30ngit/qkZJzGF7y nGetgRCvEcvKbswgkWcJ47qYcv/L9aWp27pJNmGaT6iwMCXMGUJVAZPVkyzJ1NumO+nk LO/LN5Il+OJuGm2A1Z/l5YMhAMr/2SJ3JeLA8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=oeD++TMlB79MEuILy+pZAULVukCNzISZKzS+ui6zt6vpVooeFkXF82y63PMP1tCnDb KVuCFq2OY2EpV5KBeur/Iu8md8so2EIzvOHhWVbQTIgzdRcrkgVVxtSlbSnqIjlA/sxj 3k1Fr2tETz6urtIHRUzTXoJM2kvIys9mUBdcw= MIME-Version: 1.0 Received: by 10.229.142.11 with SMTP id o11mr103097qcu.46.1306363350097; Wed, 25 May 2011 15:42:30 -0700 (PDT) Sender: amdragon@gmail.com Received: by 10.229.188.68 with HTTP; Wed, 25 May 2011 15:42:30 -0700 (PDT) In-Reply-To: <87ei3mcw7h.fsf@gilead.invalid> References: <87fwoath2s.fsf@gilead.home.box> <871uznqeox.fsf@tredergarh.home.box> <874o4iwwp5.fsf@gilead.invalid> <871uzmwtng.fsf@gilead.invalid> <87ei3mcw7h.fsf@gilead.invalid> Date: Wed, 25 May 2011 18:42:30 -0400 X-Google-Sender-Auth: eKBQJ3cSF0ex3vkAyQIBfjV_FcQ Message-ID: Subject: Re: [PATCH] emacs: Make the queries used in the all-tags section From: Austin Clements To: Daniel Schoepe Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Wed, 25 May 2011 22:42:33 -0000 On Wed, May 25, 2011 at 5:21 PM, Daniel Schoepe wrote: > On Wed, 25 May 2011 15:11:16 -0400, Austin Clements wr= ote: >> So, perhaps something like >> >> (defcustom notmuch-hello-tag-list-counts nil >> =A0 "Method for generating counts displayed in the all tags list. >> >> This variable controls the query used to generate counts for each >> tag in the \"all tags\" list. =A0If nil, the tag list will count >> all messages with each tag. =A0This can be a query string that will >> filter the messages counted for each tag. =A0Finally, this can be a >> function that will be called for each tag and should return a >> filter query for that tag, or nil to hide the tag." >> =A0 :type '(choice (const :tag "Count all messages" nil) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(const :tag "Count unread messages" "= tag:unread") >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(const :tag "Custom filter" string) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(const :tag "Custom filter function" = function)) >> =A0 :group 'notmuch) > > That is slightly less accurate though, since the query is not only used > to generate the counts, but also the searches that are performed when > one presses return on a tag in the list. 'Doh. That's what I get for not reading the surrounding code. I misunderstood what your patch was going for and assumed it was what *I* wanted notmuch to do, which is to show me useful counts (e.g., unread count), but not to change the underlying query. ]:--8) So, to me, it seems like this turns the all tags section into another saved searches section, just with a slight twist, and makes me wonder if there's a better way to reconcile these. > Ah, thanks. I guess too much exposure to Haskell (and how smart GHC is) > makes me write things in a functional style without thinking about > performance. Hah, been there. I have to constantly remind myself that Elisp is *not* a self-respecting functional programming language, despite how much it may look like Scheme.