Okay, here's an interesting, halfassed, postmodern idea tangentially related to the problem and the design of editors in general.

Imagine the following:

-An editor that chews on input and spits out (gasp) XML atomically, relying as anything does on the FS syncer for on-disk integrity, with no attempt at garbage-collection or cleanup. This creates something equivalent to the mess of a .DOC file and basically keeps a versioned log for the session.

-The editor has a Wow-key, if you'd like, to shove in a comment or annotation. It automatically logs time/date and maybe spits an anchor tag into the text stream to handle divining cursor location.

-By default, whacking save forces a sync on the working XML, walks said XML mess, and spits out a clean output file in whatever export/interchange format is appropriate for the app.

-The XML DTD used for this ridiculous idea is something ridiculously simple and standardized that mostly consists of tags for data and tags for metadata.

-*If* the filesystem supports a more efficient way of packing metadata, an external daemon shipped with the filesystem handles the task of walking closed files, checking for the appropriate type declaration, and doing the conversion in the background.

-Somewhere in the operating system's VFS layer or whatever lives a function that calls on the filesystem to return a handle to a virtual? or temporary? file that's a dump of filesystem_proprietary_metadata_packing back into the standard XML representation. Possibly/probably the FS is required to handle this as a true flat file somewhere for data-integrity purposes until it's closed and the asynchronous packing daemon can catch it again.

This maybe adds minimal complexity to everything, with most of the work falling on the authors of filesystems that bother to support EAs or Resource Forks or whatever, who in tradeoff would get to see applications actually finally take advantage of them.

There may or may not be a convenient way to skip the flat file step, but give me a break, I just came up with this while sucking down a cigarette.

(See references to the 'Grande Paihia' browser -- http://www.paihia.co.uk/ though there's nothing there -- which is another 'hey XML might be good for something' project, translating documents of various types into some kind of conformant representation to keep the renderer simple.)