mu4e-mime-parts: fix actions

Use mm-pipe-part rather then gnus-article-pipe-part since we no longer
have the gnus buffer available.
This commit is contained in:
Dirk-Jan C. Binnema
2026-03-21 16:08:55 +02:00
committed by Seth Ladygo
parent 1c846b9e14
commit 939582e98a

View File

@ -347,9 +347,9 @@ files."
;; ;;
;; save MIME-part to a file ;; save MIME-part to a file
(:name "save" :handler gnus-article-save-part :receives index) (:name "save" :handler mm-save-part :receives handle)
;; pipe MIME-part to some arbitrary shell command ;; pipe MIME-part to some arbitrary shell command
(:name "|pipe" :handler gnus-article-pipe-part :receives index) (:name "|pipe" :handler mm-pipe-part :receives handle)
;; open with the default handler, if any ;; open with the default handler, if any
(:name "open" :handler mu4e--view-open-file :receives temp) (:name "open" :handler mu4e--view-open-file :receives temp)
;; open with some custom file. ;; open with some custom file.
@ -385,6 +385,7 @@ Each of the actions is a plist with keys
;; - a string, which is taken as a shell command ;; - a string, which is taken as a shell command
:receives ;; a symbol specifying what the handler receives :receives ;; a symbol specifying what the handler receives
;; - handle: the Gnus MIME handle for the part
;; - index: the index number of the mime part (default) ;; - index: the index number of the mime part (default)
;; - temp: the full path to the mime part in a ;; - temp: the full path to the mime part in a
;; temporary file, which is deleted immediately ;; temporary file, which is deleted immediately
@ -469,6 +470,7 @@ the third MIME-part."
(cond (cond
((functionp handler) ((functionp handler)
(cond (cond
((eq receives 'handle) (funcall handler handle))
((eq receives 'index) (funcall handler id)) ((eq receives 'index) (funcall handler id))
((eq receives 'pipe) ((eq receives 'pipe)
(funcall handler (mm-with-unibyte-buffer (funcall handler (mm-with-unibyte-buffer