On Tue, Aug 08, 2006 at 12:44:55PM +0200, Henri Lesourd wrote: > Lionel Elie Mamane wrote:
>> I'd like my code to get notified (and be able to do stuff) when >> text in an <input> of a Coq session is modified / deleted, as well >> as when a whole <input> or a whole Coq <session> is deleted (or >> cut) or pasted. Is there any way to do this in TeXmacs currently, >> or would it be rather straightforward to add > This is definitely a feature for which I see a need, for reasons > rather similar to your concerns. > As far as I know, this is thus a natural extension of TeXmacs > programming, but before, we must stabilize simpler features which > have been implemented over the last year,() .... I would say that > after this, features like notification are next on the list. Aha, good. > As for me, what I do currently to solve these kinds > of problems is retaining a copy of the relevant chunks > of the document at one point in time, and when I need > it, comparing them to the current version. Yes, this was my backup plan, but: > For implementing this, you only need (...) and to be able to know > when the comparison should be done. This latter one is the critical > point, which depends on your application : as for me, what I do is > that I check changes when an "action" occurs, namely, when the users > hits Ctrl-Return inside a session That was roughly my plan, except that I just do it in the serializer instead of overriding the whole action, so I avoid this problem: > the problem with this is that for example in a session, because I > hook (i.e., I replace) the action which previously implemented the > sending of the current line to the plugin, I must also reimplement > the low-level machinery for adding a new line if the user is doing a > submit when located on the last line, or either just put the cursor > to the next line and update the output just above with the result > computed by my plugin. The only remaining problem is that I notice the changes later than I'd like, but it is not catastrophic. Thanks for all, -- Lionel _______________________________________________ Texmacs-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/texmacs-dev
