unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Can't run my functions using notmuch-<search/show>-add-tag since update
@ 2012-04-02  7:56 Albin Stjerna
  2012-04-02  8:42 ` Jameson Graef Rollins
  0 siblings, 1 reply; 2+ messages in thread
From: Albin Stjerna @ 2012-04-02  7:56 UTC (permalink / raw)
  To: Notmuch Mail

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!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Can't run my functions using notmuch-<search/show>-add-tag since update
  2012-04-02  7:56 Can't run my functions using notmuch-<search/show>-add-tag since update Albin Stjerna
@ 2012-04-02  8:42 ` Jameson Graef Rollins
  0 siblings, 0 replies; 2+ messages in thread
From: Jameson Graef Rollins @ 2012-04-02  8:42 UTC (permalink / raw)
  To: Albin Stjerna, Notmuch Mail

[-- Attachment #1: Type: text/plain, Size: 1993 bytes --]

On Mon, Apr 02 2012, Albin Stjerna <albin.stjerna@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@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.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-02  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-02  7:56 Can't run my functions using notmuch-<search/show>-add-tag since update Albin Stjerna
2012-04-02  8:42 ` Jameson Graef Rollins

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).