org-gtd-clarify-projects-insert-template doesn't respect newlines in templates
marabout2015 opened this issue · comments
org-gtd-clarify-projects-insert-template should be an interactive function. This simplifies calling it when clarifying a project.
You are absolutely correct. Fixing this now. Sorry about that!
Thank you/ Also, I'm not sure how to work this. I've created a template (name . string). When I run the function to insert it, I only get the message "if: The kill is not a (set of) tree(s). Use ‘C-y’ to yank anyway".
There's an example of "how it should work" in the tests, like this:
(setq org-gtd-clarify-project-templates
'(("prepare a video" . "* think of topic\n* record video\n* edit video"))))
Is this also how you have it? A list of cons cells?
Yes that is how I have it. I did not have the asterisk ('*'). With the asterisk, the template got inserted but without the newlines:
- foo
:PROPERTIES:
:ID: foo-2023-05-21
:END:
[2023-05-21 Sun 20:42]
** task 1\n* task 2\n* task 3
Well, that tells me that I thought I had run a manual smoke test for this but I must have only run the automated tests. Okay, keeping this open, I'll look at it tomorrow.
Thank you!
In this workaround, I used Ctl-q Ctl-j to insert newlines in the template.
Hide Org Gtd Clarify Project Templates:
Alist:
INS DEL String: test
String: * task 1
- task 2
- task 3
INS
State
Hmm, alright, this is strange -- for me it works.
What version of emacs are you using? What version of org-mode are you using? Can I see the project template variable?
(emacs-version)
"GNU Emacs 28.2 (build 2, x86_64-w64-mingw32)
of 2022-09-13"
And org-gtd 3.0.0