Re: Message deletion wisdom

Subject: Re: Message deletion wisdom

Date: Thu, 05 Apr 2012 12:20:43 -0400

To: Jameson Graef Rollins, Jacek Generowicz, notmuch@notmuchmail.org

Cc:

From: Antoine Beaupré


On Tue, 03 Apr 2012 16:32:04 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> 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")))

Thank you for this. I had tried to reroll your patches
(id:"1326826969-23545-1-git-send-email-jrollins@finestructure.net") on
top of 0.12 and that was a miserable failure, so the above works
well. In fact, I have made it like this instead:

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

... but it doesn't seem to actually go to the next message... oh well,
at least I can delete mail.

Also note that you can delete whole threads with this:

(define-key notmuch-search-mode-map "d"
  (lambda ()
    (interactive)
    (notmuch-search-tag-thread "+deleted")
    (notmuch-search-next-thread)))

... and I have added an undelete function:

(define-key notmuch-search-mode-map "u" 
  (lambda ()
    (interactive)
    (notmuch-search-tag-thread "-deleted")
    (notmuch-search-next-thread)))

>  * and if you really want them purged from disk, delete them manually
>    with:
> 
>     notmuch search --output=files tag:deleted | xargs -l rm

I use this script:

notmuch-purge (application/x-sh)
Finally, I want to voice that I feel a "delete" key, even if it doesn't
delete mails, seems like an important part of a mail user
agent. Archiving mail is one thing, but for the love and respect of
sysadmins and the infrastructure they maintain, please consider adding
at least a way to *tag* those deleted emails.

Having the above keys being defined as standard in notmuch don't seem
like much to ask.

This may be a dissenting view here, but your mail is not that
important. :P

Cheers,

A.
-- 
L'art n'est pas un bureau d'anthropométrie.
                        - Léo Ferré, "Préface"
part-001.sig (application/pgp-signature)

Thread: