[Ecls-list] Any support for a ~/.eclinit.lisp?

Dave Pearson davep at davep.org
Fri Jun 27 02:55:16 UTC 2003


* Juan Jose Garcia-Ripoll <worm at arrakis.es> [2003-06-27 09:35:25 +0200]:

> On Thursday 26 June 2003 12:20, Dave Pearson wrote:
>
> > While I notice in the man page that ecl supports the loading of an
> > init.lisp in the current directory I was wondering if there is any
> > undocumented support for the loading of a "hidden" init file from a home
> > directory as many other CL implementations seem to? If not would it be
> > possible to have this?
> 
> The ~/.ecl[.lsp] initialization file was uncommented long ago because
> apparently it does not work on Solaris 2. Do not ask me why (perhaps the C
> library is not able to figure out what the leading "~" means).

I doubt that it would work on GNU/Linux either because, IIRC, you're right,
the C library doesn't generally understand what "~" means as it's a shell
thing:

,----
| davep at hagbard:~/temp$ cat homefile.c
| #include <stdio.h>
| 
| int main( void )
| {
|     FILE *f = fopen( "~/foo.txt", "w" );
| 
|     if ( f )
|     {
|         fprintf( f, "Hello, World!\n" );
|         fclose( f );
|     }
|     else
|     {
|         perror( "Yikes" );
|     }
|         
|     return( 0 );
| }
| 
| davep at hagbard:~/temp$ ./homefile 
| Yikes: No such file or directory
`----

>                                                                I will fix
> this in CVS. In the mean time, if you do not want to update to CVS, feel
> free to fix the file ecl/src/lsp/top.lsp. More precisely, the line
> 
> (defvar *lisp-init-file-list* '("./init")
>   "List of files automatically loaded when ECL is invoked.")
> 
> should read
> 
> (defvar *lisp-init-file-list* '("./init" "home:.ecl")
>   "List of files automatically loaded when ECL is invoked.")

Thanks, I'll give this a try (actually it's probably about time I did start
to pull ecl from CVS).

-- 
Dave Pearson
http://www.davep.org/lisp/




More information about the ecl-devel mailing list