Message deletion wisdom

Antoine Beaupré anarcat at anarcat.ath.cx
Thu Apr 5 09:20:43 PDT 2012


On Tue, 03 Apr 2012 16:32:04 -0700, Jameson Graef Rollins <jrollins at 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 at 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:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: notmuch-purge
Type: application/x-sh
Size: 219 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120405/494f8225/attachment-0001.sh>
-------------- next part --------------

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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120405/494f8225/attachment-0001.pgp>


More information about the notmuch mailing list