Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] tmEgg and TeXmacs [was: Reporting bugs in TeXmacs]

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] tmEgg and TeXmacs [was: Reporting bugs in TeXmacs]


Chronological Thread 
  • From: Joris van der Hoeven <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] tmEgg and TeXmacs [was: Reporting bugs in TeXmacs]
  • Date: Tue, 8 Aug 2006 14:09:34 +0200

On Tue, Aug 08, 2006 at 09:22:16AM +0200, Lionel Elie Mamane wrote:
> While I have your attention:
>
> 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 (as in, you can roughly delineate
> how to do it, and I could do it without being intimate with the
> TeXmacs internals)? What I'd like is to be able to register a "hook"
> (a scheme function) that gets called when the described event
> happens.
>
> The reason I want this is:
>
> tmEgg tries to enforce that, were one to save the document, exit
> TeXmacs, start a new TeXmacs and reopen the same document, one would
> get the same results by executing the Coq commands in the document.

The best way to achieve this is probably to use linking in
a more extensive manner. Basically, I recommend to store the whole
Coq session in some invisible part of the document (or in
scheme variables) and refer to the inputs and outputs by links.
This allows you to cut & paste, search & replace and do whatever
editing operations seem useful to you without having to change
anything to the usual editor. Only when saving/loading the document,
you might need to undertake some additional action.
Something similar happens in the case of the new linking system :
no main changes to the editor, but an analysis of all links
(and most importantly the extern ones) when saving the document.

In addition, you might need a better client-server model in the future
(cf. my previous email), but this is probably a bit less urgent.

Best wishes, Joris



Archive powered by MHonArc 2.6.19.

Top of Page