environment variables



Am 10 Jun 2006 um 23:53 hat Vadim V. Zhytnikov geschrieben:

> 
> On the other hand *maxima-tempdir* and *maxima-userdir*
> are dynamic run-time variables.  They depend on concrete
> Maxima execution environment.  It is quite natural that
> user may want to reset them.  But I see one trouble
> namely - Maxima strings which are essentially symbols.
> If we make new Maxima level option variable maxima_tempdir
> and set maxima_tempdir:"blah-blah-blah" then value
> of $maxima_tempdir will be lisp symbol not lisp string.
> I'm not sure that this will work well on all lisp
> implementations if blah-blah-blah contain national
> characters.
> 
>       Vadim V. Zhytnikov
> 
Vadim,

since 5.9.2 or 5.9.3 we already have this problem with $file_search_maxima 
($file_search_xyz). 

With my 5.9.1 maxima-init.mac containing 
file_search_maxima: append(["mydir"],file_search_maxima)$
I got an error message when loading. ( |&mydir| is not of type SEQUENCE )
Just what you mentioned: "mydir" is a symbol.

Wayout at maxima level:  
append( [sconcat("mydir")], file_search_maxima )$

At lisp level:  
In stringproc.lisp there is a small function which converts Maxima.strings into Lisp-strings.

(%i1) load(stringproc)$
(%i2) maxima_tempdir: "D:/volker"$
(%i3) :lisp (stringp (l-string $maxima_tempdir))
T

So in each place, where this variable is needed (it won't be so much), one could use (l-string 
$maxima_tempdir).

Concerning national characters I have no idea if this might be a problem.

Volker