From: ueno Date: Sun, 16 Apr 2006 20:01:19 +0000 (+0000) Subject: (epa-dired-decrypt-file): Query user for a new file. X-Git-Tag: epgsm-branchpoint~76 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1e8baf231351029c9de1154e39a9cf2ad7d5b7c;p=elisp%2Fepg.git (epa-dired-decrypt-file): Query user for a new file. --- 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 ()