Finally, let’s define a MIME-part action.
The following example action counts the number of lines in an attachment, and
defines n as its shortcut key (the n is prefixed to the
description). See the mu4e-view-mime-part-actions for the details of
the format.
(add-to-list 'mu4e-view-mime-part-actions
;; count the number of lines in a MIME-part
'(:name "line-count" :handler "wc -l" :receives pipe))
Or another one, to import a calendar invitation into the venerable emacs diary:
(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))