[notmuch] [PATCH] add notmuch-show-delete keybinding 'd'
Jameson Rollins
jrollins at finestructure.net
Wed Feb 24 11:01:18 PST 2010
On Wed, 24 Feb 2010 10:53:50 -0800, Carl Worth <cworth at cworth.org> wrote:
> But this patch does have two good ideas not in the other patch, (both of
> which I mentioned in the review):
>
> 1. It adds a keybinding to the notmuch-show mode
>
> 2. It removes the "inbox" and "unread" tags while adding the tag to
> indicate deletion.
Hey, Carl. Why is this last point important? I've been using my own
patchs for handling deleted messages, and all deleting a message or
thread does is add the "delete" tag. Why should it modify any other
tags? A message/thread should be allowed to be both deleted and in the
inbox.
As for "unread", I think that should be handled by actually reading the
message, not by manually applying a state to it.
FWIW, below are the functions I've added to my notmuch .el to handle
message/thread deleting.
jamie.
(defun notmuch-search-delete-thread ()
"Delete thread (add \"delete\" tag).
This function advances the next thread when finished."
(interactive)
(notmuch-search-add-tag "delete")
(forward-line))
(define-key notmuch-search-mode-map "d" 'notmuch-search-delete-thread)
(defun notmuch-show-delete-message ()
"Delete message (add \"delete\" tag).
Add the \"delete\" tag to message. Then kill this buffer and
show the next thread from the search from which this thread was
originally shown."
(interactive)
(notmuch-show-add-tag "delete")
(let ((parent-buffer notmuch-show-parent-buffer))
(kill-this-buffer)
(if parent-buffer
(progn
(switch-to-buffer parent-buffer)
(forward-line)))))
(define-key notmuch-show-mode-map "d" 'notmuch-show-delete-message)
-------------- 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/20100224/7ec5f864/attachment.pgp>
More information about the notmuch
mailing list