bugGNU Octave - Bugs: bug #35697, Matlab loadpath includes private...

 
 

bug #35697: Matlab loadpath includes private directories

Submitted by:  Muhali <muhali>
Submitted on:  Fri 02 Mar 2012 04:56:42 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 3 - LowItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 09 May 2014 10:40:16 AM UTC, comment #3:

The fix works only when the loading is done from within the main directory (where fun.m resides). If a private function 'foo' is doing the loading, it doesn't work. Hence,

works in ML but not in octave.

Muhali <muhali>
Fri 03 Jan 2014 07:37:05 PM UTC, comment #2:

I checked in the following change on the default branch:

http://hg.savannah.gnu.org/hgweb/octave/rev/adbbacce8aaf

This change also affects the "exist" function, which now finds files in private directories. I believe this is also compatibile with Matlab behavior.

John W. Eaton <jwe>
Project Administrator
Fri 02 Mar 2012 05:26:08 PM UTC, comment #1:

I'm not sure Octave will want to chase compatibility in this case. It seems odd that the load command should prepend "private/" to the list of directories it searches.

As a workaround, you could code the function to be

which works on Octave. Of course, this will throw the occasional warning

but that isn't horrible.

Rik <rik5>
Project Administrator
Fri 02 Mar 2012 04:56:42 PM UTC, original submission:

Private directories are treated differently in matlab and octave. If in a function a file from the private directory is loaded this is recognized by matlab but not by octave, as in the following example where foo.mat resides in /foo/private:

%> cd /foo; octave --no-init-file -q
octave:> fun
error: load: unable to find file foo.mat
error: called from:
error: /foo/fun.m at line 3, column 4

Muhali <muhali>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by muhali (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 Jan 2014 07:37:05 PM UTCjweStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 02 Mar 2012 05:27:02 PM UTCrik5StatusNone=>Confirmed
    Fri 02 Mar 2012 05:26:47 PM UTCrik5Summaryprivate directories=>Matlab loadpath includes private directories
    Fri 02 Mar 2012 05:26:08 PM UTCrik5CategoryNone=>Interpreter
      Priority5 - Normal=>3 - Low
      Item GroupNone=>Matlab Compatibility

    Back to the top


    Powered by Savane 3.1-cleanup1