Commit 4de0737c authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

Work for application/x-tar-gz and image/svg+xml

;; Try inlining the attachment in the article <87wp94dzj6.fsf@gmail.com>
;; of bug#27078 in the Emacs bug list using Gnus.

* lisp/gnus/mm-archive.el (mm-archive-decoders):
Add a decoder for application/x-tar-gz.
(mm-dissect-archive): Error out if a decoder is not found.

* lisp/gnus/mm-decode.el (mm-get-image): Allow image/svg+xml.
parent 4c4a1b32
...@@ -30,15 +30,18 @@ ...@@ -30,15 +30,18 @@
'(("application/ms-tnef" t "tnef" "-f" "-" "-C") '(("application/ms-tnef" t "tnef" "-f" "-" "-C")
("application/zip" nil "unzip" "-j" "-x" "%f" "-d") ("application/zip" nil "unzip" "-j" "-x" "%f" "-d")
("application/x-gtar-compressed" nil "tar" "xzf" "-" "-C") ("application/x-gtar-compressed" nil "tar" "xzf" "-" "-C")
("application/x-tar-gz" nil "tar" "xzf" "-" "-C")
("application/x-tar" nil "tar" "xf" "-" "-C"))) ("application/x-tar" nil "tar" "xf" "-" "-C")))
(defun mm-archive-decoders () mm-archive-decoders) (defun mm-archive-decoders () mm-archive-decoders)
(defun mm-dissect-archive (handle) (defun mm-dissect-archive (handle)
(let ((decoder (cddr (assoc (car (mm-handle-type handle)) (let* ((type (car (mm-handle-type handle)))
mm-archive-decoders))) (decoder (cddr (assoc type mm-archive-decoders)))
(dir (make-temp-file dir)
(expand-file-name "emm." mm-tmp-directory) 'dir))) (unless decoder
(error "No decoder found for %s" type))
(setq dir (make-temp-file (expand-file-name "emm." mm-tmp-directory) 'dir))
(set-file-modes dir #o700) (set-file-modes dir #o700)
(unwind-protect (unwind-protect
(progn (progn
......
...@@ -1555,6 +1555,8 @@ be determined." ...@@ -1555,6 +1555,8 @@ be determined."
"xbm") "xbm")
((equal type "x-portable-bitmap") ((equal type "x-portable-bitmap")
"pbm") "pbm")
((equal type "svg+xml")
"svg")
(t type))) (t type)))
(or (mm-handle-cache handle) (or (mm-handle-cache handle)
(mm-with-unibyte-buffer (mm-with-unibyte-buffer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment