startup file for xmaxima in Windows Vista




On Thu, 10 Sep 2009, Sheldon Newhouse wrote:

< Andrej Vodopivec wrote:
< > On Thu, Sep 10, 2009 at 5:08 AM, Sheldon Newhouse<sen1 at math.msu.edu> wrote:
< >   
< >> Hello,
< >>  I normally run xmaxima in a linux environment, but I am teaching with
< >> it this term and all students use Windows.
< >>
< >> I have installed 19.2 and noticed that when I use the 'stringout'
< >> command, it attempts to save the wile in 'C:\windows\system32' ---not a
< >> good thing.
< >>
< >> How can I set the default folder to be in my 'Documents' foloder?
< >>     
< >
< > I have this in my maxima-init.mac:
< >
< > chdir(dir) := ?xchdir(dir)$
< > chdir("/Users/andrej/")$
< >
< > The function chdir allows me to later change the working directory.
< >
< > Andrej
< > .
< >
< >   
< Thanks for the tip Andrej.  This works fine for the 'stringout' command. 
< But the Alt-b for loading batch files still started in 'system32'.
< 
< I decided to start xmaxima from the command line using a batch file 
< named "xmax.bat" which I put in "C:\Users\sen"
< 
< The contents of the "xmax.bat" file are
< 
< chdir "C:\Users\sen\Maxima"
< "C:\Program Files\Maxima-5.19.2\bin\xmaxima.exe"
< chdir "C:\Users\sen
< 
< There ought to be a better way.
 
The problem is that there are two processes, maxima and xmaxima, and their 
two working directories to consider. ?xchdir changes the working directory of the
maxima process, which is why you see 'stringout' working, but the
working directory of xmaxima is not changed since it is a different
process and there is no synchronisation of the two working directories
(nor should there be).

A typical solution for this problem would be to have xmaxima save the
last directory a user accessed between sessions (it does this already
during a session). Perhaps this should be a feature request.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.