diff --git a/mu4e/mu4e-mime-parts.el b/mu4e/mu4e-mime-parts.el index c78ffe9a..73a17426 100644 --- a/mu4e/mu4e-mime-parts.el +++ b/mu4e/mu4e-mime-parts.el @@ -361,7 +361,7 @@ Each of the actions is a plist with keys ;; - index: the index number of the mime part (default) ;; - temp: the full path to the mime part in a ;; temporary file, which is deleted immediately - ;; after invoking handler + ;; after the handler returns ;; - pipe: the attachment is piped to some shell command ;; or as a string parameter to a function ).") diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index 5fb39b1c..b7eac90e 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -2984,14 +2984,12 @@ have more that one address. @node MIME-part actions @section MIME-part actions -Finally, let's define a MIME-part action. As mentioned, MIME-part -functions receive @emph{2} arguments, the message and the attachment -number to use. +Finally, let's define a MIME-part action. The following example action counts the number of lines in an attachment, and defines @key{n} as its shortcut key (the @key{n} is prefixed to the -description). See the the @code{mu4e-view-mime-part-actions} for the details -of the format. +description). See the the @code{mu4e-view-mime-part-actions} for the details of +the format. @lisp (add-to-list 'mu4e-view-mime-part-actions @@ -2999,6 +2997,14 @@ of the format. '(:name "line-count" :handler "wc -l" :receives pipe)) @end lisp +Or another one, to import a calendar invitation into the venerable emacs diary: +@lisp +(add-to-list 'mu4e-view-mime-part-actions + ;; import into calendar; + '(:name "dimport-in-diary" :handler (lambda(file) (icalendar-import-file file diary-file)) + :receives temp)) +@end lisp + @node Example actions @section Example actions