400 |
(mm-handle-set-undisplayer handle mm))))) |
(mm-handle-set-undisplayer handle mm))))) |
401 |
;; The function is a string to be executed. |
;; The function is a string to be executed. |
402 |
(mm-insert-part handle) |
(mm-insert-part handle) |
403 |
(let* ((dir (make-temp-name (expand-file-name "emm." mm-tmp-directory))) |
(let* ((dir (mm-make-temp-file |
404 |
|
(expand-file-name "emm." mm-tmp-directory) 'dir)) |
405 |
(filename (mail-content-type-get |
(filename (mail-content-type-get |
406 |
(mm-handle-disposition handle) 'filename)) |
(mm-handle-disposition handle) 'filename)) |
407 |
(mime-info (mailcap-mime-info |
(mime-info (mailcap-mime-info |
411 |
(copiousoutput (assoc "copiousoutput" mime-info)) |
(copiousoutput (assoc "copiousoutput" mime-info)) |
412 |
file buffer) |
file buffer) |
413 |
;; We create a private sub-directory where we store our files. |
;; We create a private sub-directory where we store our files. |
|
(make-directory dir) |
|
414 |
(set-file-modes dir 448) |
(set-file-modes dir 448) |
415 |
(if filename |
(if filename |
416 |
(setq file (expand-file-name (file-name-nondirectory filename) |
(setq file (expand-file-name (file-name-nondirectory filename) |
417 |
dir)) |
dir)) |
418 |
(setq file (make-temp-name (expand-file-name "mm." dir)))) |
(setq file (mm-make-temp-file (expand-file-name "mm." dir)))) |
419 |
(let ((coding-system-for-write mm-binary-coding-system)) |
(let ((coding-system-for-write mm-binary-coding-system)) |
420 |
(write-region (point-min) (point-max) file nil 'nomesg)) |
(write-region (point-min) (point-max) file nil 'nomesg)) |
421 |
(message "Viewing with %s" method) |
(message "Viewing with %s" method) |
799 |
;; (without a ton of work) is to write them |
;; (without a ton of work) is to write them |
800 |
;; out to a file, and then create a file |
;; out to a file, and then create a file |
801 |
;; specifier. |
;; specifier. |
802 |
(let ((file (make-temp-name |
(let ((file (mm-make-temp-file |
803 |
(expand-file-name "emm.xbm" |
(expand-file-name "emm.xbm" |
804 |
mm-tmp-directory)))) |
mm-tmp-directory)))) |
805 |
(unwind-protect |
(unwind-protect |