(epa-dired-decrypt-file): Query user for a new file.
authorueno <ueno>
Sun, 16 Apr 2006 20:01:19 +0000 (20:01 +0000)
committerueno <ueno>
Sun, 16 Apr 2006 20:01:19 +0000 (20:01 +0000)
epa-dired.el

index 362a7ac..a9e11c2 100644 (file)
   (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 ()