From c1e8baf231351029c9de1154e39a9cf2ad7d5b7c Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 16 Apr 2006 20:01:19 +0000 Subject: [PATCH] (epa-dired-decrypt-file): Query user for a new file. --- epa-dired.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/epa-dired.el b/epa-dired.el index 362a7ac..a9e11c2 100644 --- a/epa-dired.el +++ b/epa-dired.el @@ -18,9 +18,16 @@ (define-key dired-mode-map ":" 'epa-dired-prefix)) (defun epa-dired-decrypt-file (file) - (let ((context (epg-make-context))) + (let* ((default-name (file-name-sans-extension file)) + (plain (read-file-name + (concat "To file (default " + (file-name-nondirectory default-name) + ") ") + (file-name-directory default-name) + default-name)) + (context (epg-make-context))) (message "Decrypting %s..." (file-name-nondirectory file)) - (epg-decrypt-file context file (file-name-sans-extension file)) + (epg-decrypt-file context file plain) (message "Decrypting %s...done" (file-name-nondirectory file)))) (defun epa-dired-do-decrypt () -- 1.7.10.4