unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Graef Rollins <jrollins@finestructure.net>
To: Jacek Generowicz <jacek.generowicz@cern.ch>, notmuch@notmuchmail.org
Subject: Re: Message deletion wisdom
Date: Tue, 03 Apr 2012 16:32:04 -0700	[thread overview]
Message-ID: <87sjgk2xzf.fsf@servo.finestructure.net> (raw)
In-Reply-To: <0cc49af3-5415-419d-97ef-2bec76117d63@CERNFE22.cern.ch>

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

On Tue, Apr 03 2012, Jacek Generowicz <jacek.generowicz@cern.ch> wrote:
> Looking through the archives of this list, I see that the topic of
> message deletion is, if not controversial, then at least non-trivial.
>
> + Requests for the provision of message deletion mechanisms have
>   appeared many times, and that various patches addressing the issue
>   have been submitted, and (IIUC) some of these are awaiting review
>   and might possibly make it into an official release in the future.
>
> + Having the 'deleted' tag cause messages to be deleted is,
>   apparently, fraught with peril of losing mail.

Hi, Jacek.  You are right on both of these points.  It has indeed been a
controversial topic.  However, I would say that we have reached a stasis
in terms of our response to this issue.  I'll try to summarize here.

I can say with a very high degree of certainly that notmuch will NEVER
gain the capability to actually delete mail files from disk itself.  It
is too risky for notmuch to be involved in that, and it's too easy to do
it outside of notmuch (e.g. "notmuch search --output=files tag:deleted |
xargs rm").  This has never really been up for discussion.

What *has* generated a lot of discussion is whether or not the emacs
interface should by default support key bindings that add a "deleted"
tag to messages, and how that tag should be handled.  I think we have
finally settled on notmuch NOT supporting such a key binding by default,
since it's easy enough for users to add the binding themselves if they
wish.

What we have added (or more accurately "are adding") though (thanks to
the work of Austin Clements and Mark Walters) is the ability to exclude
messages with a certain tag from search results.  This is like an
effective deletion, since messages can be completely omitted from search
results without having them actually be deleted from disk.  This is
obviously much safer, and a more generally useful functionality.  This
functionality is currently in beta, but will be full-featured in the
next release.

So in summary, if you would like to "delete" messages, you can:

 * add a key binding to emacs (or your favorite ui) to add a "deleted"
   tag to messages that you want to delete:

    (define-key notmuch-show-mode-map "d"
      (lambda ()
        (interactive)
        (notmuch-show-tag-message "+deleted")))

 * add exclusion for messages with the "deleted" tag:

    notmuch config set search.exclude_tags deleted

 * and if you really want them purged from disk, delete them manually
   with:

    notmuch search --output=files tag:deleted | xargs -l rm

I'll add a page about this to the wiki, since it comes up enough.

hth.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2012-04-03 23:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 10:37 Message deletion wisdom Jacek Generowicz
2012-04-03 23:32 ` Jameson Graef Rollins [this message]
2012-04-04  7:38   ` Jani Nikula
2012-04-05 16:24     ` Antoine Beaupré
2012-04-05 16:20   ` Antoine Beaupré
2012-04-06 20:17     ` Mark Anderson
2012-04-09 21:36       ` green
2012-04-08 22:24   ` Sebastian Spaeth

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=87sjgk2xzf.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=jacek.generowicz@cern.ch \
    --cc=notmuch@notmuchmail.org \
    /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).