unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "Antoine Beaupré" <anarcat@orangeseeds.org>
To: Ryan Tate <ryantate@ryantate.com>,
	Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
	Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: proposing "notmuch purge"
Date: Tue, 14 Jan 2020 20:43:09 -0500	[thread overview]
Message-ID: <87eew1jxzm.fsf@angela.anarc.at> (raw)
In-Reply-To: <87blr5lkn1.fsf@disp2634>

On 2020-01-14 17:48:34, Ryan Tate wrote:
> Daniel Kahn Gillmor <dkg@fifthhorseman.net> 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?

As jrollins said, mail flags can be changed, but that's about it. Email
contents are never modified and files are never removed, by principle,
so far.

> 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.

That's an excellent point!! If we have one user that has that
misconception and runs the command and destroys email, maybe it's worth
thinking more about ways of preventing such catastrophes! :)

Maybe some --force argument would be useful here? Or would "notmuch
delete" be more obvious to you? Or maybe a confirmation dialog unless
--yes or --force is passed?

> (Thank you to anyone on thread who has helped build notmuch, it has
> helped me enormously.)

Hey that's a nice touch, thanks! (even though I haven't done much on
notmuch)

(pun intended)

(and probably failed)

a.
-- 
La destruction de la société totalitaire marchande n'est pas une affaire
d'opinion. Elle est une nécessité absolue dans un monde que l'on sait
condamné. Puisque le pouvoir est partout, c'est partout et tout le temps
qu'il faut le combattre. - Jean-François Brient, de la servitude moderne

  parent reply	other threads:[~2020-01-15  1:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 22:28 proposing "notmuch purge" Daniel Kahn Gillmor
2020-01-13 22:33 ` Antoine Beaupré
2020-01-14  5:01 ` Teemu Likonen
2020-01-14  5:36   ` Teemu Likonen
2020-01-14 19:23   ` Daniel Kahn Gillmor
2020-01-14 19:55     ` Jameson Graef Rollins
2020-01-14 20:03       ` Antoine Beaupré
2020-01-14 22:25         ` Daniel Kahn Gillmor
2020-01-15  5:36       ` Teemu Likonen
2020-01-15  9:58         ` Örjan Ekeberg
2020-01-14 22:48 ` Ryan Tate
2020-01-14 23:08   ` Jameson Graef Rollins
2020-01-15  1:43   ` Antoine Beaupré [this message]
2020-01-14 22:59 ` Brian May
2020-01-14 23:24   ` Daniel Kahn Gillmor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eew1jxzm.fsf@angela.anarc.at \
    --to=anarcat@orangeseeds.org \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    --cc=ryantate@ryantate.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).