From e4899b1742464d28e3a21e83179717f7dd0a1c31 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sun, 6 Mar 2011 10:56:30 +0100 Subject: [PATCH] org-crypt.el: replace previous commit with a warning. --- lisp/org-crypt.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el index 060a5e941..596d183c0 100644 --- a/lisp/org-crypt.el +++ b/lisp/org-crypt.el @@ -204,12 +204,17 @@ This setting can also be overridden in the CRYPTKEY property." 'org-mode-hook (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 ;; 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 - (add-hook - 'org-mode-hook - (lambda () (add-hook 'auto-save-hook 'org-encrypt-entries nil t)))) + (message "Warning: turn auto-save-mode off in Org buffers containing crypted entries.") + (sit-for 5)) (add-hook 'org-reveal-start-hook 'org-decrypt-entry)