org-crypt: Fix data loss when providing an empty key
commitdd727cf0cb5319521f71d389a39dc3def541b2ef
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Sun, 1 Jan 2017 09:26:22 +0000 (1 10:26 +0100)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Sun, 1 Jan 2017 09:34:36 +0000 (1 10:34 +0100)
treee10a9650043b2e009f6f8b8f4d5d014bf97f76f6
parentdff9cf9c80748236d2fa3cb5da11c2c94e944b03
org-crypt: Fix data loss when providing an empty key

* lisp/org-crypt.el (org-encrypt-entry): Insert original text back
  upon encryption failure.

Reported-by: fxiny <wtimew@libero.it>
<http://permalink.gmane.org/gmane.emacs.orgmode/111115>
lisp/org-crypt.el