Hello,
Nicolas pointed me in the right direction! It was so obvious that I looked right passed it:
Should just create a temp buffer with the text (headline+plainlist+text) i wish to parse, then parse that temp-buffer... so obvious, sorry for the waste of time.
Just to give an idea of what I'm trying to accomplish:
The first implementation remains simple: I'll create 2 interactive functions,
1: Having point on headline, (concept-expand) will call (concept-expand-headline) in which a level 1 headline containing a link is expanded based on the content of that link. Subheadline becomes + plainlist, +plainlist becomes -plainlist. For example:
* readme
Some text...
** goal
Anything...
** [[*something][something]] step
+ woot
* [[*readme][readme]] This is a readme
Expanding headline 'this is a readme' would result in
* [[*readme][readme]] This is a readme
+ goal
+ [[*something][something]] step
2: Having point on item, (concept-expand) will call (concept-expand-item) in which items get expanded
For example: expanding item 'step results in
* [[*readme][readme]] This is a readme
+ goal
+ [[*something][something]] step
** [[link of choice or no link at all]] Do this first :step:
Now this does seem quite stupid. In a second and third implementation I'll try to increase the locations where concepts may be found (project, personal, system-wide), in files (based on filename and directory) or subheadlines (instead of headlines), expanding subheadlines and files (based on filename and directory),...
I'm kind of looking for a way to create some abstractions/concepts, without ever being tied to a static model/template. People must never be forced to use the system. It remains a free choice whether you use concepts, create your own or just choose to write anything. Any document always remains human readable plain text. Some concepts will always be very divers, others will survive the test of time and stabilize.
What do you think? Waste of time? :)
kind regards,
Dieter