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 ACF106DE0C5F for ; Mon, 13 Jan 2020 14:28:47 -0800 (PST) Authentication-Results: arlo.cworth.org; dkim=permerror (0-bit key) header.d=fifthhorseman.net header.i=@fifthhorseman.net header.b="AOlOhwNC"; dkim=pass (2048-bit key; unprotected) header.d=fifthhorseman.net header.i=@fifthhorseman.net header.b="2HfIP9U6"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.565 X-Spam-Level: X-Spam-Status: No, score=-1.565 tagged_above=-999 required=5 tests=[AWL=0.936, 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 XUgPWzxvoRkO for ; Mon, 13 Jan 2020 14:28:46 -0800 (PST) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id DCC506DE0C1E for ; Mon, 13 Jan 2020 14:28:45 -0800 (PST) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1578954522; h=from : to : cc : subject : date : message-id : mime-version : content-type : from; bh=0MNipFR6XqTWUfzrhC5QB52LQZXjocBdBD2tIYtgKgE=; b=AOlOhwNCm6Fb2kkFg/rFB4k/Y09jNeE7cZY9saNtcggx8uFw/6kR4OEb EncrAYiydkaLsB+ipD8OWsZroVfTAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1578954522; h=from : to : cc : subject : date : message-id : mime-version : content-type : from; bh=0MNipFR6XqTWUfzrhC5QB52LQZXjocBdBD2tIYtgKgE=; b=2HfIP9U6YuM8JKvbG4QIV6hcDU836CwkBUjdir96BIktcI/UZzDScLj1 GWKtAwTo48paYH+X2NYNDjXUoddfhkeUmBY7nBCqTMUYTjDK1cSG5WkZpp Y8CfnnbzNB9Fp+auSHmDgBuFsMNkL24iD2AQr0pwVKRrIVA7lmgPC6NwdJ r1ic9Gdpc1SVZcjIt7p1ZB7Phq81Je+TPxI2/z6/r2fvJodWoHMHhBt/9P WTFMqEH+Y/qSk6doZIqJJdfeakUhLa66mca3vETEHHojjiCaeg0+FL1Sj6 Jtg9O3Xt9BI6LxpkZYwyNc1LkcqZs5gjIrgGZ9FrARm9/r9uaxvgaQ== 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 17897F9A6; Mon, 13 Jan 2020 17:28:41 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id EB6B5203BB; Mon, 13 Jan 2020 17:28:39 -0500 (EST) From: Daniel Kahn Gillmor To: Notmuch Mail Cc: Antoine =?utf-8?Q?Beaupr=C3=A9?= Subject: proposing "notmuch purge" 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: Mon, 13 Jan 2020 17:28:38 -0500 Message-ID: <87wo9vhtyh.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: Mon, 13 Jan 2020 22:28:47 -0000 --=-=-= Content-Type: text/plain This e-mail proposes a new notmuch subcommand "purge", which actually removes explicitly deleted messages from the mailstore. Notmuch currently never deletes mail, but notmuch-emacs makes it easy to tag mail with "deleted" (via the "d") key, and "notmuch setup" automatically adds "deleted" to the search.exclude_tags setting. Users typically do actually want to delete messages, and they want them gone from their filesystem and from the index. while everyone who has used notmuch for a while probably has a clever way of doing this, those techniques are all probably slightly different (and possibly buggy), and the cognitive burden of figuring out how to do this sensibly for new users seems like something we should avoid. So i'm proposing "notmuch purge", which could be something as simple as the equivalent of: notmuch search --output=files --format=text0 tag:deleted | \ xargs --null --no-run-if-empty rm && \ notmuch new --no-hooks (credit for the pipeline above goes to anarcat, in Cc; i added the "notmuch new --no-hooks" part, because i would want the items gone from the db as well) If i was to implement this, i'd probably implement it directly in C, not as a shell script, because this lets us drop messages from the db as we unlink() the files. Inevitably, someone will come up with some more clever options/generalizations (i can already think of at least one), but if we have a particular implementation to hang these proposals on, it should help us to build something sensibly robust with a wider consensus, and new users can pick up and use that functionality easily/safely/with confidence. I note that this is a divergence from the historical expectation of having all "notmuch" subcommands not directly tamper with the mailstore. I think given the context that divergence is OK. Any objections to this approach? --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTJDm02IAobkioVCed2GBllKa5f+AUCXhzvFwAKCRB2GBllKa5f +GffAP9kuHLdh3V+SOERdggksPYGDqltU/KYjY+f7UPQiJiLnAD/SCD7Fv3sCInP ziLDkKZmqsmeEx6AIbyfdVWQR62ivQU= =nECw -----END PGP SIGNATURE----- --=-=-=--