[gnus git] branch master updated: m0-7-206-gaab9815 =1= mm-decode.el (mm-display-external): Work for xdg-open

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  aab98157ce3deed625ba701eecb1856dc775d426 (commit)
      from  a4ddd623c2bdaafc9c655c29aebe90dc9fda30e7 (commit)


- Log -----------------------------------------------------------------
commit aab98157ce3deed625ba701eecb1856dc775d426
Author: Katsumi Yamaoka <[email protected]>
Date:   Tue Aug 6 13:52:44 2013 +0000

    mm-decode.el (mm-display-external): Work for xdg-open

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c262df8..1eed896 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2013-08-06  Katsumi Yamaoka  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* gnus-int.el (gnus-warp-to-article): Allow warping in all groups so
diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el
index 7274708..98d8543 100644
--- a/lisp/mm-decode.el
+++ b/lisp/mm-decode.el
@@ -962,7 +962,7 @@ external if displayed external."
 	    (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*"))
@@ -984,12 +984,13 @@ external if displayed external."
 			    (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)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog    |    7 +++++++
 lisp/mm-decode.el |   15 ++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.