summaryrefslogtreecommitdiff
path: root/lisp/gnus/mm-decode.el
diff options
context:
space:
mode:
authorTassilo Horn <tsdh@gnu.org>2019-03-09 21:27:24 +0100
committerTassilo Horn <tsdh@gnu.org>2019-03-09 21:29:18 +0100
commit7073db2b64726e4970e5a62bad01c49b68582178 (patch)
treec1a27035b8ff2b0894dab87e5ee35821fea4c4e6 /lisp/gnus/mm-decode.el
parent466466db76f7ee1a97b7d929743288a21236783c (diff)
downloademacs-7073db2b64726e4970e5a62bad01c49b68582178.tar.gz
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* <filename>" instead of " *mm*12345".
Diffstat (limited to 'lisp/gnus/mm-decode.el')
-rw-r--r--lisp/gnus/mm-decode.el4
1 files changed, 4 insertions, 0 deletions
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))