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 65F79421197 for ; Tue, 17 Jan 2012 12:32:26 -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 Wvl7vAKTDnQZ for ; Tue, 17 Jan 2012 12:32:25 -0800 (PST) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by olra.theworths.org (Postfix) with ESMTP id A2CA0421192 for ; Tue, 17 Jan 2012 12:32:25 -0800 (PST) X-AuditID: 12074424-b7fae6d000000906-63-4f15dad9095b Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id E2.B7.02310.9DAD51F4; Tue, 17 Jan 2012 15:32:25 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q0HKWOi2010782; Tue, 17 Jan 2012 15:32:24 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0HKWMQM017195 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Tue, 17 Jan 2012 15:32:23 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RnFhT-00085o-Al; Tue, 17 Jan 2012 15:32:11 -0500 Date: Tue, 17 Jan 2012 15:32:11 -0500 From: Austin Clements To: David Edmondson Subject: Re: [PATCH v2 3/3] search: Support automatic tag exclusions Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IR4hTV1r15S9TfYMtpNot9d7YwWbR+vsRs cf3mTGYHZo9dz/8yeUx92cfi8WzVLeYA5igum5TUnMyy1CJ9uwSujN8Hb7AUrOWsmPxzO1MD YzN7FyMnh4SAicTH6duYIGwxiQv31rN1MXJxCAnsY5RYP/8nE4SzgVHia+cbdgjnJJPEm6az LBDOEkaJTYceM4P0swioSlx+vBTMZhPQkNi2fzkjiC0ioCjx/9sKsH3MAo4Sr19cBxrLwSEs 4CKxoVMPJMwroCPx5dtCqG3LmSUmNd9mgkgISpyc+YQFoldL4sa/l2C9zALSEsv/cYCEOQVs JB7u6gBbKyqgIjHl5Da2CYxCs5B0z0LSPQuhewEj8ypG2ZTcKt3cxMyc4tRk3eLkxLy81CJd c73czBK91JTSTYygYGd3UdnB2HxI6RCjAAejEg+vxAZRfyHWxLLiytxDjJIcTEqivLNuAIX4 kvJTKjMSizPii0pzUosPMUpwMCuJ8F66DJTjTUmsrEotyodJSXOwKInzami98xMSSE8sSc1O TS1ILYLJynBwKEnwHroJ1ChYlJqeWpGWmVOCkGbi4AQZzgM0fBdIDW9xQWJucWY6RP4Uo6KU OO98kIQASCKjNA+uF5aMXjGKA70izPsNpIoHmMjgul8BDWYCGpzTKgQyuCQRISXVwMi++c32 Ve53NwRUivLUfFSctX17elSGn/WGew9VFnT8+HpNdX1tkE3/971JlVwnDuZI337VesHjoJIy w9GkM40/Prs9nn0l5NFNz/7/voWTJnt3JtxfrqrS7+C1Xipuou6m6RaHL/zLU9517vM9+WUJ k/8/XPLm46N13yZFTbNdXdF34ZGpVdMuJZbijERDLeai4kQAsaVwSiEDAAA= 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: Tue, 17 Jan 2012 20:32:26 -0000 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 wrote: > > >> Having "deleted" and "spam" as default settings in the configuration > > >> file might be more reasonable. > > > > If I read correctly: > > > > 1) If no exclude options are in the config file, none should be used. > > Yes. > > > 2) On notmuch setup, "deleted" and "spam" should be added to .notmuch-config > > I might argue between 'should' and 'could', but the sense is correct. 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? if (notmuch_config_get_auto_exclude_tags (config, &tmp) == NULL) { if (is_new) { const char *tags[] = { "deleted", "spam" }; notmuch_config_set_auto_exclude_tags (config, tags, 2); } else { notmuch_config_set_auto_exclude_tags (config, NULL, 0); } } (where is_new is TRUE if this is a brand-new config file)