Can't run my functions using notmuch-search/show-add-tag since update

2012-04-02 Thread Albin Stjerna
Hi!

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.

Thanks in advance!
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Can't run my functions using notmuch-search/show-add-tag since update

2012-04-02 Thread Jameson Graef Rollins
On Mon, Apr 02 2012, Albin Stjerna albin.stje...@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:154853-25729-1-git-send-email-jroll...@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.


pgpjf0L4TdPQd.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch