octave-maintainers
[Top][All Lists]
Advanced

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

Re: pathdef, savepath, ocaverc and Matlab


From: John W. Eaton
Subject: Re: pathdef, savepath, ocaverc and Matlab
Date: Fri, 04 Jan 2008 15:23:04 -0500

On  4-Jan-2008, Ben Abbott wrote:

| Regarding (3), to mock the operation of Matlab as closely as possible,  
| it would be preferred that pathdef.m returns the path after startup/ 
| octaverc has been run, but before ~/.octaverc (at least thats's the  
| way Matlab works on my Mac.
| 
| However, there are some problems/features with that. When savepath.m  
| is executed, Matlab saves the path to the equivalent of startup/ 
| octaverc. At least that is the default ... Since all users on my Mac  
| have *write* access to that file, I less than happy about Matlab's  
| default.

Really?  I would have thought that the normal Unixy thing to do would
have those files owned by some other user and not writeable by
ordinary users.

Apparently Matlab tries pretty hard to write to the system-wide file.
Here is what I see on a copy of Matlab at UW:

  >> savepath
  chmod: changing permissions of 
`/afs/engr.wisc.edu/apps/matlab-r2007a/toolbox/local/pathdef.m': Read-only file 
system

I don't have a strong opiniont about whether we should copy this
behavior or not, but it seems that on a reasonable system, ordinary
users would not be able to write the system file anyway, so maybe it
doesn't matter so much.

My conclusion is that savepath is a stupid function and shouldn't be
used, but if you want to provide it for users who expect Octave to be
just like Matlab, then maybe it should be 100% bug for bug compatible.

jwe


reply via email to

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