Inherit block links/refs to child blocks via outliner (consistent with page tags)

Hi, please make blocks and pages behave the same with regards to inheritance of links/references/tags in the outliner. With pages, links are inherited to children blocks

- [[Hello]] world (1)
  - interesting
    - content (2)

, so child block (2) inherits [[Hello]] reference in addition to the original block (1). Technically these are available in the block’s attributes :block/refs or :block/path-refs.

With blocks, situation is different:

- Hello
  id:: 1234
- ((1234)) world (1)
  - interesting
    - content (2)

Block (1) stores the block reference - you can check by right clicking the block → (Dev) Show block data and look for above attributes.
But in contrast to pages, block references are not inherited to children, so block (2) doesn’t store it in :block/path-refs.

It does actually.

:block/content "Test block A\nid:: 644038d5-1693-4ed1-8f63-3b96a5970efd",
:db/id 1003,
:block/content "Test block C",
:db/id 1005,
:block/path-refs [{:db/id 922} {:db/id 1003}],
:block/content "Test block D",
:db/id 1006,
:block/path-refs [{:db/id 922} {:db/id 1003}],

database entry 1003 (which is Test block A) shows up in the path-refs for Test block C as well as Test block D.

image

2 Likes

Thanks for your testings!

Omg I could swear this has not been the case before. I checked twice, first time some weeks ago and today in brevity. But this actually already seems to work, hence good news. Need to have some deeper look at it.