Hi, In my org-capture-templates, I use a function to return the outline path of my datetree target: (file+olp+datetree <file-spec> function-returning-list-of-strings) However, in my desired workflow, sometimes the function I use for function-returning-list-of-strings returns an outline path of nil; in such cases, I just want the datetree to be top-level. (Other times this function returns the outline path as a list of strings, and in these cases the capture works fine.)
It would be nice if the top-level datetree in <file-spec> would simply be used if the function supplied for function-returning-list-of-strings returns nil. Alternatively, a target specification like (file+olp+datetree function-returning-file-path-and-olp) or (file+olp+datetree list-of-file-path-and-olp) would suffice. Are such changes desirable? If they are, I could try preparing a patch, but looking at org-capture-set-target-location, I'm not sure how easy this would be easy. -- Best, Kristoffer