+2013-08-06 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mm-decode.el (mm-display-external): Bind process-connection-type to
+ nil; don't delete a temp file immediately even if a viewer finishes,
+ since it may be a shell script, like xdg-open, that launches a real
+ viewer program belatedly.
+
2013-08-05 Dave Abrahams <dave@boostpro.com>
* gnus-int.el (gnus-warp-to-article): Allow warping in all groups so
(let ((command (mm-mailcap-command
method file (mm-handle-type handle))))
(unwind-protect
- (progn
+ (let ((process-connection-type nil))
(start-process "*display*"
(setq buffer
(generate-new-buffer " *mm*"))
(delete-directory (file-name-directory file)))))
(lambda (process state)
(when (eq (process-status process) 'exit)
- (condition-case nil
- (delete-file file)
- (error))
- (condition-case nil
- (delete-directory (file-name-directory file))
- (error))
+ (run-at-time
+ 10.0 nil
+ (lambda ()
+ (ignore-errors
+ (delete-file file))
+ (ignore-errors
+ (delete-directory (file-name-directory file)))))
(when (buffer-live-p outbuf)
(with-current-buffer outbuf
(let ((buffer-read-only nil)