how to re-define the HOME directory?



Hi,

just to summarise the intention and usage (to see
whether I understand it correctly):

All files created by Maxima should go to the userdir,
including history and compiled file.
And the first place to look for the initialisation file
is userdir (so that if maxima-init.mac is in userdir,
then it's guaranteed to be used).

In order to safely create autonomous Maxima runs, the
best praxis under Bash seems to be to use mktemp to
create a temporary directory, and to *copy* the content
of the "main" userdir-directory to that temporary directory
(at least the files with compiled lisp-code).

One should take care that copying is actually possible:
Otherwise for each invocation the whole compilation process
(which takes about a minute) will have to be done again and again:
Hopefully no paths are hardcoded into these compiled files.
And perhaps also one wants to continue using the old history.

Otherwise sounds alright (from my user-perspective).

Oliver

On Tue, Jun 02, 2009 at 10:08:18PM -0500, James Amundson wrote:
> On 06/02/2009 10:40 AM, Robert Dodier wrote:
> >On 6/2/09, Leo Butler<l.butler at ed.ac.uk>  wrote:
> >
> >   
> >>What is needed, I think, is a command-line option that allows the user
> >>to set the init file at run-time. This is presently lacking.
> >>     
> >
> >Agreed. Can someone look into that?
> >   
> 
> I just implemented a "--userdir" argument to Maxima and committed it to 
> cvs. I have attached an example of usage at the end of this message. If 
> the change is satisfactory, I will update the man page. The dos maxima 
> script also needs to be updated.
> 
> Earlier in this thread I said I thought there was a bug in the 
> implementation of MAXIMA_USERDIR. Upon further reflection, I can't find 
> anything wrong with MAXIMA_USERDIR. It works as advertised.
> 
> I think rmaxima should put its history file in MAXIMA_USERDIR. I'll fix 
> that soon.
> 
> --Jim Amundson
> 
> Example:
> 
> |abacus4>cat /home/amundson/.maxima/maxima-init.mac
> /* load("colorterm.lisp");colorterm(); */
> print("jfa in default directory");
> 
> |abacus4>maxima
> Maxima 5.18post http://maxima.sourceforge.net
> Using Lisp SBCL 1.0.26
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> jfa in default directory
> (%i1) quit();
> 
> |abacus4>cat /home/amundson/tmp/funnymaxima/maxima-init.mac
> /* load("colorterm.lisp");colorterm(); */
> print("jfa in funny directory");
> 
> |abacus4>maxima --userdir=/home/amundson/tmp/funnymaxima
> Maxima 5.18post http://maxima.sourceforge.net
> Using Lisp SBCL 1.0.26
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> jfa in funny directory
> (%i1) quit();
> 
> |abacus4>
> 

> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima