print function executes index.m in CWD

Ben Abbott bpabbott at mac.com
Fri Sep 5 13:27:48 CDT 2008


On Friday, September 05, 2008, at 02:02PM, "John W. Eaton" <jwe at bevo.che.wisc.edu> wrote:
>On  5-Sep-2008, Ben Abbott wrote:
>
>| Your comments reminded me of something I had forgotten. If "index"
>| is references prior to your octaverc being run, then the default
>| path has been loaded, but none of the local paths are yet in
>| effect. Which means that "." is not yet in the path.
>
>I think "." is always first in the path.  You certainly shouldn't have
>to add it in an octaverc file.
>
>jwe
>

I have 3.0.1 and 3.1.51 running, so I don't know about 3.0.2 ... but ... pathdef (3.0.1) gave me the impression that "." is not part of the default path. I remember looking at this code back in January, but don't recall the detail. 

octave:7> pathdef 
ans = /sw/share/octave/site/m:/sw/share/octave/site/m/startup:/sw/lib/octave/3.0.1/oct/powerpc-apple-darwin9.4.0:/sw/share/octave/3.0.1/m:/sw/share/octave/3.0.1/m/audio:/sw/share/octave/3.0.1/m/control:/sw/share/octave/3.0.1/m/control/base:/sw/share/octave/3.0.1/m/control/hinf:/sw/share/octave/3.0.1/m/control/obsolete:/sw/share/octave/3.0.1/m/control/system:/sw/share/octave/3.0.1/m/control/util:/sw/share/octave/3.0.1/m/deprecated:/sw/share/octave/3.0.1/m/elfun:/sw/share/octave/3.0.1/m/finance:/sw/share/octave/3.0.1/m/general:/sw/share/octave/3.0.1/m/geometry:/sw/share/octave/3.0.1/m/image:/sw/share/octave/3.0.1/m/io:/sw/share/octave/3.0.1/m/linear-algebra:/sw/share/octave/3.0.1/m/miscellaneous:/sw/share/octave/3.0.1/m/optimization:/sw/share/octave/3.0.1/m/path:/sw/share/octave/3.0.1/m/pkg:/sw/share/octave/3.0.1/m/plot:/sw/share/octave/3.0.1/m/polynomial:/sw/share/octave/3.0.1/m/quaternion:/sw/share/octave/3.0.1/m/set:/sw/share/octave/3.0.1/m/signal:/sw/share/octave/3.0.1/m/sparse:/sw/share/octave/3.0.1/m/specfun:/sw/share/octave/3.0.1/m/special-matrix:/sw/share/octave/3.0.1/m/startup:/sw/share/octave/3.0.1/m/statistics:/sw/share/octave/3.0.1/m/statistics/base:/sw/share/octave/3.0.1/m/statistics/distributions:/sw/share/octave/3.0.1/m/statistics/models:/sw/share/octave/3.0.1/m/statistics/tests:/sw/share/octave/3.0.1/m/strings:/sw/share/octave/3.0.1/m/testfun:/sw/share/octave/3.0.1/m/time

Meanwhile under 3.1.51, pathdef returns an empty string for me (my local octaverc's don't contain path info at the moment). Which led me to discover that __pathorig__ returns an empty string as well. 

So I have two questions. (1) why don't I see a "." in pathdef? and (2) any idea what the problem with __pathorig__ might be? 

... oh, and a 3rd  question; is __pathorig__ present in 3.0.2 (it is not in 3.0.1)? 

hmmm ... ok one more question, and I'm done ... I promise ;-) 

Might this be related to the problem Thomas Treichl  posted on? 

    http://www.nabble.com/Re%3A-release-3.0.2-again-p19236105.html 

Ben




More information about the Bug-octave mailing list