bugGNU Octave - Bugs: bug #41509, editor's context-menu edit command...

 
 

bug #41509: editor's context-menu edit command can't find existing m files

Submitter:  Felipe G. Nievinski <fgnievinski>
Submitted:  Sat 08 Feb 2014 03:36:05 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 11 Aug 2014 09:17:13 PM UTC, comment #5: 

thank you!

Felipe G. Nievinski <fgnievinski>
Mon 11 Aug 2014 05:45:17 PM UTC, comment #4: 

Felipe, thanks for the suggestions for all those cases. I have pushed changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/e87e65bc71ae
(in gui-relase) which fixes all the cases described in the report.

Torsten Lilge <ttl>
Group Member
Sun 09 Feb 2014 08:16:21 PM UTC, comment #3: 
  • case 4: subfunction in current file

+ solution: move cursor to line matching regex "^function.*blah", where blah is the requested function name

Felipe G. Nievinski <fgnievinski>
Sat 08 Feb 2014 05:57:50 PM UTC, comment #2: 
  • case 3: private function called by non-private function

- unzip case3.zip
- cd case3
- edit afnc.m
- right-click on the call to apvtfnc(); it'll produce a dialog box saying "file case3/apvtfnc does not exist"
+ solution: after trying solution for case 2, check if a private subdir exists, and if so, look in it.

(file #30489)

Felipe G. Nievinski <fgnievinski>
Sat 08 Feb 2014 02:43:31 PM UTC, comment #1: 
  • Case 1:

This should be handled by the edit command, since it also affects the cli-mode: class functions are found by help but not by edit.

  • Case 2:

Here I see two possible solutions (and prefer the second one):
** Always setting the octave directory to the directory of the actual editor file and afterwards calling edit which has a chance to find the function
** Before calling edit, check via "which" if the function file is found. If yes, call "edit function"; if not, call "edit /path_of_editor_file/function"

Torsten Lilge <ttl>
Group Member
Sat 08 Feb 2014 03:36:05 AM UTC, original submission:  
  • case 1: class constructors; to replicate:

- unzip case1.zip
- cd case1
- edit ascript.m
- right-click on the call to aclass(); it'll produce a dialog box saying "file case1/aclass does not exist"
+ solution: call the "which" function; indeed, entering the command:
    which aclass
find the file correctly in:
   'aclass' is a function from the file C:\Users\fgnievinski\case1\@aclass\aclass.m

  • case 2: neighbor private functions; to replicate:

- unzip case2.zip
- cd case2
- edit private/afnc.m
- right-click on the call to bfnc(); it'll produce a dialog box saying "file case2/bfnc does not exist"
+ solution: look in the same directory as the function where the edit call was fired.

Felipe G. Nievinski <fgnievinski>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30489:  case3.zip added by fgnievinski (494B - application/x-zip-compressed)
file #30487:  case1.zip added by fgnievinski (505B - application/x-zip-compressed)
file #30488:  case2.zip added by fgnievinski (498B - application/x-zip-compressed)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by fgnievinski (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-08-11 ttl StatusNone Fixed
        Open/ClosedOpen Closed
    2014-02-08 fgnievinski Attached File- Added case3.zip, #30489
    2014-02-08 fgnievinski Attached File- Added case1.zip, #30487
        Attached File- Added case2.zip, #30488

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code