2006-11-12 Daiki Ueno <ueno@unixuser.org>
+ * epa.el (epa-popup-info-window): Turn on by default.
+ (epa-display-info): Split selected window instead of pop-to-buffer.
+
+2006-11-12 Daiki Ueno <ueno@unixuser.org>
+
* epa.el (epa-display-info): Generalized; renamed from
epa-display-verify-result.
(epa-decrypt-file): Use it.
:type 'boolean
:group 'epa)
-(defcustom epa-popup-info-window nil
+(defcustom epa-popup-info-window t
"If non-nil, status information from epa commands is displayed on
the separate window."
:type 'boolean
(defun epa-display-info (info)
(if epa-popup-info-window
- (progn
+ (save-window-excursion
(unless epa-info-buffer
(setq epa-info-buffer (generate-new-buffer "*Info*")))
(save-excursion
buffer-read-only)
(erase-buffer)
(insert info))
- (epa-info-mode))
- (pop-to-buffer epa-info-buffer)
- (if (> (window-height) epa-info-window-height)
- (shrink-window (- (window-height) epa-info-window-height)))
- (goto-char (point-min)))
+ (epa-info-mode)
+ (goto-char (point-min)))
+ (if (> (window-height)
+ epa-info-window-height)
+ (set-window-buffer (split-window nil (- (window-height)
+ epa-info-window-height))
+ epa-info-buffer)
+ (pop-to-buffer epa-info-buffer)
+ (if (> (window-height) epa-info-window-height)
+ (shrink-window (- (window-height) epa-info-window-height)))))
(message "%s" info)))
(defun epa-display-verify-result (verify-result)
(message "Importing %s...failed" (file-name-nondirectory file))))
(if (epg-context-result-for context 'import)
(epa-display-info (epg-import-result-to-string
- (epg-context-result-for context 'import))))))
+ (epg-context-result-for context 'import))))
+ (if (eq major-mode 'epa-keys-mode)
+ (apply #'epa-list-keys epa-list-keys-arguments))))
;;;###autoload
(defun epa-export-keys (keys file)