octave-maintainers
[Top][All Lists]
Advanced

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

Re: package manager patch + problem


From: David Bateman
Subject: Re: package manager patch + problem
Date: Wed, 28 Feb 2007 14:35:51 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Paul Kienzle wrote:
>
> On Feb 28, 2007, at 5:40 AM, David Bateman wrote:
>
>> Michael Goffioul wrote:
>>>
>>>> Looking at autoload(), it doesn't seem to load the file.
>>>> I suspect the which() command does, but it is not
>>>> immediately clear from glancing at the code.  Maybe
>>>> we could use the following instead:
>>>>
>>>>     autoload("glog",file_in_loadpath("gf.oct"))
>>>
>>> Yes, I also think it's due to "which": if you "which myfun"
>>> where myfun is an oct-file named myfun.oct, but you don't
>>> have a corresponding "DEFUN_DLD (myfun, ...)" statement
>>> in the code, then "which" fails: this means that somehow,
>>> the oct-file must be loaded and the symbol is searched.
>>>
>>> Michael.
>>>
>>>
>>>
>> Is it better to workaround this with the autoload
>> commans in the PKG_ADD files or try and figure out
>> why which is loading the DLD functions and try and
>> stop it doing it..
>
> As it is currently defined, which() is operating on
> symbol table items, so I don't think you are going
> to avoid loading the symbol at the same time.
>
> My concern with file_in_loadpath() is that it might
> return relative rather than absolute file filenames
> (I don't know) but other than that I think it makes
> it more clear what the autoload is doing.
>
> - Paul
>
>
What about the solution in octave itself that uses

autoload ("airy", fullfile (fileparts (mfilename ("fullpath")),
"besselj.oct"));

in the PKG_ADD file in the directory with besselj.oct. mfilename is run
on the PKG_ADD file itself and there is no concern that the path is not
absolute..

The disadvantage is that the PKG_ADD file must be in the same directory
as the file being autoloaded..

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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