[plt-scheme] Re: Wierd behaviour of find-executable-path
On 03/06/06, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Sat, 3 Jun 2006 13:19:21 +0100, "Paulo J. Matos" wrote:
> > On 03/06/06, Paulo J. Matos <pocmatos at gmail.com> wrote:
> > >
> > > While I started the last SVN DrScheme through MzRun which executes its
> > > programs with 'process', I started the others through the shell.
> > > That's the 'why' for the find-executable-path results. It seems that I
> > > just need to start them through MzRun in a way they can access the
> > > PATH env variable.
> > >
> >
> > Hummmf, I'm sorry for the endless posting but I went on reading the
> > manual for a command which should allow the process to access env
> > variables and it seems from Chapter 35 of MzLib that the 'process'
> > function I'm using should allow that. Is there a problem with process?
> > or should I use something else?
>
> I'm not sure what's going wrong. What does
> (getenv "PATH")
> produce in DrScheme?
>
If I start drscheme from terminal
> (find-executable-path "emacs")
#<path:/usr/bin/emacs>
> (getenv "PATH")
"/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/opt/ghc/bin:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/opt/sancho:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin:/opt/insight/bin:.:/home/pmatos/plt-last/bin"
> Do you get a different result from `getenv' if you start MzScheme via
> MzRun?
>
If I start DrScheme from MzRun:
> (find-executable-path "emacs")
#f
> (getenv "PATH")
"/usr/local/bin"
This is wierd in fact. I can't even imagine why only /usr/local/bin is there?
Any ideas?
Where's the getenv code? Maybe I can look at it! Or maybe the problem
is in process. I'll be taking a look.
> Thanks,
> Matthew
>
>
--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group