From 1777219ef624930ec411bfa8d96d626593726a08 Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 5 Nov 1999 08:13:22 +0000 Subject: [PATCH] * pgg.el (pgg-insert-url-with-program): Call program asynchronously. --- pgg.el | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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." -- 1.7.10.4