diff options
author | Vincent Ambo <mail@tazj.in> | 2023-08-23T20·18+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-08-23T20·22+0000 |
commit | e9bbc5f2af35c9c303a20adfa3c805eb13db767f (patch) | |
tree | cf6d4852a2e00746977dc5d4d2831bea38e62b53 /users | |
parent | 254f81f5c9dee1a05b9e6b320ea41ce164951e32 (diff) |
fix(tazjin/emacs): suppress incredibly ennoying EPA error buffer r/6522
When entering an incorrect GPG key password, I don't want my whole buffer layout ruined. A small error message in the modeline is enough. Change-Id: I7318d685e74fa4e110a9bff30d0de9f7f18b2be4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9149 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'users')
-rw-r--r-- | users/tazjin/emacs/config/functions.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/users/tazjin/emacs/config/functions.el b/users/tazjin/emacs/config/functions.el index 4ac4580176ae..08c4179ba27b 100644 --- a/users/tazjin/emacs/config/functions.el +++ b/users/tazjin/emacs/config/functions.el @@ -114,7 +114,9 @@ the GPG agent correctly." nil ;; predicate t ;; require-match )) - (password (auth-source-pass-get 'secret entry))) + (password (or (let ((epa-suppress-error-buffer t)) + (auth-source-pass-get 'secret entry)) + (error "failed to decrypt '%s', wrong password?" entry)))) (password-store-clear) (kill-new password) (setq password-store-kill-ring-pointer kill-ring-yank-pointer) |