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 B59BD429E5F for ; Wed, 18 Jan 2012 00:38:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 8ITFHExyT9cp for ; Wed, 18 Jan 2012 00:38:33 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D5D59429E27 for ; Wed, 18 Jan 2012 00:38:32 -0800 (PST) Received: by wgbdr13 with SMTP id dr13so2093414wgb.2 for ; Wed, 18 Jan 2012 00:38:31 -0800 (PST) Received: by 10.180.108.232 with SMTP id hn8mr8722964wib.16.1326875911534; Wed, 18 Jan 2012 00:38:31 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id r1sm21194301wia.8.2012.01.18.00.38.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jan 2012 00:38:30 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id 8E1BBA0397; Wed, 18 Jan 2012 08:38:28 +0000 (GMT) To: Austin Clements Subject: Re: [PATCH v2 3/3] search: Support automatic tag exclusions In-Reply-To: <20120117203211.GQ16740@mit.edu> References: <1326258173-21163-1-git-send-email-amdragon@mit.edu> <1326496024-14403-1-git-send-email-amdragon@mit.edu> <1326496024-14403-4-git-send-email-amdragon@mit.edu> <87wr8tsvit.fsf@servo.finestructure.net> <20120116192836.GC16740@mit.edu> <20120117203211.GQ16740@mit.edu> User-Agent: Notmuch/0.11+64~g42e8f66 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Wed, 18 Jan 2012 08:38:23 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org, Jeremy Nickurak 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, 18 Jan 2012 08:38:33 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 17 Jan 2012 15:32:11 -0500, Austin Clements wrot= e: > Quoth David Edmondson on Jan 17 at 9:08 am: > > On Mon, 16 Jan 2012 15:16:24 -0700, Jeremy Nickurak wrote: > > > On Mon, Jan 16, 2012 at 12:28, Austin Clements wro= te: > > > >> Having "deleted" and "spam" as default settings in the configurati= on > > > >> file might be more reasonable. > > >=20 > > > If I read correctly: > > >=20 > > > 1) If no exclude options are in the config file, none should be used. > >=20 > > Yes. > >=20 > > > 2) On notmuch setup, "deleted" and "spam" should be added to .notmuch= -config > >=20 > > I might argue between 'should' and 'could', but the sense is correct. >=20 > Oh, I think I see. I don't know if I can do precisely that, since the > config code doesn't know if it's being called from setup, but is > something like this essentially what you're suggesting? >=20 > if (notmuch_config_get_auto_exclude_tags (config, &tmp) =3D=3D NULL) { > if (is_new) { > const char *tags[] =3D { "deleted", "spam" }; > notmuch_config_set_auto_exclude_tags (config, tags, 2); > } else { > notmuch_config_set_auto_exclude_tags (config, NULL, 0); > } > } >=20 > (where is_new is TRUE if this is a brand-new config file) I'm not sure, as I haven't looked at the configuration code at all, sorry. Something must create the initial configuration file if none exists. I'd be okay with that code adding 'deleted' and 'spam' to the excluded list. This would mean that an existing user would see no change without taking some action (adding the tags to the configuration file) and a new user would see the new behaviour (automatic exclusion). I'm not completely sure that automatically adding the exclusion of the specified tags via the configuration file for new users is a great idea. It seems as though it will lead to confusion for someone at some point. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8WhP8ACgkQaezQq/BJZRYAMwCfWgPJowkOhz1cu+x8kHwvNmkU 5iwAniMvaMJLEJORlRwOmHJJLCOjT2J1 =ppVY -----END PGP SIGNATURE----- --=-=-=--