[plt-scheme] changing current-directory in Dr Scheme?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Apr 23 03:50:59 EDT 2007

At Mon, 23 Apr 2007 00:43:14 -0700, "Yin-So Chen" wrote:
> Dr Scheme REPL
> > (current-directory)
> #<path:C:\Local\PLT>
> > (parameterize ((current-directory "c:\\data\\scheme\\lib\\util\\"))
>     (expand (with-input-from-file "c:\\data\\scheme\\lib\\util\\util.scm"
> read)))
> Error: open-input-file: cannot open input file: "c:\Local\PLT\foo.scm" (The
> system cannot find file specified.; errno=2)

You need to set `current-load-relative-directory' instead of
`current-directory'.

I see that DrScheme initializes the `current-load-relative-directory'
parameter in the same way as the `current-directory' parameter.
Probably it should be set to #f after the definitions windows is
evaluated, but we'll have to look into it more.

Matthew



Posted on the users mailing list.