Add a New Comment (Rich Markup)
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)
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
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
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.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11