From: Gottfried Barthel
Subject: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp
Date:
Message-ID: <3AE82BDE.12362EFC@fmi.uni-konstanz.de>
Hello all,
sorry for asking a (most likely) stupid newbie question that may have
been asked and answered at least N (N >> 0) times, but I have been
unable to find an answer in the FAQ at
http://www.cs.cmu.edu/Groups/AI/html/faqs/lang/lisp/top.html :
I want to run CMU-CL as inferior Lisp process in Emacs (GNU Emacs
20.4.1). The files reside in some folders, say, $HOME/Lisp/Project_A/
and $HOME/Lisp/Project_B/ in my home directory. Emacs, however, is
started up automatically at my login, so M-! pwd gives $HOME. Is there
any way of setting a default pathname (or even several pathnames) where
cmucl should look for input files? All I found is in FAQ [2-19] where it
says:
> Allegro also uses the variable *default-pathname-defaults* to resolve
> relative pathnames, maintaining it as the current working directory.
Is such a feature available for cmucl? I wanted to check
http://ilisp.cons.org/ , but that seems currently unreachable.
Thanks for your help,
Gottfried Barthel
Fachbereich Mathematik und Statistik, Universitaet Konstanz
From: Tijs van Bakel
Subject: Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp
Date:
Message-ID: <lumvgnrg226.fsf@dutiaw13.twi.tudelft.nl>
Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
> Is there any way of setting a default pathname (or even several
> pathnames) where cmucl should look for input files? All I found is
> in FAQ [2-19] where it says:
using ilisp the key combination "C-c !" runs the command
default-directory-lisp, which should set CMUCL's directory to the
directory of the current buffer. i don't know of a feature to set a
searchpath consisting of multiple directories.
manually one could do the followin in CMUCL:
(setq (default-directory) "/tmp/foo")
> Is such a feature available for cmucl? I wanted to check
> http://ilisp.cons.org/ , but that seems currently unreachable.
ilisp seems to be currently hosted at
http://sourceforge.net/projects/ilisp/
--
Tijs van Bakel, <·····@wanadoo.nl>
From: Pierre R. Mai
Subject: Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp
Date:
Message-ID: <87ae53vf44.fsf@orion.bln.pmsf.de>
Tijs van Bakel <·····@wanadoo.nl> writes:
> manually one could do the followin in CMUCL:
> (setq (default-directory) "/tmp/foo")
This ^^ should be a setf, not a setq...
Regs, Pierre.
--
Pierre R. Mai <····@acm.org> http://www.pmsf.de/pmai/
The most likely way for the world to be destroyed, most experts agree,
is by accident. That's where we come in; we're computer professionals.
We cause accidents. -- Nathaniel Borenstein
From: Gottfried Barthel
Subject: Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp
Date:
Message-ID: <3AE84550.5EC54595@fmi.uni-konstanz.de>
Tijs van Bakel wrote:
>
> Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
>
> > Is there any way of setting a default pathname (or even several
> > pathnames) where cmucl should look for input files? All I found is
> > in FAQ [2-19] where it says:
>
[...]
>
> manually one could do the followin in CMUCL:
> (setq (default-directory) "/tmp/foo")
>
[...]
>
> --
> Tijs van Bakel, <·····@wanadoo.nl>
Thanks for your advice, but it doesn't work as it should; I get an error
message and I am stuck ... Here is what happens when I enter the command
to cmucl running as inferior lisp (of course substituting /tmp/foo by a
valid path name enclosed in quotation marks):
CMU Common Lisp 18c, Built 2000-11-28, running on $HOST
Send questions and bug reports to your local CMU CL maintainer, or to
··········@cons.org. and ·········@cons.org. respectively.
Loaded subsystems:
Python 1.0, target SPARCstation/Solaris 2
CLOS based on PCL version: September 16 92 PCL (f)
* (setq (default-directory) "...[$LISP_DIR (some valid path name)]")
Warning: Declaring (DEFAULT-DIRECTORY) special.
Error in function C::%PROCLAIM:
Variable name is not a symbol: (DEFAULT-DIRECTORY).
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(C::%PROCLAIM (SPECIAL (DEFAULT-DIRECTORY)))
By the way, I tried the naive approach to issue "M-! cd $LISP_DIR" in
Emacs while visiting the *inferior-lisp* buffer (with "$LISP_DIR", of
course, replaced by a valid directory name), but a subsequent "M-! pwd"
returns $HOME ...
Any further help would be very much appreciated.
Best regards,
Gottfried Barthel
Fachbereich Mathematik und Statistik, Universitaet Konstanz
From: Raymond Wiker
Subject: Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp
Date:
Message-ID: <864rvb4o23.fsf@raw.grenland.fast.no>
Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
> CMU Common Lisp 18c, Built 2000-11-28, running on $HOST
> Send questions and bug reports to your local CMU CL maintainer, or to
> ··········@cons.org. and ·········@cons.org. respectively.
> Loaded subsystems:
> Python 1.0, target SPARCstation/Solaris 2
> CLOS based on PCL version: September 16 92 PCL (f)
> * (setq (default-directory) "...[$LISP_DIR (some valid path name)]")
^^^^
Should be setf. Setq only works on symbols, while setf is a
general setter.
--
Raymond Wiker
·············@fast.no
From: Pierre R. Mai
Subject: Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp
Date:
Message-ID: <87pudz6069.fsf@orion.bln.pmsf.de>
Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
> Tijs van Bakel wrote:
> >
> > Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
> >
> > > Is there any way of setting a default pathname (or even several
> > > pathnames) where cmucl should look for input files? All I found is
> > > in FAQ [2-19] where it says:
> >
> [...]
> >
> > manually one could do the followin in CMUCL:
> > (setq (default-directory) "/tmp/foo")
> >
> [...]
> >
> > --
> > Tijs van Bakel, <·····@wanadoo.nl>
>
> Thanks for your advice, but it doesn't work as it should; I get an error
> message and I am stuck ... Here is what happens when I enter the command
> to cmucl running as inferior lisp (of course substituting /tmp/foo by a
> valid path name enclosed in quotation marks):
See my other response, the setq must be a setf.
> By the way, I tried the naive approach to issue "M-! cd $LISP_DIR" in
> Emacs while visiting the *inferior-lisp* buffer (with "$LISP_DIR", of
> course, replaced by a valid directory name), but a subsequent "M-! pwd"
> returns $HOME ...
This can't work, since M-! just spawns a new shell process and
executes the cd command in that new shell. Since Unix's current
working directory concept is per-process, neither the parent process
of the newly spawned shell (i.e. Emacs), nor the other children of
that parent (i.e. CMU CL amongst others), will be affected by this.
It is CMU CL itself that must change its idea of the current working
directory (though whether it does this using Unix's idea of a cwd, or
through other internal means is up to CMU CL itself), and hence you
must talk to CMU CL, either directly, or through ILISP/Emacs functions
that communicate (in a hidden way) with the CMU CL process.
Regs, Pierre.
--
Pierre R. Mai <····@acm.org> http://www.pmsf.de/pmai/
The most likely way for the world to be destroyed, most experts agree,
is by accident. That's where we come in; we're computer professionals.
We cause accidents. -- Nathaniel Borenstein
From: Paolo Amoroso
Subject: Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp
Date:
Message-ID: <aHvoOne7=+Ru3EQJmbBEDDkqG81T@4ax.com>
On 26 Apr 2001 16:37:04 +0200, Tijs van Bakel <·····@wanadoo.nl> wrote:
> Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
[...]
> > Is such a feature available for cmucl? I wanted to check
> > http://ilisp.cons.org/ , but that seems currently unreachable.
>
> ilisp seems to be currently hosted at
> http://sourceforge.net/projects/ilisp/
The cons.org site provides general information on ILISP. The project
infrastructure--e.g. CVS source tree, mailing lists, etc.--is hosted at
SourceForge.
Paolo
--
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
From: Pierre R. Mai
Subject: Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp
Date:
Message-ID: <87hezbvgf0.fsf@orion.bln.pmsf.de>
Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
> started up automatically at my login, so M-! pwd gives $HOME. Is there
> any way of setting a default pathname (or even several pathnames) where
> cmucl should look for input files?
For CMU CL itself, there is the function default-directory, which is
setf-able, i.e.
(default-directory)
will return what CMU CL considers the equivalent of the current
working directory, and e.g.
(setf (default-directory) #p"/home/theotherone/some/directory/")
will modify this to something else.
This is independent of Emacs, ILISP, etc.
> Is such a feature available for cmucl? I wanted to check
> http://ilisp.cons.org/ , but that seems currently unreachable.
If you use ILISP, then ILISP will set the current working directory of
the slave lisp to the directory of the buffer you were in, when you
first started the lisp, i.e. if you have visited the file
/home/demo/dir/myfile.cl in some buffer, and then start the slave lisp
process, e.g. via M-x cmulisp, while this buffer is the current one,
then ILISP will setf (default-directory) to #p"/home/demo/dir/".
Regs, Pierre.
--
Pierre R. Mai <····@acm.org> http://www.pmsf.de/pmai/
The most likely way for the world to be destroyed, most experts agree,
is by accident. That's where we come in; we're computer professionals.
We cause accidents. -- Nathaniel Borenstein
From: Gottfried Barthel
Subject: Thx (Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp)
Date:
Message-ID: <3AE84E89.E1F3775F@fmi.uni-konstanz.de>
"Pierre R. Mai" wrote:
>
> Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
>
> > started up automatically at my login, so M-! pwd gives $HOME. Is there
> > any way of setting a default pathname (or even several pathnames) where
> > cmucl should look for input files?
>
> For CMU CL itself, there is the function default-directory, which is
> setf-able, i.e.
>
> (default-directory)
>
> will return what CMU CL considers the equivalent of the current
> working directory, and e.g.
>
> (setf (default-directory) #p"/home/theotherone/some/directory/")
>
> will modify this to something else.
>
> This is independent of Emacs, ILISP, etc.
Thank you (merci, danke!); it works perfectly well. Could you help me in
my ignorance and explain the meaning of the #p in the command and in
cmucl's output?
> If you use ILISP, then ILISP will set the current working directory of
> the slave lisp to the directory of the buffer you were in, when you
> first started the lisp, i.e. if you have visited the file
> /home/demo/dir/myfile.cl in some buffer, and then start the slave lisp
> process, e.g. via M-x cmulisp, while this buffer is the current one,
> then ILISP will setf (default-directory) to #p"/home/demo/dir/".
Sounds good!
Regards from Konstanz,
Gottfried Barthel
(Fachbereich Mathematik und Statistik, Universitaet Konstanz)
From: Thom Goodsell
Subject: Re: Thx (Re: Newbie question: How to set a default pathname for cmucl as Emacs inferior-lisp)
Date:
Message-ID: <7v7l06gozi.fsf@shalott.cra.com>
Gottfried Barthel <·················@fmi.uni-konstanz.de> writes:
>
> Thank you (merci, danke!); it works perfectly well. Could you help me in
> my ignorance and explain the meaning of the #p in the command and in
> cmucl's output?
>
See the HyperSpec:
http://www.xanalys.com/software_tools/reference/HyperSpec/Body/sec_2-4-8-14.html
--
Thom Goodsell ···@cra.com
Scientist (617) 491-3474 x574
Charles River Analytics http://www.cra.com/