2006-11-12 Daiki Ueno <ueno@unixuser.org>
+ * epg.el (epg-delete-keys): Decode delete-problem.
+
* epa.el (epa-popup-info-window): Turn on by default.
(epa-display-info): Split selected window instead of pop-to-buffer.
(epg--start context (cons (if allow-secret
"--delete-secret-key"
"--delete-key")
- (mapcar
- (lambda (key)
- (epg-sub-key-id
- (car (epg-key-sub-key-list key))))
- keys))))
+ (mapcar
+ (lambda (key)
+ (epg-sub-key-id
+ (car (epg-key-sub-key-list key))))
+ keys))))
;;;###autoload
(defun epg-delete-keys (context keys &optional allow-secret)
(progn
(epg-start-delete-keys context keys allow-secret)
(epg-wait-for-completion context)
- (if (epg-context-result-for context 'error)
- (error "Delete keys failed: %S"
- (epg-context-result-for context 'error))))
+ (let ((entry (assq 'delete-problem
+ (epg-context-result-for context 'error))))
+ (if entry
+ (error "Delete keys failed: %s"
+ (assq (cdr entry) epg-delete-problem-reason-alist)))))
(epg-reset context)))
;;;###autoload