From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 6B5C96DE0EA5 for ; Tue, 14 Jan 2020 11:24:34 -0800 (PST) Authentication-Results: arlo.cworth.org; dkim=permerror (0-bit key) header.d=fifthhorseman.net header.i=@fifthhorseman.net header.b="NlyO+fzF"; dkim=pass (2048-bit key; unprotected) header.d=fifthhorseman.net header.i=@fifthhorseman.net header.b="GnJWabJw"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.567 X-Spam-Level: X-Spam-Status: No, score=-1.567 tagged_above=-999 required=5 tests=[AWL=0.934, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hxGSMhN8KaZ3 for ; Tue, 14 Jan 2020 11:24:29 -0800 (PST) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 8C02A6DE0B64 for ; Tue, 14 Jan 2020 11:24:29 -0800 (PST) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1579029864; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=m5WV/3pWrXob3Bi8DYPnWc3hc4921hr7b6d8A2KbjGI=; b=NlyO+fzFcXcRUBQDc+q4qFxX6476qed4J4sEUgdMzDBqwo2FIZyEeg9G 2xjl6JDVEDS7xjn8f9SzJXEHV27YBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1579029864; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=m5WV/3pWrXob3Bi8DYPnWc3hc4921hr7b6d8A2KbjGI=; b=GnJWabJwSfKmBVGqBja3p/jB4O5ey9EB5Bh/QZVLEO4gLGHecVa974sQ 7rNfdaymS5t6/O7MA4XfhXnf7nK3M6HD9RPotEfQGaQaeHyYfPI4uzRIAg dq5p7ulyocz/XeWROwULbVBv6++MppSLCVOh7p/7DcLBOjVWSzVPABfS+3 fhJ/7k0LUcBvbJS2HSV0mnEhs44pJI44rYBabBkNVovGwZR/dR9aj7DmZA R3IOG2RxdyM1TEk/fa9GrYM4stJL0ArVn8W5uor7XUB1SKadGaJvKcJtGk +/xv3+amOJ58c3Ubol7WE62o4xd9JWy0UTXPIVbrKh9GNOno1ejS/w== Received: from fifthhorseman.net (unknown [38.109.115.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id F1D86F9A5; Tue, 14 Jan 2020 14:24:22 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id C10A42046E; Tue, 14 Jan 2020 14:23:37 -0500 (EST) From: Daniel Kahn Gillmor To: Teemu Likonen , Notmuch Mail Cc: Antoine =?utf-8?Q?Beaupr=C3=A9?= Subject: Re: proposing "notmuch purge" In-Reply-To: <87d0bm1vjf.fsf@iki.fi> References: <87wo9vhtyh.fsf@fifthhorseman.net> <87d0bm1vjf.fsf@iki.fi> Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= mDMEXEK/AhYJKwYBBAHaRw8BAQdAr/gSROcn+6m8ijTN0DV9AahoHGafy52RRkhCZVwxhEe0K0Rh bmllbCBLYWhuIEdpbGxtb3IgPGRrZ0BmaWZ0aGhvcnNlbWFuLm5ldD6ImQQTFggAQQIbAQUJA8Jn AAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBMS8Lds4zOlkhevpwvIGkReQOOXGBQJcQsbzAhkB AAoJEPIGkReQOOXG4fkBAO1joRxqAZY57PjdzGieXLpluk9RkWa3ufkt3YUVEpH/AP9c+pgIxtyW +FwMQRjlqljuj8amdN4zuEqaCy4hhz/1DbgzBFxCv4sWCSsGAQQB2kcPAQEHQERSZxSPmgtdw6nN u7uxY7bzb9TnPrGAOp9kClBLRwGfiPUEGBYIACYWIQTEvC3bOMzpZIXr6cLyBpEXkDjlxgUCXEK/ iwIbAgUJAeEzgACBCRDyBpEXkDjlxnYgBBkWCAAdFiEEyQ5tNiAKG5IqFQnndhgZZSmuX/gFAlxC v4sACgkQdhgZZSmuX/iVWgD/fCU4ONzgy8w8UCHGmrmIZfDvdhg512NIBfx+Mz9ls5kA/Rq97vz4 z48MFuBdCuu0W/fVqVjnY7LN5n+CQJwGC0MIA7QA/RyY7Sz2gFIOcrns0RpoHr+3WI+won3xCD8+ sVXSHZvCAP98HCjDnw/b0lGuCR7coTXKLIM44/LFWgXAdZjm1wjODbg4BFxCv50SCisGAQQBl1UB BQEBB0BG4iXnHX/fs35NWKMWQTQoRI7oiAUt0wJHFFJbomxXbAMBCAeIfgQYFggAJhYhBMS8Lds4 zOlkhevpwvIGkReQOOXGBQJcQr+dAhsMBQkB4TOAAAoJEPIGkReQOOXGe/cBAPlek5d9xzcXUn/D kY6jKmxe26CTws3ZkbK6Aa5Ey/qKAP0VuPQSCRxA7RKfcB/XrEphfUFkraL06Xn/xGwJ+D0hCw== Date: Tue, 14 Jan 2020 14:23:36 -0500 Message-ID: <87r201j0zr.fsf@fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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, 14 Jan 2020 19:24:34 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue 2020-01-14 07:01:08 +0200, Teemu Likonen wrote: > We would need "notmuch search --exclude=3Dfalse tag:deleted" to really > find all messages with tag:deleted. I agree that we ought to deliberately avoid the exclude_tags when purging. > I think that the "SEARCH-TERMS" part should be configurable, not > hard-coded. A user could have setting like > "search.purge_tags=3Ddeleted;spam" and that would lead to search terms > "tag:deleted OR tag:spam" in the purge operation. I want the user to be able to run "notmuch purge", with no arguments, to "Do What I Mean"=E2=84=A2 I also want the "purge" subcommand to have its own configuration space -- it's *not* a specialized form of "search". So if we choose to make it configurable, i have two (mutually-exclusive) counter-proposals to yours above. In either case, if the user supplies search terms, they are used instead of pulling from the config a) the config variable is "purge.tags", and by default (if no setting is present) its value is "deleted". "notmuch purge" with no search terms expands this value into a tags-based selection. b) "notmuch purge" with no search terms looks for a special stored query named "query.purge". If that is not present, it uses "tags:deleted". (b) is slightly more flexible than (a), in that the user can configure it to use arbitrary queries, not just tags, though both behave identically in a default (not-explicitly-configured) setup. fwiw, i'd also like to consider exposing this functionality from libnotmuch, not just from the cli (so that it can be used by MUAs that are based solely on the library), but if there are good arguments for avoiding this in the library, i'd be happy to hear them. --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTJDm02IAobkioVCed2GBllKa5f+AUCXh4VOQAKCRB2GBllKa5f +O85AP9GL176J4bLPkt6VL0QZ1p7EpqnGtIjfFxmbYoiY/ZqXgD+M8Hj29TOC74L K7VbwV+xc5MffN9nBBVrarhgHi9G1wg= =E91x -----END PGP SIGNATURE----- --=-=-=--