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

Submitted by:  Felipe G. Nievinski <fgnievinski>
Submitted on:  Sat 08 Feb 2014 03:36:05 AM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

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 <ttl>
Project 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 File(s):
   
   
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
  • -unavailable- added by ttl (Posted a comment)
  • -unavailable- added by fgnievinski (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 08 Feb 2014 05:57:50 PM UTCfgnievinskiAttached File-=>Added case3.zip, #30489
    Sat 08 Feb 2014 03:36:05 AM UTCfgnievinskiAttached File-=>Added case1.zip, #30487
      Attached File-=>Added case2.zip, #30488

    Back to the top


    Powered by Savane 3.1-cleanup