bug in edit.m

John W. Eaton jwe at bevo.che.wisc.edu
Tue Jan 15 01:07:59 CST 2008


On 14-Jan-2008, Ben Abbott wrote:

| 
| On Jan 14, 2008, at 10:10 PM, Ben Abbott wrote:
| 
| > I tried this sequence
| >
| > octave:3 >which savepath
| > which: `savepath' is the function from the file /sw/share/octave/
| > 3.0.0+/m/path/savepath.m
| > octave:4> edit savepath
| > cp: cannot create regular file `/Users/bpabbott/octave/savepath.m': No
| > such file or directory
| > path = /Users/bpabbott/octave/savepath.m
| >
| > My editor showed up empty and pointing at "/Users/bpabbott/octave/
| > savepath.m", my pwd was " /Users/bpabbott/octave".
| >
| > I may have time to look at edit.m at a latter time, but certainly not
| > today.
| >
| > Ben
| 
| The problem is that when I try to edit a "readonly" file edit.m  
| attempts to open the file in ~/octave.
| 
| I have no "octave" directory in that location. Would it not be better  
| to open the file in the pwd?
| 
| Please consider the attached patch and ChangeLog

If we are going to make this change, then I think the doc string needs
to change to match.

Maybe it would be better to only use the current directory if
FUNCTION.HOME does not exist or is not writable, and then only with a
warning.

jwe


More information about the Bug-octave mailing list