how to control loading of maxima-init.mac??



On Tue, May 27, 2008 at 01:17:00PM -0400, Raymond Toy (RT/EUS) wrote:
> Oliver Kullmann wrote:
> >Hi,
> >
> >I have the following trouble (which seems to result in a
> >feature-request):
> >
> >How to control the invocation of maxima-init.mac?
> >
> >a) It seems that calling a plain "vanilla" maxima is not possible?
> >b) It seems that there is no command-line option for specifying the
> >location of maxima-init.mac?
> >c) It seems that neither by command-line options nor by build-configuration
> >can the list of directories be influenced, which is used to search for
> >maxima-init.mac?
> >
> >Especially b) seems very easy to achieve.
> 
> Yes, option b is fairly easy.  I arbitrarily called the option --noinit, 
> and it suppresses loading of maxima-init.  maxima-init is searched in 
> the normal paths used by file_search, but the loading of maxima-init 
> might happen too early for you to change file_search paths.
> 
> Is having --noinit good enough for you?
>

With this option one could run the unit-tests, since they can use
batch-mode.
But for the interactive mode, where some specific definitions have
to be pre-loaded, before then entering (and staying in) the interactive
mode, this doesn't appear to help.

So most helpful seems to me something like

--init-location=PATH

> Perhaps it would make sense for maxima to have a site-init file located 
> in the same directory hierarchy as the installed maxima.  This could be 
> similar to how sh works, which loads /etc/profile first, then the user's 
> .profile.  I didn't investigate that, but it seems straightforward to do 
> that.  I guess you would also want a --no-site-init option too.
>

Such a site-init file doesn't seem to fully address my problem:
For the purpose of my platform, I could change this file accordingly,
no problem. But I also want to give my users access to a plain
unaltered maxima (this was one of the problems I had with Sage,
that it didn't give me uncontrolled access to Maxima, and I don't
want to do same thing), but then they had to fiddle around with
the site-init file.

>From my perspective, --noinit, the site-init file and --no-site-init
seem all to be useful, but most wanted would be something like
--init-location=PATH.

Oliver