I have a bunch of headings scattered around with certain tags.
Is there any way to create a subheading that is somehow a result of all these headings?
I want to eventually export such a subheading to html.
EDIT: Here's an example
I have a project that needs some power tools to be bought, so I will send a list of items to buy to the shop.
In my tools file, I have a few headings with power tools tagged :projecta:. These headings are scattered around the file tool.org
I want to somehow make a subheading where these headings that include the tag :projecta: appears. That way, I can export this subheading to html which I can send to the shop.
EDIT 2: I picture this as a query, which results in some kind of created buffer, so that I can export it.
EDIT 3: Programmatically, this would then be solved like scanning a set of files and extract the headings that contains the tag :projecta: along with their contents and put it into a new buffer.
org-refile
is the answer in the first case; I don't know how to do the second case (maybe a sparse tree, but last time I tried I couldn't make it work. See Sparse trees in the manual.)org-refile
can copy the relevant headings to another file, leaving the original headings untouched. It seems to be exactly what you need for what you describe in EDIT 3.