Re: (load) and (current-url)

Matthias Radestock <[email protected]> Mon, 25 Sep 2006 15:41:46 +0100
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
Dan wrote:

> strange behaviour here. Create /tmp/x.scm:
> 
> (define (f)
>   (display (current-url)) (newline))
> (f)
> 
> Now do (load "/tmp/x.scm"). It will display "file:/tmp/x.scm".
> 
> Then type (f) at the SISC prompt. This time it will display the current directory.
> 
> I'm not sure if that's right or not... I expected the first (f) to print just "/tmp".

Dan,

this behaves exactly as expected. |current-url| is always supposed to 
point at the current file during |load|. Try |current-directory|.


Matthias.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV