0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 19:07:52 +00:00

Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-01-01 10:35:06 +01:00
commit 20f6c1965c

View file

@ -183,7 +183,11 @@ See `org-crypt-disable-auto-save'."
(org-end-of-subtree t t)
(org-back-over-empty-lines)
(let ((contents (delete-and-extract-region beg (point))))
(insert (org-encrypt-string contents crypt-key)))
(condition-case err
(insert (org-encrypt-string contents crypt-key))
;; If encryption failed, make sure to insert back entry
;; contents in the buffer.
(error (insert contents) (error (nth 1 err)))))
(when folded
(goto-char start-heading)
(outline-hide-subtree))