newLISP Fan Club

Forum => newLISP in the real world => Topic started by: newdep on July 20, 2004, 12:11:19 PM

Title: Newlisp init.lsp enhancement request
Post by: newdep on July 20, 2004, 12:11:19 PM
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.
Title:
Post by: newdep on July 20, 2004, 12:46:27 PM
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.
Title:
Post by: newdep on July 20, 2004, 12:50:38 PM
Mmm worked once got ->



call stack overflow in function set : env



:-)
Title:
Post by: Lutz on July 20, 2004, 01:43:44 PM
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
Title:
Post by: Lutz on July 21, 2004, 02:42:20 PM
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
Title:
Post by: newdep on July 21, 2004, 03:18:15 PM
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 :-)
Title:
Post by: Lutz on July 21, 2004, 03:31:13 PM
just me



Lutz