--- gnus-art.el~ 2008-06-11 21:40:58 +0000 +++ gnus-art.el 2008-06-30 00:33:21 +0000 @@ -3968,7 +3968,9 @@ (setq command (read-string "Print using command: " gnus-summary-muttprint-program nil gnus-summary-muttprint-program)) - (gnus-summary-save-in-pipe command)) + (let ((gnus-last-shell-command gnus-last-shell-command)) + (gnus-summary-save-in-pipe command) + (setq gnus-summary-muttprint-program gnus-last-shell-command))) ;;; Article file names when saving. --- gnus-sum.el~ 2008-06-15 21:39:57 +0000 +++ gnus-sum.el 2008-06-30 00:33:21 +0000 @@ -1242,6 +1242,13 @@ :group 'gnus-summary :type '(choice boolean regexp)) +(defcustom gnus-summary-pipe-output-default-command nil + "Command (and optional arguments) used by `gnus-summary-pipe-output'. +The value will be used as the default command if it is non-nil." + :version "23.1" ;; No Gnus + :group 'gnus-summary + :type '(radio (const :tag "None" nil) (string :tag "Command"))) + (defcustom gnus-summary-muttprint-program "muttprint" "Command (and optional arguments) used to run Muttprint." :version "22.1" @@ -11612,7 +11619,9 @@ (interactive (gnus-interactive "P\ny")) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-pipe) - (gnus-save-all-headers (or headers gnus-save-all-headers))) + (gnus-save-all-headers (or headers gnus-save-all-headers)) + (gnus-last-shell-command (or gnus-summary-pipe-output-default-command + gnus-last-shell-command))) (gnus-summary-save-article arg t)) (let ((buffer (get-buffer "*Shell Command Output*"))) (when (and buffer