bugGNU Octave - Bugs: bug #55457, which() and edit() don't work on...

 
 

bug #55457: which() and edit() don't work on functions or classes in namespaces

Submitter:  Andrew Janke <apjanke>
Submitted:  Sat 12 Jan 2019 06:30:35 AM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.4.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 19 Jan 2019 06:00:42 AM UTC, comment #1: 

Oops; this is a dupe of bug #52585. Please close as dupe.

Andrew Janke <apjanke>
Sat 12 Jan 2019 06:30:35 AM UTC, original submission:  

Let's say I have a class Baz and a function SomeFunction defined in the namespace "foo.bar".

My directory structure:
- +foo/
  - +bar/
    - Baz.m
    - SomeFunction.m

In Matlab, you can do which('foo.bar.SomeFunction.m') or edit('foo.bar.SomeFunction') and it will locate that SomeFunction.m file under +foo/+bar. Same with the Baz.m class.

In Octave, this doesn't work:


octave:3> which('foo.bar.Baz')
octave:4> which('foo.bar.SomeFunction')
octave:5>


And doing "edit" on them pops up a prompt saying "File /Users/janke/tmp/octave-test/foo.bar.Baz does not exist. Do you want to create it?"

It would be nice if Octave supported addressing namespace-qualified functions and classes this way. It would make working with large codebases easier.

Andrew Janke <apjanke>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by apjanke (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-20 siko1056 Dependencies- Depends on bugs #52585
    2019-01-20 siko1056 StatusNone Duplicate
        Open/ClosedOpen Closed
    2019-01-12 jwe Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Item GroupMatlab Compatibility Feature Request

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code