(let ((method (cdr (assoc 'method situation)))
(name (mime-entity-safe-filename entity)))
(setq name
- (if name
+ (if (and name (not (string= name "")))
(expand-file-name name mime-temp-directory)
(make-temp-name
(expand-file-name "EMI" mime-temp-directory))
))
- (mime-write-decoded-region (mime-entity-body-start entity) end
- name (cdr (assq 'encoding situation)))
+ (mime-write-entity-content entity name)
(message "External method is starting...")
(let ((process
(let ((command
;;;
(defvar mime-file-content-type-alist
- '(("JPEG" image jpeg)
- ("GIF" image gif)
+ '(("JPEG" image jpeg)
+ ("GIF" image gif)
+ ("Standard MIDI" audio midi)
)
"*Alist of \"file\" output patterns vs. corresponding media-types.
Each element looks like (REGEXP TYPE SUBTYPE).
(if (search-forward (concat filename ": ") nil t)
(let ((rest mime-file-content-type-alist))
(while (not (let ((cell (car rest)))
- (if (looking-at (car cell))
- (setq type (nth 1 cell)
- subtype (nth 2 cell))
- )))
+ (if cell
+ (if (looking-at (car cell))
+ (setq type (nth 1 cell)
+ subtype (nth 2 cell))
+ )
+ t)))
(setq rest (cdr rest))))))
(if type
(mime-raw-play-entity