From: ueno Date: Wed, 3 Nov 1999 13:01:50 +0000 (+0000) Subject: * pgg-gpg.el (snarf-keys-region): Add `-' as extra argument of X-Git-Tag: emiko-1_13_7~90 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e6be18b82a4f099e72cd4d3f24c2150ff679c39;p=elisp%2Fsemi.git * pgg-gpg.el (snarf-keys-region): Add `-' as extra argument of gpg --import; convert status code into an integer. --- diff --git a/pgg-gpg.el b/pgg-gpg.el index e093301..55e6d7b 100644 --- a/pgg-gpg.el +++ b/pgg-gpg.el @@ -244,7 +244,7 @@ (luna-define-method snarf-keys-region ((scheme pgg-scheme-gpg) start end) - (let ((args '("--import" "--batch")) status) + (let ((args '("--import" "--batch" "-")) status) (pgg-gpg-process-region start end nil pgg-gpg-program args) (set-buffer pgg-status-buffer) (goto-char (point-min)) @@ -252,18 +252,20 @@ (setq status (buffer-substring (match-end 0) (progn (end-of-line) (point))) - status (vconcat (split-string status))) + status (vconcat (mapcar #'string-to-int + (split-string status)))) (erase-buffer) - (insert (aref status 0) "keys seen\n" - (format "\t%d bad, %d new, %d old\n" - (string-to-int (aref status 1)) - (+ (string-to-int (aref status 2)) - (string-to-int (aref status 10))) - (+ (string-to-int (aref status 4)) - (string-to-int (aref status 11)))) + (insert (format "Imported %d key(s). +\tArmor contains %d key(s) [%d bad, %d old].\n" + (+ (aref status 2) + (aref status 10)) + (aref status 0) + (aref status 1) + (+ (aref status 4) + (aref status 11))) (if (zerop (aref status 9)) "" - "\tSecret keys are imported\n"))) + "\tSecret keys are imported.\n"))) (append-to-buffer pgg-output-buffer (point-min)(point-max)) (with-current-buffer pgg-output-buffer