trouble with named paste buffers and current_doc
Hey folks,
I'm trying to work with named paste buffers in a callback to manipulate content before it is output to the current doc.
I'm finding that Arbortext is getting confused on which is the current doc depending upon what actions I'm performing.
For instance, if I do oid_delete(some_oid), it removes the oid from the buffer. However, if I do a change_tag, it wants to act upon the document currently open in the window. I thought this was perhaps an issue with commands versus functions, but goto_oid() also works in the document window rather than the buffer.
Here is a snippet of my code where I am setting things up with the named buffer.
buffer_create("_temp_");
set paste = "_temp_";
local bufstr;
buffer_clipboard_contents(bufstr);
insert_buffer(bufstr,1,"_temp_");
local pdoc = buffer_doc("_temp_");
local root = oid_first(pdoc);
The oid_first() function works OK. This would lead me to think that Arbortext has picked up on the named buffer as the current doc, but as I described, it gets flakey. I've tried a current_doc(pdoc), but no luck.
Any ideas are much appreciated!

