[plt-scheme] PLTCOLLECTS behavior
The docs and implementation are both correct. The paragraph after the
one you read offers more details on what "combine" means (but the full
details are defined with `path-list-string->path-list'):
If the PLTCOLLECTS environment variable is defined, it is combined
with the default list using path-list-string->path-list. If it is not
defined, the default collection path list (as constructed by the first
three bullets above) is used directly.
Note that under Unix and Mac OS X, paths are separated by :, and under
Windows by ;. Also, path-list-string->path-list splices the default
paths at an empty path, for example, with many Unix shells you can set
PLTCOLLECTS to ":`pwd`", "`pwd`:", or "`pwd`" to specify search the
current directory after, before, or instead of the default paths
respectively.
At Wed, 9 Sep 2009 11:05:35 -0700 (PDT), Peter Michaux wrote:
> The documentation for how the PLTCOLLECTS environment variable works
> seems different than how it actually works. The documentation in the
> PLT reference.pdf page 694 says that "if the PLTCOLLECTS environment
> variable is defined, it is combined with the default list". However, it
> seems that setting PLTCOLLECTS completely redefines the collections
> search path. That is, there is no combining. Here is an example
> showing there is no combining.
>
> $ mzscheme
> Welcome to MzScheme v4.2.1 [3m], Copyright (c) 2004-2009 PLT Scheme
> Inc.
> > (current-library-collection-paths)
> (#<path:/Users/peter/Library/PLT Scheme/4.2.1/collects>
> #<path:/Users/peter/mzscheme/collects>)
> > (exit)
> $ export PLTCOLLECTS=/Users/peter/tmp
> $ mzscheme
> Welcome to MzScheme v4.2.1 [3m], Copyright (c) 2004-2009 PLT Scheme
> Inc.
> lib: standard-module-name-resolver: collection not found: "scheme" in
> any of: (#<path:/Users/peter/tmp>) in: (lib "scheme/init")
> standard-module-name-resolver: collection not found: "scheme" in any
> of: (#<path:/Users/peter/tmp>)
>
> Is the documentation correct and the implementation is a bug or vice
> versa?
>
> Thanks,
> Peter