texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Mutators and path-aware trees


From: Joris van der Hoeven
Subject: [Texmacs-dev] Mutators and path-aware trees
Date: Thu, 13 May 2004 17:36:12 +0200 (CEST)

The last version 1.0.3.8 of TeXmacs and the current CVS version come
with two important novelties for making documents more interactive and
for making it easier to write extensions to the editor in Scheme.
These features are still under development, but I will shortly
explain what they do.

Mutators
--------

These are tags '(mutator content cmd)' which can be used inside markup,
which may "modify themselves". The idea is that 'cmd' is a scheme command
which is called frequently (whenever some time is available; we'll see
later for efficiency issues). Before calling the command, the path for
accessing 'content' is stored and can be retrieved using (the-mutator-path).
This makes it possible for 'cmd' to reliably modify the content of
the mutator tag (which is what you see on the screen).

The mutator mechanism is currently used for computer algebra sessions
(and other plug-in sessions). This makes it possible to continue typing
while one or several computations are active. The partial results of
the computations will gradually appear at the right place when you
continue typing. Moreover, the behaviour with respect to copy & paste
is matural.

Another important planned application of mutators is writing interfaces
between TeXmacs and proof systems.

Path-aware trees
----------------

Previously, in order to modify part of the document, you had to know
explicitly which part you wanted to modify using a path. In version
1.0.3.8 these paths are now relative to a universal meta-document,
which contains all documents being edited as subtrees.

In the CVS we also enriched the tree class by "observers" which may track
down changes in the document trees and undertake corresponding changes.
At the moment, we implemented path observers, which make it possible
to retrieve the unique path of a tree inside the meta-document from
the tree itself. Later on, we may implement more reliable cursors
in a similar way.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]