Am 12.10.2018 um 01:02 schrieb Allin Cottrell:
On Thu, 11 Oct 2018, Allin Cottrell wrote:
> On Sat, 6 Oct 2018, Sven Schreiber wrote:
>
>> I'm noticing that with the Oct 4th snapshot in the (local) function
>> package list window a (preliminary) package appears that lives in a
>> non-standard path.
>>
>> This is new I think, because it used to be that one could switch to
>> a user-specified path, and then only those packages from there was
>> shown. If one reverted to the standard listing, the non-standard
>> paths would be forgotten again.
>>
>> Is this a bug or a feature?
> * the user's current working directory.
Ah right, this must be it, my CWD is very likely currently set to that
location.
Another thought, in response to Sven's "bug or feature" question.
The inclusion of the user's working directory in the package search
path is a feature in the sense of being deliberately designed in, but
maybe it's a mis-feature (aka bug). Since you probably spend more time
working with function-package files than anyone else, Sven, I'd value
your opinion on whether including the working directory by default is
a help or a hazard. It would be easy enough to exclude it.
Good question. For me as a package developer it was actually useful,
because when I debug and recreate the package it is then (in the CWD)
automatically updated within gretl.
Also this makes it easier to distribute non-public or non-official
packages to colleagues, and also for backing them up along with other
files. They just have to put it in the same place as their project.
I was just not actively aware of it, but I don't think it's a hazard
because shoving a package file actively in those non-standard places
will be for some reason, not by accident. Also it's good that gretl
shows the path where it found the package in its info window. It might
be also useful to show that path in the package registry, but the space
there is also limited.
So probably just leave as is.
What's more of an issue for me is the perennial path-searching problem
when including .inp files. My observation (or just feeling?) is that
when I want to include <pathprefix>/helper.inp from
<pathprefix>/main.inp I either have to set the CWD to <pathprefix> or I
have to give absolute, not relative paths. The first is a nuisance
because I often switch projects and/or paths, the second is also not
very elegant I think.
I think I had questions like this already years ago which led to the
CWD being more easily settable. The recent display of the CWD in the
main window also helps because it is clickable and brings up the setting
dialog. But some unix-y suggestions like 'include ./helper.inp" or
similar don't work on Windows (do they actually work on Linux, cannot
test right now?). It would seem very natural that you could just
"include" a file sitting next to you.
thanks,
sven