diff options
author | Thierry Volpiatto <thievol@posteo.net> | 2020-08-15 08:23:14 +0200 |
---|---|---|
committer | Thierry Volpiatto <thievol@posteo.net> | 2020-08-15 08:23:14 +0200 |
commit | c72ed13f0007f6d9bc0e1400d97c69e12d0ae6e9 (patch) | |
tree | b1d4018be7dafc884cc0daa270831ce1ea951803 /helm-misc.el | |
parent | caf78b984fb71d30b151d260976989aab0309f1b (diff) |
Add encrypt action to helm-list-epg-keys
Diffstat (limited to 'helm-misc.el')
-rw-r--r-- | helm-misc.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/helm-misc.el b/helm-misc.el index f20ff06e..2d551538 100644 --- a/helm-misc.el +++ b/helm-misc.el @@ -363,6 +363,11 @@ Default action change TZ environment variable locally to emacs." uid 'face 'font-lock-warning-face)) key))) +(defun helm-epa-encrypt-file (candidate) + "Select a file to encrypt with key CANDIDATE." + (let ((file (helm-read-file-name "Encrypt file: "))) + (epa-encrypt-file file candidate))) + (defun helm-list-epg-keys () "List all gpg keys. This is the helm interface for `epa-list-keys'." @@ -373,7 +378,8 @@ This is the helm interface for `epa-list-keys'." (require 'epg) (require 'epa)) :candidates 'helm-epg-get-key-list - :action '(("Show key" . epa--show-key))) + :action '(("Show key" . epa--show-key) + ("encrypt file with key" . helm-epa-encrypt-file))) :buffer "*helm epg list keys*")) (provide 'helm-misc) |