octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows: different behaviour of octave.bat and octave-cli/gui.exe re


From: Mike Miller
Subject: Re: Windows: different behaviour of octave.bat and octave-cli/gui.exe regarding modifying path
Date: Tue, 9 Aug 2016 00:50:29 -0700
User-agent: Mutt/1.6.2-neo (2016-07-23)

On Tue, Aug 09, 2016 at 12:40:58 +0530, Abhinav Tripathi wrote:
> How about having the path such that it gives higher precedence to octave
> files over windows?

This is precisely what the purpose of octave.bat is.

If you run the executable directly, then it's generally assumed that the
executable is already in PATH, or that PATH is at least configured such
that the helper programs that Octave will need are already in PATH.

> I mean currently, if I open octave (by the exe files), the PATH is atleast
> "<windows-path>;<some-octave-dirs>;" how about swapping the 2 parts such
> that the octave dirs are prepended and not appended?

That behavior is marked with a FIXME comment [1]. I think it would be
ideal (and I think the FIXME comment agrees with me) if the Octave
executables did *not* modify the PATH environment variable at all.

Silently prepending Octave's bin and libexec directories to PATH would
be a severe error on most operating systems, I hope that is easy to see.

Configuring the PATH correctly in octave.bat is a compromise for Windows
users who do not know how to or do not want to configure the global PATH
to include Octave's bin directory. Which is probably most users. So
essentially no one should be calling the executables directly. Is that a
problem in itself?

[1]: 
http://hg.savannah.gnu.org/hgweb/octave/file/22c2bd440544/libinterp/corefcn/defaults.cc#l266

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]