Open rodrigomorales1 opened 11 months ago
Hi! Sorry for the late comment, I've been busy with life for the past months but have started to get back into things.
I like this idea actually. This could even be made to be interactive and show the user what's being added where. I'll see if I can get something working.
I just merged a new function called yaml-pro-ts-add-mapping
to do what you described here. Turns out to work really well for generating tree structures!
In order to create headlines programmatically in Org Mode, I have written this function that creates this function given its headline. See minimal working example in the second code block below.
Minimal working example:
I believe that having a function that does the same in YAML files would be useful for creating YAML fields programmatically.
The function could be called
yaml-create-field
.The following is a minimal working example that shows an idea of how the function should behave: Given the following YAML document
Evaluating
(yaml-create-field '("2" "2.1" "2.1.1"))
would result in the following document. The position of point is represented with<point>
.PS: This link contains the function
my/org-create-headline-with-outline
shown above with some comments.