From: ueno Date: Fri, 5 Nov 1999 08:13:22 +0000 (+0000) Subject: * pgg.el (pgg-insert-url-with-program): Call program asynchronously. X-Git-Tag: emiko-1_13_7~59 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1777219ef624930ec411bfa8d96d626593726a08;p=elisp%2Fsemi.git * pgg.el (pgg-insert-url-with-program): Call program asynchronously. --- diff --git a/pgg.el b/pgg.el index fea5d1c..9d8ac6e 100644 --- a/pgg.el +++ b/pgg.el @@ -269,9 +269,19 @@ and END to the keyring.") (defun pgg-insert-url-with-program (url) (let ((args (copy-sequence pgg-insert-url-extra-arguments)) process) - (setq process - (apply #'call-process pgg-insert-url-program nil t - (nconc args (list url)))))) + (insert + (with-temp-buffer + (setq process + (apply #'start-process " *PGG url*" (current-buffer) + pgg-insert-url-program (nconc args (list url)))) + (set-process-sentinel process #'ignore) + (while (eq 'run (process-status process)) + (accept-process-output process 5)) + (delete-process process) + (if (and process (eq 'run (process-status process))) + (interrupt-process process)) + (buffer-string))) + )) (defun pgg-fetch-key (keyserver key) "Attempt to fetch a key for addition to PGP or GnuPG keyring."