From 36a1cda72432cf07319f0314b62d5bcc46f65ee5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 Jun 2024 18:41:42 -0400 Subject: [PATCH] fix(org): revise org-crypt init The `org-decrypt-entry` hook is redundant with a hook org-crypt already adds to `org-fold-reveal-start-hook` at load time. Fix: #7835 Fix: #6250 --- modules/lang/org/config.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index fb297e1c4..8bc5fc535 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -1153,15 +1153,12 @@ between the two." (use-package! org-crypt ; built-in :when (modulep! +crypt) :commands org-encrypt-entries org-encrypt-entry org-decrypt-entries org-decrypt-entry - :hook (org-reveal-start . org-decrypt-entry) + :hook (org-load . org-crypt-use-before-save-magic) :preface ;; org-crypt falls back to CRYPTKEY property then `epa-file-encrypt-to', which ;; is a better default than the empty string `org-crypt-key' defaults to. (defvar org-crypt-key nil) - (after! org - (add-to-list 'org-tags-exclude-from-inheritance "crypt") - (add-hook! 'org-mode-hook - (add-hook 'before-save-hook 'org-encrypt-entries nil t)))) + (after! org (add-to-list 'org-tags-exclude-from-inheritance "crypt"))) (use-package! org-clock ; built-in