From 7073db2b64726e4970e5a62bad01c49b68582178 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Sat, 9 Mar 2019 21:27:24 +0100 Subject: [PATCH] Name buffer according to attachment filename (bug#34478). * lisp/gnus/mm-decode.el (mm-display-external): Name buffer showing the attachment according to the attachment's filename, i.e. "*mm* " instead of " *mm*12345". --- lisp/gnus/mm-decode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 2a769fccf54..b689b51d6a5 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -890,6 +890,7 @@ external if displayed external." (when method (message "Viewing with %s" method)) (let ((mm (current-buffer)) + (attachment-filename (mm-handle-filename handle)) (non-viewer (assq 'non-viewer (mailcap-mime-info (mm-handle-media-type handle) t)))) @@ -899,6 +900,9 @@ external if displayed external." (when (and (boundp 'gnus-summary-buffer) (bufferp gnus-summary-buffer) (buffer-name gnus-summary-buffer)) + (when attachment-filename + (with-current-buffer mm + (rename-buffer (format "*mm* %s" attachment-filename) t))) ;; So that we pop back to the right place, sort of. (switch-to-buffer gnus-summary-buffer) (switch-to-buffer mm)) -- 2.39.2