Skip Collins writes: > Recently, I get an error message when invoking custom capture > templates like this one: > ("n" "Note" entry > (file "~/Documents/org/beorg/capture.org") > "* %^{note} :note: %(org-set-property \"Created\" > (org-time-stamp-inactive '(16)))" :immediate-finish t) > > ... > But the pre-populated *Capture* window contains an error message: > * :note: %![Error: (error Calling ‘org-fold-core-region’ with missing SPEC)] > :PROPERTIES:... Thanks for the report! This is quite a hacky capture template... What you are seeing happens because template expansion happens in fundamental-mode and org-set-property does not work anymore outside org-mode. I'd say that setting org-mode during template expansion is reasonable. The fix is attached. I do not push the fix just yet. If anyone think that enabling org-mode during template expansion is undesired, please let me know. Best, Ihor