From 7450df5dfcac171bae556c26261ab2873573f34c Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 9 Oct 2010 15:27:24 +0200 Subject: [PATCH] (epa-passphrase-callback-function): Say what we're querying the password for. --- lisp/ChangeLog | 3 +++ lisp/epa.el | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b38724aa87..3679a448430 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-10-09 Lars Magne Ingebrigtsen + * epa.el (epa-passphrase-callback-function): Say what we're + querying the password for. + * ibuffer.el (ibuffer-visit-buffer): To mimick list-buffers behaviour, don't bury the ibuffer buffer when visiting other buffers. diff --git a/lisp/epa.el b/lisp/epa.el index 8d77d6938b1..49ff3455c23 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -635,8 +635,15 @@ If SECRET is non-nil, list secret keys instead of public keys." (defun epa-passphrase-callback-function (context key-id handback) (if (eq key-id 'SYM) - (read-passwd "Passphrase for symmetric encryption: " - (eq (epg-context-operation context) 'encrypt)) + (read-passwd + (format "Passphrase for symmetric encryption%s: " + (let ((elem (epg-context-passphrase-callback context))) + ;; Add the file name to the prompt, if any. + (if (and (consp elem) + (stringp (cdr elem))) + (format " for %s" (cdr elem)) + ""))) + (eq (epg-context-operation context) 'encrypt)) (read-passwd (if (eq key-id 'PIN) "Passphrase for PIN: " -- 2.39.5