Can't run my functions using notmuch-<search/show>-add-tag since update
Jameson Graef Rollins
jrollins at finestructure.net
Mon Apr 2 01:42:09 PDT 2012
On Mon, Apr 02 2012, Albin Stjerna <albin.stjerna at gmail.com> wrote:
> I have a number of functions in my Emacs config to add standard tags to emails in notmuch. Since a recent upgrade of notmuch on debian testing (current version 0.12, not sure what the older version was), these functions no longer seem to work. For example, running this function:
>
> (defun notmuch-show-read/review ()
> (interactive)
> (notmuch-show-add-tag "read/review")
> (notmuch-show-archive-thread))
>
> will produce the following error:
>
> notmuch-show-read/review: Wrong number of arguments: #[nil "ÀÁ!" [notmuch-show-tag "+"] 2 ("/usr/share/emacs-snapshot/site-lisp/notmuch/notmuch-show.elc" . 53071) nil], 1
>
> What has changed, and what can I do to fix this problem? The docstrings for the functions I use doesn't really give any clues.
Hi, Albin. Yes, there were some recent changes to how tagging is
handled that has caused a bit of confusion. I think we might also need
to tweak it a bit more to get it right. Sorry you ran into trouble.
However, in the mean time, I think you will need to modify your function
as such:
(defun notmuch-show-read/review ()
(interactive)
(notmuch-show-tag-message "+read/review")
(notmuch-show-archive-thread))
Note the new tagging function is notmuch-show-tag-message, and the
tagging operation has to include the sign.
I think this interface can be cleaned up considerably, and I have some
ideas how (based on improvements I just submitted for search-mode [0]).
[0] id:"1333354853-25729-1-git-send-email-jrollins at finestructure.net"
Note, there are also now a suite of show-mode archiving functions,
depending on your needs:
notmuch-show-archive-thread
notmuch-show-archive-thread-then-next
notmuch-show-archive-thread-then-exit
notmuch-show-archive-message
notmuch-show-archive-message-then-next-or-exit
notmuch-show-archive-message-then-next-or-next-thread
hth, and good luck.
jamie.
-------------- 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/20120402/3d8928fb/attachment-0001.pgp>
More information about the notmuch
mailing list