[notmuch] [PATCH] add notmuch-show-delete keybinding 'd'
James Vasile
james at hackervisions.org
Thu Feb 25 06:21:33 PST 2010
At Thu, 25 Feb 2010 11:53:14 +0100,
Sebastian Spaeth wrote:
>
> On Wed, 24 Feb 2010 14:01:18 -0500, Jameson Rollins <jrollins at finestructure.net> wrote:
> > > 2. It removes the "inbox" and "unread" tags while adding the tag to
> > > indicate deletion.
> >
> > Hey, Carl. Why is this last point important? [...]Why should it modify any other
> > tags? A message/thread should be allowed to be both deleted and in the
> > inbox.
>
> As long as deleted threads/messages show up in the default views, I
> don't want them to show up in my inbox or show up as unread. I agree
> that it might be possible to have "unread" yet "delete"d emails. But in
> reality, if I delete a message I don't want it to pop up in my inbox.
>
> Feel free to apply patches however you want though, thanks to emacs,
> I'll be able to get my desired behavior nonetheless :).
>
> > As for "unread", I think that should be handled by actually reading the
> > message, not by manually applying a state to it.
>
> I agree, but deleting a message in my world view resets the unread tag
> (as in, I don't want to read it anymore).
This elisp might help. I run these when deleting messages in search
or show modes. Basically, this means I never see deleted threads
again. I also use these to mark spam.
(defun notmuch-tags-strip-properties (tags)
"return list of tags with emacs text properties removed
tags is a list of tags where each tag is a string with emacs text
properties
"
(mapcar '(lambda (tag)
(set-text-properties 0 (length tag) nil tag)
tag)
tags))
(defun notmuch-show-remove-all-tags ()
"Remove all tags from the currently selected thread."
(apply 'notmuch-show-remove-tag
(notmuch-tags-strip-properties (notmuch-show-get-tags))))
(defun notmuch-search-remove-tags (&rest tags)
"Remove multiple tags from the currently selected thread."
(mapc 'notmuch-search-remove-tag tags))
(defun notmuch-search-remove-all-tags ()
"Remove all tags from the currently selected thread."
(apply 'notmuch-search-remove-tags
(notmuch-tags-strip-properties (notmuch-search-get-tags))))
More information about the notmuch
mailing list