On Sun, May 11 2025, Ihor Radchenko wrote:

> Kristoffer Balintona <krisbalint...@gmail.com> writes:
>
>> Thank you for the help. I've attached a diff for a set of proposed
>> changes. It has `org-capture-expand-olp' and
>> `org-capture-expand-headline' return the symbol 'file in certain cases
>> and has `org-capture-set-target-location' treat those cases specially,
>> inserting the capture entry at the top level. Additionally, I updated
>> the docstring of `org-capture-templates' appropriately and added an
>> additional test in `test-org-capture/org-capture-expand-olp'.
>
> Why not just using nil value as you initially suggested?

Currently, both `org-capture-expand-headline' and
`org-capture-expand-olp' error when the expanded headline or olp,
respectively, return nil. I wanted to preserve that assuming there was a
good reason behind this decision. Do you think interpreting a nil value
in this way is more appropriate?

>> ... Although I've never contributed to org before, so I will
>> have to read up on the conventions for patches.
>
> See https://orgmode.org/worg/org-contribute.html#patches

Thank you.

>> A separate matter:
>> I find it unusual that we have the file+olp and file target
>> specifications but not a file+datetree target specification. As a
>> result, file+olp+datetree accepts a nil olp to insert the datetree on
>> the top level but file+olp does not because that would just be
>> equivalent to the file target specification. I feel like we should
>> either add one or do something like removing the file specification and
>> having file+olp cover its case.
>
> We used to have file+datetree target, and a number of others. They have
> been consolidated into a single file+olp+datetree in Org 9.1, 8 years ago.
> See 
> https://list.orgmode.org/orgmode/CADn3Z2+AanLPvUO9ENhZ_2tkAvsmdnq9ewR3sFasn=zv--s...@mail.gmail.com/

Should we do the same with file and file+olp? Or would that be too
backwards incompatible?

-- 
Best,
Kristoffer

Reply via email to