octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55457] which() and edit() don't work on funct


From: Andrew Janke
Subject: [Octave-bug-tracker] [bug #55457] which() and edit() don't work on functions or classes in namespaces
Date: Sat, 12 Jan 2019 01:30:37 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?55457>

                 Summary: which() and edit() don't work on functions or
classes in namespaces
                 Project: GNU Octave
            Submitted by: apjanke
            Submitted on: Sat 12 Jan 2019 06:30:35 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: Any

    _______________________________________________________

Details:

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.





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55457>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]