From abe9497d74d8b12cd21e278ffbb90e3c29f5bfa7 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sun, 19 Jul 2020 16:15:33 +0200 Subject: [PATCH] Complete over the MIME types in gnus-summary-save-parts * lisp/gnus/gnus-sum.el (gnus-summary-save-parts): Allow completing over the parts in the first article in the list of the process-marked articles (bug#39543). --- lisp/gnus/gnus-sum.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index c5036c32d57..d731893ecec 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -12509,10 +12509,15 @@ save those articles instead." "Save parts matching TYPE to DIR. If REVERSE, save parts that do not match TYPE." (interactive - (list (read-string "Save parts of type: " - (or (car gnus-summary-save-parts-type-history) - gnus-summary-save-parts-default-mime) - 'gnus-summary-save-parts-type-history) + (list (completing-read "Save parts of type: " + (progn + (gnus-summary-select-article nil t) + (gnus-eval-in-buffer-window gnus-article-buffer + (delete-dups + (mapcar (lambda (h) + (mm-handle-media-type (cdr h))) + gnus-article-mime-handle-alist)))) + nil nil nil 'gnus-summary-save-parts-type-history) (setq gnus-summary-save-parts-last-directory (read-directory-name "Save to directory: " gnus-summary-save-parts-last-directory -- 2.39.5