How to edit new file in current directory ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to edit new file in current directory ?

OppaErich
Hi,

I'm a bit confused. This used to work, I don't know if there was an
update...

When I try to edit a new file Octave is looking for this file in
$HOME/octave instead of the actual directory.

 >> pwd
ans = /home/oppa/Dokumente/edX/EPFL/octave/chapter4
 >> edit test.m
cp: cannot create regular file '/home/oppa/octave/test.m': No such file
or directory
 >>

It was asking to create a new file in the actual directory. Is this a
bug or what is going on ? How can I edit a new file in the actual
directory ?

Have a nice weekend,
Stephan


-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: How to edit new file in current directory ?

Andreas Weber-6
Am 26.01.2018 um 14:59 schrieb Stephan Goldenberg:
>>> pwd
> ans = /home/oppa/Dokumente/edX/EPFL/octave/chapter4
>>> edit test.m
> cp: cannot create regular file '/home/oppa/octave/test.m': No such file
> or directory

Just a wild guess: Since "test" is a internal function and located in
/usr/..octave../m/../test.m

a copy is created and the default target for this copy is in ~/octave/
where you should have write access.

This differs if you want to edit your own function, for example
edit foobar.m which should indeed create the file at pwd.

Hoffe das hilft, Gruß von Andy


-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------