From 4cb53c0528aad73ac001a5d0b4ae336b8ec65408 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 22 Sep 2022 13:14:46 +0200 Subject: Improve don't save bookmark context from encrypted files * etc/NEWS: Mention 'bookmark-inhibit-context-functions'. Fix typos. * lisp/bookmark.el (bookmark-inhibit-context-functions): New defcustom. (bookmark-make-record): Use it. * lisp/auth-source-pass.el (auth-source-pass-file-name-p): * lisp/auth-source.el (auth-source-file-name-p): New defuns. Add them to `bookmark-inhibit-context-functions'. * lisp/epa-hook.el (epa-file-name-p): * lisp/net/tramp-crypt.el (tramp-crypt-file-name-p): Add them to `bookmark-inhibit-context-functions'. --- lisp/epa-hook.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp/epa-hook.el') diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index 70c30308819..386bd739640 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -92,6 +92,10 @@ interface, update `file-name-handler-alist'." "Say whether FILE is handled by `epa-file'." (and auto-encryption-mode (string-match-p epa-file-name-regexp file))) +(with-eval-after-load 'bookmark + (add-hook 'bookmark-inhibit-context-functions + #'epa-file-name-p)) + (define-minor-mode auto-encryption-mode "Toggle automatic file encryption/decryption (Auto Encryption mode)." :global t :init-value t :group 'epa-file :version "23.1" -- cgit v1.2.1