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 5BEC56DE0B2B for ; Tue, 14 Jan 2020 14:48:44 -0800 (PST) Authentication-Results: arlo.cworth.org; dkim=pass (1024-bit key; unprotected) header.d=ryantate.com header.i=@ryantate.com header.b="WTv5uxFE"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.092 X-Spam-Level: X-Spam-Status: No, score=0.092 tagged_above=-999 required=5 tests=[AWL=0.293, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 cUmo9RBPozRG for ; Tue, 14 Jan 2020 14:48:43 -0800 (PST) Received: from helm.ryantate.com (helm.ryantate.com [52.37.201.218]) by arlo.cworth.org (Postfix) with ESMTPS id 2A9066DE0ACD for ; Tue, 14 Jan 2020 14:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ryantate.com; s=mail; t=1579042120; bh=Z5btJrbJfHmhSpQfNEziPDLt2CrgL6Ak/qDH3/TATec=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=WTv5uxFE4XXV5VCvAoai5YGlUfS4rvPPN3NlcrHqDZFLw2MgSMrIDTMKq0UBsxjcK eyuAmR7euA/o8PWPLg0gSIffVAhq3n8TAAvcfSAGsghDIV1WFuRE/0cvnzS2kbH1GZ 0q8NGyZ07MxnUHIyUKL0sNhu0O6uUIDh9QfB8Gzk= From: Ryan Tate To: Daniel Kahn Gillmor , Notmuch Mail Cc: Antoine =?utf-8?Q?Beaupr=C3=A9?= Subject: Re: proposing "notmuch purge" In-Reply-To: <87wo9vhtyh.fsf@fifthhorseman.net> References: <87wo9vhtyh.fsf@fifthhorseman.net> Date: Tue, 14 Jan 2020 17:48:34 -0500 Message-ID: <87blr5lkn1.fsf@disp2634> MIME-Version: 1.0 Content-Type: text/plain 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 22:48:44 -0000 Daniel Kahn Gillmor writes: > 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) Is there any other notmuch command that results in a change to the state of actual mail files, as opposed to the database? Personally, I would be surprised to learn that the command "notmuch purge" deleted actual emails on my filesystem. I would expect any notmuch command would only operate on the database. As far as I can tell -- and I could be forgetting something! -- the current suite of commands simply mutate the database, never the actual files. What I would expect to happen is that "notmuch purge" removes mails tagged "deleted" from the notmuch index. (And perhaps with a flag, like say "--rmfiles", would take the step of actually deleting files.) Of course, I like to think I'd read the manpage of a command involving the word "purge" before executing said command :-) But I think I'd be surprised when I did, in this case. Just my $.02. (Thank you to anyone on thread who has helped build notmuch, it has helped me enormously.) Ryan