org-crypt.el: replace previous commit with a warning.
This commit is contained in:
parent
7c56155933
commit
e4899b1742
|
@ -204,12 +204,17 @@ This setting can also be overridden in the CRYPTKEY property."
|
||||||
'org-mode-hook
|
'org-mode-hook
|
||||||
(lambda () (add-hook 'before-save-hook 'org-encrypt-entries nil t))))
|
(lambda () (add-hook 'before-save-hook 'org-encrypt-entries nil t))))
|
||||||
|
|
||||||
|
;; FIXME Find a better way to encrypt Org auto-saved buffers?
|
||||||
;; When `auto-save-default' is non-nil, make sure entries are
|
;; When `auto-save-default' is non-nil, make sure entries are
|
||||||
;; encrypted before auto-saving
|
;; encrypted before auto-saving
|
||||||
|
;; (when auto-save-default
|
||||||
|
;; (add-hook
|
||||||
|
;; 'org-mode-hook
|
||||||
|
;; (lambda () (add-hook 'auto-save-hook 'org-encrypt-entries nil t))))
|
||||||
|
|
||||||
(when auto-save-default
|
(when auto-save-default
|
||||||
(add-hook
|
(message "Warning: turn auto-save-mode off in Org buffers containing crypted entries.")
|
||||||
'org-mode-hook
|
(sit-for 5))
|
||||||
(lambda () (add-hook 'auto-save-hook 'org-encrypt-entries nil t))))
|
|
||||||
|
|
||||||
(add-hook 'org-reveal-start-hook 'org-decrypt-entry)
|
(add-hook 'org-reveal-start-hook 'org-decrypt-entry)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue