On Mon, Nov 20, 2006 at 03:49:08PM +0100, Lionel Elie Mamane wrote: > Given t a value of type tree in TeXmacs's scheme environment, is there > an easy way to find the value what a certain TeXmacs variable has at > that point in the document? Roughly, what the tree (value "foo") would > be if placed at the place of t. I mean, suppose that the tree-type > value points at the tree (here) in the following document: > > (with "foo" "bar" > (document > "blah" > (with "foo" "baz" > (session > (document > (input "$" "Go! Go!") > (input (concat "$" (here) "%") "Back! Back!") > (output "No luck here.")))))) > > I would get "baz". An "easy" way means short of doing tree-up until > one encounters a (with "foo" . .) or (with . . "foo" . .) or > (with . . . . "foo" . .) where "." stands for any tree. > An easy way includes a library routine that would do just that.
This is easy to program as long as you want to retrieve changes made using 'with'. However, this mechanism is not safe for more intricated changes in the environment (a macro which modifies an environment variable, for example). At the moment, you can only get the correct value of the environement variable for editable documents in this case (get-env-tree-at). If you want to apply this for a scheme document, you would first have to open a new buffer with this scheme document as its contents. But maybe this is overkill for what you want. _______________________________________________ Texmacs-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/texmacs-dev
