X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=epg.el;h=e3ff7cda11ca2dd6a7304e99a9cafc8704d33204;hb=372371d54ef4c1060f3cfc70e557b28f4a4f8ee1;hp=77d445bfaf0f19c2f2a69631ed535f4fa071cd7e;hpb=185699e93bc897cd02ad2eb65e1ed658c52526f8;p=elisp%2Fepg.git diff --git a/epg.el b/epg.el index 77d445b..e3ff7cd 100644 --- a/epg.el +++ b/epg.el @@ -375,7 +375,8 @@ This function is for internal use only." "Start `epg-gpg-program' in a subprocess with given ARGS." (let* ((args (append (list "--no-tty" "--status-fd" "1" - "--command-fd" "0") + "--command-fd" "0" + "--yes") (if (epg-context-armor context) '("--armor")) (if (epg-context-textmode context) '("--textmode")) (if (epg-context-output-file context) @@ -658,8 +659,9 @@ This function is for internal use only." (if (string-match "\\`\\([0-9]+\\) \\(.*\\)" string) (epg-context-set-result-for epg-context 'error - (cons (cons 'invalid-recipient - (string-to-number (match-string 1 string))) + (cons (list 'invalid-recipient + (string-to-number (match-string 1 string)) + (match-string 2 string)) (epg-context-result-for epg-context 'error))))) (defun epg-status-NO_RECP (process string) @@ -855,7 +857,8 @@ If PLAIN is nil, it returns the result as a string." (epg-start-decrypt context (epg-make-data-from-file cipher)) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Decryption failed")) + (error "Decrypt failed: %S" + (epg-context-result-for context 'error))) (unless plain (epg-read-output context))) (unless plain @@ -875,7 +878,8 @@ If PLAIN is nil, it returns the result as a string." (epg-start-decrypt context (epg-make-data-from-file input-file)) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Decryption failed")) + (error "Decrypt failed: %S" + (epg-context-result-for context 'error))) (epg-read-output context)) (epg-delete-output-file context) (if (file-exists-p input-file) @@ -1017,7 +1021,8 @@ Otherwise, it makes a normal signature." (epg-start-sign context (epg-make-data-from-file plain) mode) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Sign failed")) + (error "Sign failed: %S" + (epg-context-result-for context 'error))) (unless signature (epg-read-output context))) (unless signature @@ -1037,7 +1042,8 @@ Otherwise, it makes a normal signature." (epg-start-sign context (epg-make-data-from-string plain) mode) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Sign failed")) + (error "Sign failed: %S" + (epg-context-result-for context 'error))) (epg-read-output context)) (epg-delete-output-file context) (epg-reset context))) @@ -1095,7 +1101,8 @@ If RECIPIENTS is nil, it performs symmetric encryption." recipients sign always-trust) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Encrypt failed")) + (error "Encrypt failed: %S" + (epg-context-result-for context 'error))) (unless cipher (epg-read-output context))) (unless cipher @@ -1115,7 +1122,8 @@ If RECIPIENTS is nil, it performs symmetric encryption." recipients sign always-trust) (epg-wait-for-completion context) (if (epg-context-result-for context 'error) - (error "Encrypt failed")) + (error "Encrypt failed: %S" + (epg-context-result-for context 'error))) (epg-read-output context)) (epg-delete-output-file context) (epg-reset context)))