addpath(), path() vs. pathsep()

Christian Böhme monodhs at gmx.de
Tue May 26 15:25:08 CDT 2009


Hello,

I am trying to have Octave use a path separator (`;') different
from the one (`:') that, for reasons escaping me, is defined as
"system-dependent" and not customisable.  I do this by adding the
following code to my ~/.octaverc:

function s = local_pathsep();
     s = ';';
endfunction

dispatch('pathsep', 'local_pathsep', 'any');

Invoking pathsep() in each Octave instance on the command line
then does indeed return

ans = ;

which is the expected answer.  However, adding a directory with
a path component containing a colon still fails due to Octave
splitting the path string at each colon and complaining about
the non-existing directory entry.

Although it appears that there was a discussion on the topic
years ago (http://www.nabble.com/Use-of-pathsep-in-rmpath%2C\
-addpath-and-path-td4225829.html#a4228312) pathsep() is apparently
(still) not used by addpath() & friends.  The version I am using is
3.0.5 on the current Debian "testing" distribution.

Is there any way other than manipulating the Octave sources that
allows me to use a path separator of my own personal choice ?


Thanks & regards,
Christian


More information about the Help-octave mailing list