0

This is what I used to have before:

("w" "Weekly" item (file+weektree (concat org-directory "Weekly.org")))

(where org-directory is ~/Notes) and it used to create a tree of this formatin ~/Notes/Weekly.org:

* <YEAR>
** <YEAR>-W<WEEK#>

This started failing once I updated org because the four ways of specifying a date tree were merged into one so I tried

("w" "Weekly" item (file+olp+datetree (concat org-directory "Weekly.org") :tree-type 'week))

  1. However, now it complains Invalid file location: nil. I checked the value of org-directory and it's the same. Replacing the concat with the full path of the file works. I'm not sure why it doesn't accept the concat call.

  2. The other issue is that it throws an error for how the :tree-type is specified. I tried specifying it as week, 'week and "week" but it doesn't accept any of them. What's the right way to specify it?

2

Here is what you are looking for:

("w" "Weekly" item (file+olp+datetree (concat org-directory "Weekly.org")) "* %?" :tree-type week)

You need to specify a capture template ("* %?" above).

The property list comes after the template string, not in the target element [(file+olp+datetree ...)]. And :tree-type expects the bare word week.

Also see the function org-capture-upgrade-templates which can help you upgrade your templates.

  • Ah, thanks for pointing out that I was missing the capture template. Fixed it and it works now :). Also, org-capture-upgrade-templates is pretty handy! – kshenoy Jun 20 '18 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.