From: Andreas Thiele
Subject: sbcl sb-posix:chdir
Date: 
Message-ID: <fnjhvi$fca$01$1@news.t-online.com>
Hi,

I wonder about sbcl's sb-posix:chdir. I can call this function but directory, load etc. are not impressed. It does not change lisp current directory. Can anybody tell me how I can achieve this with sbcl?

(LispWorks knows cd, CMUCL has unix:unix-chdir)

Thanks

Andreas

From: Edi Weitz
Subject: Re: sbcl sb-posix:chdir
Date: 
Message-ID: <ur6g2liz4.fsf@agharta.de>
On Mon, 28 Jan 2008 04:25:31 +0100, "Andreas Thiele" <······@nospam.com> wrote:

> I wonder about sbcl's sb-posix:chdir. I can call this function but
> directory, load etc. are not impressed. It does not change lisp
> current directory. Can anybody tell me how I can achieve this with
> sbcl?

I /think/ in SBCL you just change *default-pathname-defaults*.

Edi.

-- 

European Common Lisp Meeting, Amsterdam, April 19/20, 2008

  http://weitz.de/eclm2008/

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Andreas Thiele
Subject: Re: sbcl sb-posix:chdir
Date: 
Message-ID: <fnjl4o$964$02$1@news.t-online.com>
Edi Weitz wrote:
> On Mon, 28 Jan 2008 04:25:31 +0100, "Andreas Thiele" <······@nospam.com> wrote:
> 
>> I wonder about sbcl's sb-posix:chdir. I can call this function but
>> directory, load etc. are not impressed. It does not change lisp
>> current directory. Can anybody tell me how I can achieve this with
>> sbcl?
> 
> I /think/ in SBCL you just change *default-pathname-defaults*.
> 
> Edi.

Yep, does the job.

Thanks for the early help (watch the time) ;)

Andreas
From: Christian von Essen
Subject: Re: sbcl sb-posix:chdir
Date: 
Message-ID: <87r6g0g3q3.fsf@mvonessen.de>
"Andreas Thiele" <······@nospam.com> writes:

> Edi Weitz wrote:
>> On Mon, 28 Jan 2008 04:25:31 +0100, "Andreas Thiele" <······@nospam.com> wrote:
>> 
>>> I wonder about sbcl's sb-posix:chdir. I can call this function but
>>> directory, load etc. are not impressed. It does not change lisp
>>> current directory. Can anybody tell me how I can achieve this with
>>> sbcl?
>> 
>> I /think/ in SBCL you just change *default-pathname-defaults*.
>> 
>> Edi.
>
> Yep, does the job.
>
> Thanks for the early help (watch the time) ;)
>
> Andreas

What is impressed, though, is the pwd of the process.

For example:


Linedit version 0.15.12 [smart mode]
(14:27:55) CL-USER> :sh pwd
/home/christian/lisp/image-maker

#<SB-IMPL::PROCESS :EXITED 0>
(14:28:00) CL-USER> (sb-posix:chdir "/home/christian")

0
(14:28:17) CL-USER> :sh pwd
/home/christian

#<SB-IMPL::PROCESS :EXITED 0>
(14:28:19) CL-USER> 



Where :sh simply calls a shell with the rest of the line.

Christian
From: Maciej Katafiasz
Subject: Re: sbcl sb-posix:chdir
Date: 
Message-ID: <fnnb6b$t4b$4@news.net.uni-c.dk>
Den Tue, 29 Jan 2008 14:29:08 +0100 skrev Christian von Essen:

> "Andreas Thiele" <······@nospam.com> writes:
>>>> I wonder about sbcl's sb-posix:chdir. I can call this function but
>>>> directory, load etc. are not impressed. It does not change lisp
>>>> current directory. Can anybody tell me how I can achieve this with
>>>> sbcl?
[snip]
> What is impressed, though, is the pwd of the process.

It's not meant to be nitpicking, but might save you some 
misunderstandings in the future: the English term you want is "affected", 
not "impressed". "Impress" in English implies emotional impact and 
feeling of awe, which would be very confusing if applied to non-living 
things.

Cheers,
Maciej
From: Christian von Essen
Subject: Re: sbcl sb-posix:chdir
Date: 
Message-ID: <87myqog2f7.fsf@mvonessen.de>
Maciej Katafiasz <········@gmail.com> writes:

> Den Tue, 29 Jan 2008 14:29:08 +0100 skrev Christian von Essen:
>
>> "Andreas Thiele" <······@nospam.com> writes:
>>>>> I wonder about sbcl's sb-posix:chdir. I can call this function but
>>>>> directory, load etc. are not impressed. It does not change lisp
>>>>> current directory. Can anybody tell me how I can achieve this with
>>>>> sbcl?
> [snip]
>> What is impressed, though, is the pwd of the process.
>
> It's not meant to be nitpicking, but might save you some 
> misunderstandings in the future: the English term you want is "affected", 
> not "impressed". "Impress" in English implies emotional impact and 
> feeling of awe, which would be very confusing if applied to non-living 
> things.
>
> Cheers,
> Maciej

Yeah, well, I thought, that he used personification, and I just wanted
to play along :).

Christian
From: Andreas Thiele
Subject: Re: sbcl sb-posix:chdir
Date: 
Message-ID: <fnnbd3$7s6$00$1@news.t-online.com>
Christian von Essen wrote:
> "Andreas Thiele" <······@nospam.com> writes:
> 
>> Edi Weitz wrote:
>>> On Mon, 28 Jan 2008 04:25:31 +0100, "Andreas Thiele" <······@nospam.com> wrote:
>>> 
>>>> I wonder about sbcl's sb-posix:chdir. I can call this function but
>>>> directory, load etc. are not impressed. It does not change lisp
>>>> current directory. Can anybody tell me how I can achieve this with
>>>> sbcl?
>>> 
>>> I /think/ in SBCL you just change *default-pathname-defaults*.
>>> 
>>> Edi.
>> 
>> Yep, does the job.
>> 
>> Thanks for the early help (watch the time) ;)
>> 
>> Andreas
> 
> What is impressed, though, is the pwd of the process.
> 
> For example:
> 
> 
> Linedit version 0.15.12 [smart mode]
> (14:27:55) CL-USER> :sh pwd
> /home/christian/lisp/image-maker
> 
> #<SB-IMPL::PROCESS :EXITED 0>
> (14:28:00) CL-USER> (sb-posix:chdir "/home/christian")
> 
> 0
> (14:28:17) CL-USER> :sh pwd
> /home/christian
> 
> #<SB-IMPL::PROCESS :EXITED 0>
> (14:28:19) CL-USER>
> 
> 
> 
> Where :sh simply calls a shell with the rest of the line.
> 
> Christian

Thanks for the hint on linedit - that was that I was looking for :)

Andreas