ja fro <[email protected]> writes: > This top-level property format works for both, org-attach and org-id. > ``` > :PROPERTIES: > :ID: <timestamp-identifier> > :END: > ``` > > This top-level property format works for org-attach only. > `#+property: ID <timestamp-identifier>` > > I don't know if it is intended behavior/bug/undocumented case. In my case I > prefer the one-line form because it is shorter and I don't use other > properties besides ID.
The two cases are not the same. In the first case (with property drawer), you assign an ID to your Org document. That ID is not inherited by headings. In the second case (with #+property line, you are setting _default inherited value_ of IDs for everything, including whole document and also each heading. By default, Org mode only looks into immediate ID (not inherited), when creating ID links. If a heading has an ID - id link is created. If a heading does not have an ID, file link is created. The same applies to text before first heading - top-level PROPERTIES drawer is considered as 0th heading property that own 0th section (text before first heading). If there is no ID is PROPERTIES drawer, id link is correspondingly not created. If you want inherited IDs to be used for id: link creation, you need to enable `org-id-link-consider-parent-id', which see. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
