Open stefan2904 opened 1 year ago
Hm, I think I got a bit confused here.
It works when I add the snippet directly in the category subtree:
* org-mode
** Some snippet with properties
\** Foo heading
:PROPERTIES:
:FOO: bla1
:bar: bla2
:END:
no properties.
\** Bar heading
:PROPERTIES:
:bar2: bla
:END:
also no properties here.
But according to the README, organizing of snippets in subtrees should be possible:
You can organize your snippets inside a category by using subtrees, like
this one. Only headings without children are considered as snippets.
But it does not, since those headings are then parsed with remove-props
set:
https://github.com/Kungsgeten/yankpad/blob/927e6d26956ac7219b8a69d641acf486854fba16/yankpad.el#L647
workaround: https://github.com/Kungsgeten/yankpad/issues/78#issuecomment-864444040
Drawers are preserved all right this way.
When I expand a snippet, the PROPERTIES drawer is gone (even when
:props:
is not set).Behavior:
1) Create yankpad snippet with PROPERTIES (as part of snippet), without the
props
tag (or theremove-props
flag) 2)yankpad-reaload
and expand that snippetExpected:
3) Snippet gets expanded including the PROPERTIES drawer
Actual:
3) Snippet gets expanded & inserted, but without the PROPERTIES drawer
I have a yankpad file like this:
When I expand it, I get:
If I inspect the value of
yankpad--active-snippets
: