first of all, impressed with the resilience of TP when u edit stuff outside TP on the same txt file and it just maintains “frame” smoothly. for example, adding “hello” in a new line between lines 5 and 6. very nice!
my use case is that i have an AI system I collaborate with it, and its kind of like google docs where we are both updating a particular scoped project like “test project for taskpaper”.
it (seems like it) would be awesome if it could silently update the text within the current frame (per screenshot) and insert stuff and then taskpaper smoothly maintain frame and update it and show it.
is there a reason this isn’t supported?
I manually simulated this by using sublime (on the right) to add “cabbage” on the right in sublime between lines 10 and 11, and taskpaper pretty immediately loses frame and just renders the entire file normally rather than being in that one project scope.
curious to hear thoughts and not yet a formal request. i wonder if it’s also possible to update the text file in a non-obvious way as to accommodate this. currently, it just reads the file, updates content, and overwrites the entire file so there might be finer ways to do it on my part.
thoughts around any of this or how to make this possible right now? ideally, without having it go through taskpaper (like api) but I imagine worst case that is also viable
The TaskPaper documentation uses the term focus, as in the menu items Outline > Focus > (In | Out)
Is that what we are discussing here ?
You need to use another app to insert between lines outside the active TaskPaper editor focus, without disrupting that focus ?
Perhaps the external application is overwriting or losing the extended attributes (as in man xattr) which TaskPaper uses to serialize focus state into a document text file.
I think it’s unlikely that this will change. Generally reloading the file when edited externally is a nice ability that TaskPaper has, but not really a core feature, and it’s not really mean to work in a collaborative way with AI and you going at same time.
@complexpoint’s suggestion about xattr is good and might solve the problem, but I think you’ll still run into rough edges this way.
Maybe too much work, but I think better way to do this would be to have the AI insert changes via TaskPaper’s AppleScript api. That would be better for undo stack, and focus, and generally that’s how external changes should come in.
I do something similar – triggering an external process which adds material to a focused outline, without losing the editor’s outline-focus state,
but, I do it in Bike rather than TaskPaper.
Why ? One simple and sufficient reason is that each element in a Bike outline has a unique and persistent ID, findable not only at run-time in the editor, but also as XML attribute values, in the serialised .bike file.
A problem for both focus retention and insertion/update targeting in TaskPaper, is that outline node ids are used in the TaskPaper editor at run-time, but are not to be found in the file, and don’t persist between sessions.
i.e. if I were choosing a tool from scratch for what you describe, I would probably go for Bike.
( but I haven’t experimented to test when/if parse model ids can persist across external file updates. It seems a long shot. You may have to pass the whole of the updated text to a script which looks for diffs, without reloading and losing the parse model, and inserts things into the model more intelligently )