Notmuch-tree add/remove/toggle tag

'Mash subscribe at toshine.net
Tue May 6 03:39:31 PDT 2014


I am trying to setup a tag toggle to be used in the Notmuch-tree.

I referred to "Add a key binding to add/remove/toggle a tag":  
http://notmuchmail.org/emacstips/#index8h2

Looking at "notmuch-tree.el" I noticed

(defun notmuch-tree-get-tags ()
   "Return the tags of the current message."
   (notmuch-tree-get-prop :tags))

and

(defun notmuch-tree-tag (tag-changes)
   "Change tags for the current message"
   (interactive
    (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message")))
   (notmuch-tag (notmuch-tree-get-message-id) tag-changes)
   (notmuch-tree-tag-update-display tag-changes))

Which in my mind would be substituted for "notmuch-show-tag-message"  
and "notmuch-show-get-tags" respectively in the "add a toggle  
"deleted" key" example.

(define-key notmuch-tree-mode-map "d"
   (lambda ()
     "toggle deleted tag for message"
     (interactive)
     (notmuch-tree-tag
      (if (member "deleted" (notmuch-tree-get-tags))
          "-deleted" "+deleted"))))

The problem is that in notmuch-tree when I get the following message:  
"Entering debugger... button-at: Args out of range: 0" and the tag  
fails to be toggled.

Not quite sure where I am going wrong here?

Thanks,




More information about the notmuch mailing list