Re: proposing "notmuch purge"

2020-01-14 Thread Teemu Likonen
Jameson Graef Rollins [2020-01-14T11:55:36-08] wrote: > Honestly I don't see the point of any user configuration here. Seems > likely to only add confusion and possibly improperly deleted messages, > which would be very bad. > > Just use the "deleted" tag only. It's already being used in multipl

Re: proposing "notmuch purge"

2020-01-14 Thread Antoine Beaupré
On 2020-01-14 17:48:34, Ryan Tate wrote: > 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 && \ >>

Re: proposing "notmuch purge"

2020-01-14 Thread Daniel Kahn Gillmor
On Tue 2020-01-14 15:03:29 -0500, Antoine Beaupré wrote: > Agreed. If you want to delete messages matching an another tag, you just > run: > > notmuch tag +deleted tag:another > notmuch purge > > Composability wins over configurability in this case. :) I like this outcome, though i'm not s

Re: proposing "notmuch purge"

2020-01-14 Thread Daniel Kahn Gillmor
On Wed 2020-01-15 09:59:14 +1100, Brian May wrote: > Daniel Kahn Gillmor writes: > >> So i'm proposing "notmuch purge", which could be something as simple as >> the equivalent of: > > I can't help think it will only be a matter of time before somebody > mistypes the search spec and accidentally de

Re: proposing "notmuch purge"

2020-01-14 Thread Jameson Graef Rollins
On Tue, Jan 14 2020, Ryan Tate wrote: > Is there any other notmuch command that results in a change to the state > of actual mail files, as opposed to the database? If maildir.synchronize_flags is set true then maildir flags in message file names will be synchronized with tags (see notmuch-config

Re: proposing "notmuch purge"

2020-01-14 Thread Brian May
Daniel Kahn Gillmor writes: > So i'm proposing "notmuch purge", which could be something as simple as > the equivalent of: I can't help think it will only be a matter of time before somebody mistypes the search spec and accidentally deletes all their mail... Of course, this won't be a drama, be

Re: proposing "notmuch purge"

2020-01-14 Thread Ryan Tate
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 pipeli

Re: proposing "notmuch purge"

2020-01-14 Thread Antoine Beaupré
On 2020-01-14 11:55:36, Jameson Graef Rollins wrote: > On Tue, Jan 14 2020, Daniel Kahn Gillmor wrote: >>> I think that the "SEARCH-TERMS" part should be configurable, not >>> hard-coded. A user could have setting like >>> "search.purge_tags=deleted;spam" and that would lead to search terms >>> "t

Re: proposing "notmuch purge"

2020-01-14 Thread Jameson Graef Rollins
On Tue, Jan 14 2020, Daniel Kahn Gillmor wrote: >> I think that the "SEARCH-TERMS" part should be configurable, not >> hard-coded. A user could have setting like >> "search.purge_tags=deleted;spam" and that would lead to search terms >> "tag:deleted OR tag:spam" in the purge operation. > > I want

Re: proposing "notmuch purge"

2020-01-14 Thread Daniel Kahn Gillmor
On Tue 2020-01-14 07:01:08 +0200, Teemu Likonen wrote: > We would need "notmuch search --exclude=false 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 configura