Tried to use notifications to diagnose non-update UI problem. Unsuccessful.
Added code to try to force UI update. Unsuccessful.
Disabled automatic quote substation
document file is now written out as it should be.
better implementation of "textDidChange" gives
a partial solution to the UI update problem.
But is is hiding the underlying problem.