mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 11:21:04 -08:00
* lisp/epa.el (epa-read-file-name): New function.
(epa-decrypt-file): Make plain-file optional. Use epa-read-file-name. * doc/misc/epa.texi (Cryptographic operations on files): Update epa-decrypt-file. Fixes: debbugs:14510
This commit is contained in:
parent
ad257d4f6c
commit
ff4871b986
4 changed files with 27 additions and 14 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
2013-06-10 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* epa.texi (Cryptographic operations on files): Update epa-decrypt-file.
|
||||||
|
|
||||||
2013-06-04 Katsumi Yamaoka <yamaoka@jpl.org>
|
2013-06-04 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||||
|
|
||||||
* gnus.texi (Article Date):
|
* gnus.texi (Article Date):
|
||||||
|
|
|
||||||
|
|
@ -240,8 +240,9 @@ you answered yes, it will let you select the signing keys.
|
||||||
@node Cryptographic operations on files
|
@node Cryptographic operations on files
|
||||||
@section Cryptographic operations on files
|
@section Cryptographic operations on files
|
||||||
|
|
||||||
@deffn Command epa-decrypt-file file
|
@deffn Command epa-decrypt-file file &optional output
|
||||||
Decrypt @var{file}.
|
Decrypt @var{file}. If you do not specify the name @var{output} to
|
||||||
|
use for the decrypted file, this function prompts for the value to use.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command epa-verify-file file
|
@deffn Command epa-verify-file file
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-06-10 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* epa.el (epa-read-file-name): New function. (Bug#14510)
|
||||||
|
(epa-decrypt-file): Make plain-file optional. Use epa-read-file-name.
|
||||||
|
|
||||||
2013-06-09 Aidan Gauland <aidalgol@amuri.net>
|
2013-06-09 Aidan Gauland <aidalgol@amuri.net>
|
||||||
|
|
||||||
* eshell/em-term.el (eshell-visual-command-p): Fix bug that caused
|
* eshell/em-term.el (eshell-visual-command-p): Fix bug that caused
|
||||||
|
|
|
||||||
27
lisp/epa.el
27
lisp/epa.el
|
|
@ -620,21 +620,24 @@ If SECRET is non-nil, list secret keys instead of public keys."
|
||||||
(floor (* (/ current (float total)) 100))))
|
(floor (* (/ current (float total)) 100))))
|
||||||
(message "%s..." prompt))))
|
(message "%s..." prompt))))
|
||||||
|
|
||||||
|
(defun epa-read-file-name (input)
|
||||||
|
"Interactively read an output file name based on INPUT file name."
|
||||||
|
(setq input (file-name-sans-extension (expand-file-name input)))
|
||||||
|
(expand-file-name
|
||||||
|
(read-file-name
|
||||||
|
(concat "To file (default " (file-name-nondirectory input) ") ")
|
||||||
|
(file-name-directory input)
|
||||||
|
input)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun epa-decrypt-file (decrypt-file plain-file)
|
(defun epa-decrypt-file (decrypt-file &optional plain-file)
|
||||||
"Decrypt DECRYPT-FILE into PLAIN-FILE."
|
"Decrypt DECRYPT-FILE into PLAIN-FILE.
|
||||||
|
If you do not specify PLAIN-FILE, this functions prompts for the value to use."
|
||||||
(interactive
|
(interactive
|
||||||
(let (file default-name plain)
|
(let* ((file (read-file-name "File to decrypt: "))
|
||||||
(setq file (read-file-name "File to decrypt: "))
|
(plain (epa-read-file-name file)))
|
||||||
(setq default-name (file-name-sans-extension (expand-file-name file)))
|
|
||||||
(setq plain (expand-file-name
|
|
||||||
(read-file-name
|
|
||||||
(concat "To file (default "
|
|
||||||
(file-name-nondirectory default-name)
|
|
||||||
") ")
|
|
||||||
(file-name-directory default-name)
|
|
||||||
default-name)))
|
|
||||||
(list file plain)))
|
(list file plain)))
|
||||||
|
(or plain-file (setq plain-file (epa-read-file-name decrypt-file)))
|
||||||
(setq decrypt-file (expand-file-name decrypt-file))
|
(setq decrypt-file (expand-file-name decrypt-file))
|
||||||
(let ((context (epg-make-context epa-protocol)))
|
(let ((context (epg-make-context epa-protocol)))
|
||||||
(epg-context-set-passphrase-callback context
|
(epg-context-set-passphrase-callback context
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue