bugGNU Octave - Bugs: bug #45855, add function information from...


bug #45855: add function information from not-yet-loaded packages to the missing_function_hook

Submitter:  Mike Miller <mtmiller>
Submitted:  Tue 01 Sep 2015 07:40:07 PM UTC
Category:  Octave Function Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  In Progress Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Wed 23 Sep 2015 09:04:20 AM UTC, comment #1: 

Attached findfunc locates a function name in not-yet-loaded packages by searching the function list from the INDEX file. I can look at hooking this into _unimplemented_ as a fallback case.

(file #34957)

Mike Miller <mtmiller>
Group administrator
Tue 01 Sep 2015 07:40:07 PM UTC, original submission:  

This idea came up on the help mailing list, just noting it as I think it would be a useful enhancement. Note that it may end up being only corner cases, I'm not sure what percentage of functions fall into this category.

The missing_function_hook function _unimplemented_ has a list of known functions from Matlab and Matlab toolboxes, grouped by equivalent Octave package name, so it can tell users which package to load or install to get a given function.

This doesn't cover a couple cases: functions that should be in Octave core, but are in a package (e.g. xmlread in the io package); and functions that are in a package but are not in Matlab (e.g. assumptions in the symbolic package).

The _unimplemented_ function could be enhanced to search through the list of functions provided by installed packages, and show the user that a package could be loaded to be able to use that function.

Example showing how to locate a given function in the pkg cache structure:

>> assumptions
error: 'assumptions' undefined near line 1 column 1
>> pkgs = pkg ("describe", "all");
>> pkgs{5}.name
ans = symbolic
>> any (strcmp (pkgs{5}.provides{1}.functions, "assumptions"))
ans =  1

Mike Miller <mtmiller>
Group administrator


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

Attach Files:

Attached Files
file #34957:  findfunc.m added by mtmiller (1KiB - text/x-objcsrc)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller (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 project members can vote.





    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-23 mtmiller Attached File- Added findfunc.m, #34957
        StatusPostponed In Progress
    2015-09-12 mtmiller Priority5 - Normal 1 - Later

    Back to the top

    Powered by Savane 3.11