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

Submitted by:  Andrew Janke <apjanke>
Submitted on:  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

Add a New Comment (Rich Markup)

You are not logged in

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


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')

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:

No files currently attached


   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)

    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.




    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.6