print function executes index.m in CWD

Ben Abbott bpabbott at mac.com
Mon Sep 8 12:13:01 CDT 2008


On Monday, September 08, 2008, at 12:56PM, "John W. Eaton" <jwe at bevo.che.wisc.edu> wrote:
>On  5-Sep-2008, Ben Abbott wrote:
>
>| 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
>
>I think . is omitted here for compatibility with Matlab, which always
>implicitly searches "." but doesn't include it directly in the output
>from path or pathdef.
>
>| 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)? 
>
>How are you running Octave in this case?  If you are using the
>run-octave script to run it in the build directory, then it is
>executed with the "--no-initial-path" option because it should only
>look in the build and source trees, not the directories used for
>installing .m and .oct files which are included in the default path.

ok, that explains it.

Thanks



More information about the Bug-octave mailing list