bugGNU Octave - Bugs: bug #58931, Right-clicking on a function name...

 
 

bug #58931: Right-clicking on a function name defined as a command-line function to edit it leads to inconsistent behaviour

Submitted by:  Tasos Papastylianou <tpapastylianou>
Submitted on:  Mon 10 Aug 2020 05:04:42 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  None Assigned to:  None
Originator Name:  Tasos Papastylianou Open/Closed:  Open
Release:  5.2.0 Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Tue 11 Aug 2020 09:01:08 PM UTC, comment #1: 

Octave-7.0.0 (dev) on Windows does the same as Octave-5.1.0. So apparently it has been "fixed" or "restored".

Your other question, at least what I could make from it, seems logical at first sight. But then, how would you edit a command line function, which -as the name says- is defined using the command line?
Have you compared with Matlab?

Philip Nienhuis <philipnienhuis>
Project Member
Mon 10 Aug 2020 05:04:42 PM UTC, original submission:  

Prompted by this question on stackoverflow: https://stackoverflow.com/q/63325950/4183191

Steps to reproduce:
Step 1: Create the following script called myfunctiondefs.m

1;
function f1(); disp('hello from f1'); endfunction
function f2(); disp('hello from f2'); endfunction

Step 2: Create script myscript.m in the same directory

myfunctiondefs
f1()
f2()

Step 3: Open myscript.m in the octave GUI editor, run it once to generate the function definitions in the current session, and then highlight "f2" with the mouse, right-click, and select Edit f2 from the context menu.

Expected outcome: A generated f2.m file in the user's home folder, i.e. the same as what would have happened if one manually typed "edit f2.m" in the terminal.

Observed outcome:
 - In octave v5.1.0: A popup window saying "f2 is a built-in, compiled, or inline function and cannot be edited".

 - In octave v5.2.0: An empty, nameless m-file (in other words, a file called ".m" is created in the current directory).

Clearly there's a regression bug between v5.1.0 and v5.2.0.

However, the bigger question is, when a name in the GUI editor is a reference a command-line function, which doesn't right-clicking and selecting to edit it behave the same as the equivalent "edit" command?

Tasos Papastylianou <tpapastylianou>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tpapastylianou (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5