[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58931] Right-clicking on a function name defi
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #58931] Right-clicking on a function name defined as a command-line function to edit it leads to inconsistent behaviour |
Date: |
Thu, 18 May 2023 22:09:38 -0400 (EDT) |
Follow-up Comment #2, bug #58931 (project octave):
regarding the comment #1 question:
in the help for edit, when someone tries to edit a function that has been
defined at the command line, the expected behavior is:
If NAME is the name of a command-line function, then an m-file
will be created to contain that function along with its
current definition.
sure enough, creating a function at the command line:
>> function y = myfun(x), y = 2(x); endfunction
>> myfun(4)
ans = 8
>> edit myfun.m
brings up the 'file does not exist, do you want to create it' dialog. if you
say yes, it creates a myfun.m file in the current working directory, and the
editor opens it showing the current Octave copyright header, template
docsctring, and:
myfun is the command-line function:
function a = myfun (b)
a = 2 * b;
endfunction
however, if you make another function that calls myfun, open it in the editor,
right click on it, and select Edit myfun you get the error:
"myfun is a built-in, compiled, or inline function and cannot be edited"
It seems that doing so should produce the same behavior as typing edit myfun
from the cli.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58931>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58931] Right-clicking on a function name defined as a command-line function to edit it leads to inconsistent behaviour,
Nicholas Jankowski <=