Foldables as a universal outlining/annotation... metaphor?

Forgive me if this is too rash, but it just crossed my mind: I have noticed, that a lot of DT users wish for improved outlining features, esp. folding of levels/hierarchies inside documents.

Currently, I am testing TextMate, which incorporates foldables in a very useful, customizable manner. It turns out, that foldables are a quite universal metaphor for meta-information. I can use it not only to visualize the semantic structure of my writing, but also to incorporate annotations or marginalia.

Here is how it is done in TextMate and how this could translate into a future DT-feature. TextMate needs a foldable-start and end-point, respectively, to insert a little triangle which can be clicked at to hide/show the enclosed text; a little symbol is inserted in the text to visualize that there is a folding hidden beneath. If the mouse pointer is moved over the symbol, the hidden text appears in a sticky-like manner. (When using a markup language and the enclosed text is a comment, it will be as an annotation in the source but not in the rendered text.)

The start- and stop-sequences in TextMate are customizable, which is not necessairy for DT. Here, you would ideally select a portion of text and tell DT “make selection foldable”. Then, a little, clickable triangle would be placed inside the text etc.

Although DT still cannot decide, whether the enclosed text is an annotation, an outline, a chapter or something even different, this could be quite an improvement. DT could process foldable text differently from the rest, assuming, that a lot of users will use it for describing the contents of the document (at least the first foldable of a document). Employing DTs AI-features, I am sure, a different semantic description of the documents would result, with the possibility of a second classification.

On a side note: Does the AI-engine analyze the links between documents for its results (eg. se also, etc.)?

Hope, this makes some sense.