I'm trying to set up a capture that automatically deactivates the undo-tree history saving in an encrypted file by setting file local variables. When I call the capture and have entered the filename the following error happens:
error("Capture template `%s': %s" "E" "Template is not a valid Org entry or tree")
(setq org-capture-templates
'(("E" "Encrypted File" entry (file my-org-capture-ask-for-filename)
"-*- undo-tree-auto-save-history: nil; epa-file-encrypt-to: nil; -*-
* %i%?")))
The error disappears once I remove the file variables:
(setq org-capture-templates
'(("E" "Encrypted File" entry (file my-org-capture-ask-for-filename)
"* %i%?")))
Do I have to escape the file variable line somehow?