2012-02-01 Lars Ingebrigtsen <larsi@gnus.org>
+ * mm-archive.el (mm-archive-list-files): Inline text and image parts.
+
* mm-decode.el (mm-shr): Make sure that the HTML ends with a newline.
Otherwise inserting text into the Gnus buffer can look odd.
(defun mm-archive-list-files (dir)
(let ((handles nil)
- type)
+ type disposition)
(dolist (file (directory-files dir))
(unless (member file '("." ".."))
(with-temp-buffer
(setq type (mailcap-extension-to-mime (match-string 1 file))))
(unless type
(setq type "application/octet-stream"))
+ (setq disposition
+ (if (string-match "^image/\\|^text/" type)
+ "inline"
+ "attachment"))
(insert (format "Content-type: %s\n" type))
(insert "Content-Transfer-Encoding: 8bit\n\n")
(insert-file-contents (expand-file-name file dir))
(mm-make-handle (mm-copy-to-buffer)
(list type)
'8bit nil
- `("attachment" (filename . ,file))
+ `(,disposition (filename . ,file))
nil nil nil)
handles))))
handles))