Function: gnus-mime-print-part
gnus-mime-print-part is an interactive and byte-compiled function
defined in gnus-art.el.gz.
Signature
(gnus-mime-print-part &optional HANDLE FILENAME EVENT)
Documentation
Print the MIME part under point.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun gnus-mime-print-part (&optional handle filename event)
"Print the MIME part under point."
(interactive
(list nil (ps-print-preprint current-prefix-arg) last-nonmenu-event)
gnus-article-mode)
(save-excursion
(mouse-set-point event)
(gnus-article-check-buffer)
(let* ((handle (or handle (get-text-property (point) 'gnus-data)))
(contents (and handle (mm-get-part handle)))
(file (make-temp-file (expand-file-name "mm." mm-tmp-directory)))
(printer (mailcap-mime-info (mm-handle-media-type handle) "print")))
(when contents
(if printer
(unwind-protect
(progn
(mm-save-part-to-file handle file)
(call-process shell-file-name nil
(generate-new-buffer " *mm*")
nil
shell-command-switch
(mm-mailcap-command
printer file (mm-handle-type handle))))
(delete-file file))
(with-temp-buffer
(insert contents)
(gnus-print-buffer))
(ps-despool filename))))))