Page 1 of 1

Newlisp init.lsp enhancement request

Posted: Tue Jul 20, 2004 7:11 pm
by newdep
Hello Lutz,

The global init.lsp is located for linux /usr/share/newlisp

is it possible to enhance the reading of the init.lsp with the following.
(or inside the .c code or inside the init.lsp itself)

If exists in $HOME/.init.lsp then load else load /usr/share/newlisp/init.lsp

So its a .init.lsp (mind the extra "." to make it a hidden init.lsp)

What do you think?

Personaly i think its usefull because every new install of newlisp overwrites
the /usr/share/newlisp/init file. The ~/.init.lsp is controlled by the user itself and the global init.lsp stays for the rest of the users..

Secondly makes it more practical if you want to run newlisp in -p or -d mode as a certain user with that .init.lsp file...

regards, Norman.

Posted: Tue Jul 20, 2004 7:46 pm
by newdep
Luts..

If something like this would be default i.e. in the init.lsp it will load
After the global init.lsp the users specified ~/.init.lsp ->

Just an example...

(if linux.......
(begin
(if (set 't (append (set 't (env "HOME")) "/.init.lsp" )) (load t))))


Norman.

Posted: Tue Jul 20, 2004 7:50 pm
by newdep
Mmm worked once got ->

call stack overflow in function set : env

:-)

Posted: Tue Jul 20, 2004 8:43 pm
by Lutz
That is a message from newLISP not from the OS, perhaps some recursion in your program? The culprit is most likely not 'env', this is just where the call stack overflows, you could check with 'sys-info' how deep nested you are before it breaks.

Lutz

Posted: Wed Jul 21, 2004 9:42 pm
by Lutz
Apropos reading the init.lsp file from the $HOME dir, yes Norman, we can do that

Lutz

ps: try the latest in http://newlisp.org/downloads/development/Norman/
trying to fix the -d problem on slackware

Posted: Wed Jul 21, 2004 10:18 pm
by newdep
Thanx Lutz would be a nice enhancement...

Speaking of "we" are there more people involved in the code development
of the current newlisp releases then? Or are you with the two of you :-)

Posted: Wed Jul 21, 2004 10:31 pm
by Lutz
just me

Lutz