Trevoke / org-gtd.el

A package for using GTD with org-mode
GNU General Public License v3.0
367 stars 45 forks source link

org-gtd-clarify-projects-insert-template doesn't respect newlines in templates #161

Open marabout2015 opened 1 year ago

marabout2015 commented 1 year ago

org-gtd-clarify-projects-insert-template should be an interactive function. This simplifies calling it when clarifying a project.

Trevoke commented 1 year ago

You are absolutely correct. Fixing this now. Sorry about that!

marabout2015 commented 1 year ago

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".

Trevoke commented 1 year ago

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?

marabout2015 commented 1 year ago

Yes that is how I have it. I did not have the asterisk ('*'). With the asterisk, the template got inserted but without the newlines:

Trevoke commented 1 year ago

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.

marabout2015 commented 1 year ago

Thank you!

marabout2015 commented 1 year ago

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

Trevoke commented 1 year ago

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?

marabout2015 commented 1 year ago

(emacs-version) "GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) of 2022-09-13" And org-gtd 3.0.0