Enable Org major mode in temp buffer before using org-element

This commit is contained in:
louie 2018-01-31 21:46:32 +08:00
parent bb5c43490f
commit 971181df30

View file

@ -339,6 +339,7 @@ DECK is used when the action is note creation."
(org-element-property :begin note-elem)
(org-element-property :end note-elem))))
(with-temp-buffer
(org-mode)
(insert content)
(car (org-element-contents (org-element-parse-buffer)))))
note (anki-editor--heading-to-note note-elem))