Suppose that one has a list of items on a file
koko.org (hereafter called the
org file), as follows:
* heading A FOO * heading B BAR
The list contains two items. My objective is to have a macro, preferably within the scope of an item, that will trigger the following actions:
- obtain the heading of the current item,
- capture the contents of the item on a given buffer, and
- save the content of the buffer in a file.
e.g. the first item after the macro is called will save a file
text.txt in a directory called
A containing the text
FOO, and similarly for the second item.