Hi,
How do I capture an author's close of a file. I expected to be able to use a
close callback, but unless I'm missing something crazy-obvious, that
callback doesn't seem to exist. No close hook, either. Again, unless I'm
somehow tripping over my own feet. I found some references to the quit
callback but that captures when Editor is quit, not the document open in
Editor. Am I missing something?
This is related only because I am trying to solve the same problem prompting
the question above another way. I want to control the placement of the Caret?> processing instruction when a file is closed. I can control it on
save, however, I don't want to move the caret during an edit session. I have
tried to move the caret, save, and then return it to its original location,
but this seems to move the processing instruction even though
no new save is performed after that last move.
The code I'm using for this is:
local current_oid = oid_caret();
local current_pos = oid_caret_pos();
goto_oid(oid_root),'-2');
caret 1,0
save;
goto_oid(current_oid,current_pos);
If I comment the last line, the PI is placed near the top of the file as I
would expect. When the goto_oid process, however, it is moving the PI. What?
Why? Is this known (if undocumented) behavior?
--
Paul Nagai