octave-maintainers
[Top][All Lists]
Advanced

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

Re: Policy of refering to packages? Policy of choosing package for ML-co


From: Mike Miller
Subject: Re: Policy of refering to packages? Policy of choosing package for ML-compatible functions?
Date: Fri, 23 Dec 2016 15:46:25 -0800
User-agent: NeoMutt/20161126 (1.7.1)

On Thu, Dec 22, 2016 at 13:42:14 -0500, Nicholas Jankowski wrote:
> I'm wondering if this would also help the issue that arises periodically
> when a user attempts to call a function from a non-loaded package, and
> maybe provide a more reliable or automated way to provide a "you need to
> load package XYZ to use that function" message.

There are definitely some concrete steps that could be taken to add some
smarts to the interpreter when a user calls a function that isn't
loaded.

One idea was to query the lists of functions in installed-but-not-loaded
packages. These are typically documented in the INDEX file and are
stored in the cache which is already available via

  pkg rebuild;
  c = pkg ("describe", "all");

One could develop a function that would iterate through the cache and
search for a (or possible more than one) installed package that provides
a given function name.

This is open bug #45855, which I started to poke at but could use some
more contributions to fully integrate with the missing function hook.

Beyond looking at installed-but-not-loaded packages, another option
could be to (possibly via an opt-in setting) query a web API that
returns a not-yet-installed package for a given function.

Or if that's too automatic (I think it is), maybe a "pkg search"
subcommand that could return a package or list of packages that contain
functions matching a query.

-- 
mike



reply via email to

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