help-octave
[Top][All Lists]
Advanced

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

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


From: John W. Eaton
Subject: addpath(), path() vs. pathsep()
Date: Tue, 26 May 2009 17:23:49 -0400

On 26-May-2009, Christian Böhme wrote:

| 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.

You are right that the pathsep function is not called internally.

I checked in the following changes to the current sources:

  http://hg.savannah.gnu.org/hgweb/octave/rev/cf4683ff0b2c
  http://hg.savannah.gnu.org/hgweb/octave/rev/1d3b91166b9c

I don't expect that these patches will apply to the 3.0.x sources.

Out of curiosity, why do you want to change the path separator?  Do
you use ":" in directory names?  Why?

jwe



reply via email to

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