|
From: Robert D. <rob...@gm...> - 2022-07-21 17:58:53
|
On Wed, Jul 20, 2022 at 1:34 PM Raymond Toy <toy...@gm...> wrote:
>> So if the file actually exists in the current working directory, the
>> path list isn't referenced.
> But this can easily be achieved by setting file_search_lisp and file_search_maxima with the current directory at the beginning.
>
> Leaving it as is makes it impossible to make force maxima not to load file from the current dir.
Yeah, I can see that being able to disallow the current directory is
a useful behavior. However, I wonder if we're going to bump into
problems trying to implement that. Common Lisp has a notion of
pathname defaults which is distinct from the current working directory
-- as long as we're using PROBE-FILE to assess whether some would-be
path exists, there is potential for unexpected results.
Maybe I'm worrying too much. I guess that an actual implementation
isn't hard, so we can just try it and find out.
> This is unlike any other search path for any programs I know of.
Well, I dunno. I looked at some programs I often use, and there's a
variety of behaviors.
* Matlab: current working directory is not on path list, but Matlab
finds files in cwd anyway
* Octave: cwd is on path list, and user cannot remove it (attempt
evokes error message)
* R: source("foo.R") only looks for foo.R in specified path, or cwd
if no leading path; thereafter complicated behavior depending on
optional argument chdir
I know that sh, bash, probably other shells, only look for executables
in cwd if given explicit path ./foo, or if . is on PATH. What are
other programs which act like that?
best,
Robert
|