(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 ()