mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] How to get value of the environment variable from scheme?


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] How to get value of the environment variable from scheme?
  • Date: Fri, 19 Sep 2008 23:32:02 +0200

Takama M. wrote:

Henri Lesourd wrote:


Much better to use:
(tree-label $TREE) -> Symbol
(tree-arity $TREE) -> Integer
(tree-ref $TREE $INDEX) -> Tree

to read/traverse the tree.

Thanks for your kind response.
It's helpful for me.
I asked the previous question because
i consider some coordinate transformation
procedure for my graphics drawing which
refer to the value of variables such as
"gr-geometry" and "gr-grid".


Then precisely, you should use the
functions above, for there is a problem
with the (get-env-X) functions: they
depend on the *current cursor position*,
which raises unsolveable problems if
you try to use those in other contexts
than an interactively editing the object
you are currently calculating on.

That's why even in the vector graphics
editor I wrote 2 years ago, I came to
use exclusively functions built on top
of the API above, otherwise, being forced
to think all the time at : "am I 100% sure
the cursor is appropriately positioned",
it's often too much messy, except if
you don't care writing code which can
be broken in some baroque ways.




Archive powered by MHonArc 2.6.19.

Top of page