[racket] Default current directory
On Mon, Nov 28, 2011 at 4:35 PM, Neil Van Dyke <neil at neilvandyke.org> wrote:
> Robby Findler wrote at 11/28/2011 02:57 PM:
>>
>> I've adjusted DrRacket so that the initial current-directory is now
>> the user's home directory (when the file is not saved).
>>
>
> Currently on Linux, the "(current-directory)" seems to be the current
> working directory of the process from which DrRacket was started, and I rely
> on this somewhat in a few places. Will this be changing?
>
> Why I ask... One way in which I somewhat rely on this is in a large
> Racket-based software system, for which developers typically have a few
> branches checked out on their workstation, there is a "drracket" Make target
> that invokes the correct version of DrRacket with several environment
> variables set appropriately for that particular checkout. The current
> working directory for Racket is in the directory for that checkout., and
> this is the default when they go to pick a source code file to open. Were
> this default directory to instead be their home directory, not only would
> that be aggravating, but it would also likely lead to user error, when they
> accidentally go to the wrong checkout tree and view/edit files there, rather
> than in the checkout they thought they were working in.
The file dialogs should not be changing. current-directory is a
parameter and the value of that parameter for DrRacket itself is not
changed. It is only the initial value of that parameter when running a
program inside DrRacket (and the program is in an unsaved file). In
any case, I'm unsure of the relationship between that parameter and
the file dialogs -- there may not be one; it may only be that on linux
they both get initialized in the same way.
If you see different behavior than that, tho, please do let us know.
Robby