Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Look afar and see the end from the beginning.


comp / comp.lang.tcl / Re: typical TCL docu nonsens

SubjectAuthor
* typical TCL docu nonsensaotto1968
+* Re: typical TCL docu nonsensRobert Heller
|`* Re: typical TCL docu nonsensaotto1968
| `* Re: typical TCL docu nonsenset99
|  `* Re: typical TCL docu nonsensRich
|   +- Re: typical TCL docu nonsensGerald Lester
|   +- Re: typical TCL docu nonsenset99
|   `* Re: typical TCL docu nonsensRobert Heller
|    +- Re: typical TCL docu nonsensRich
|    `- Re: typical TCL docu nonsensRich
`- Re: typical TCL docu nonsensaotto1968

1
Subject: typical TCL docu nonsens
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 21 Jun 2024 09:40 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: typical TCL docu nonsens
Date: Fri, 21 Jun 2024 11:40:25 +0200
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <v53hqa$33n2h$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 21 Jun 2024 11:40:26 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="72772beec07915e43ec9d6c2496e2ccf";
logging-data="3267665"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JBxxRfN/NfPIj1Ca9eyld0gzOnzVsfeM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:IEzvIqzPTBUcGzQQiHMp+fgjkEo=
Content-Language: en-US
View all headers

typical TCL "package" horror

# I know finally the "autopath" is the WRONG name
lappend autopath /some/path/to/package/dir

package require FileLib

>>
can't find package FileLib

while executing
"package require FileLib"

----
→ go into the directory

sbin> cat pkgIndex.tcl

package ifneeded FileLib 2.0 [list source [file join $dir FileLib.tcl]]
package ifneeded StdLib 2.0 [list source [file join $dir StdLib.tcl]]

----

→ try to debug, add "set tcl_traceExec 1"
→ get a lot of "nonsens" (important info cut away)

Calling proc "::unknown" "::tcl::tm::Unkn..." "::tclPkgUnknown" "FileLib" "0-"
Calling proc "auto_load" "::tcl::tm::Unkn..." "::"
Calling proc "auto_qualify" "::tcl::tm::Unkn..." "::"
Calling proc "auto_load_index"
Calling proc "::tcl::tm::Defa..."
Calling proc "roots" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "add" "/home/dev1usr/e..."
Calling proc "::tcl::tm::Unkn..." "::tclPkgUnknown" "FileLib" "0-"
Calling proc "::unknown" "::tclPkgUnknown" "FileLib" "0-"
Calling proc "auto_load" "::tclPkgUnknown" "::"
Calling proc "auto_qualify" "::tclPkgUnknown" "::"
Calling proc "::tclPkgUnknown" "FileLib" "0-"
Calling lambda "apply" "{dir} {\n se..." "/home/dev1usr/e..."
can't find package FileLib
while executing
"package require FileLib"

---

call: man n package

→ check for the term "path" → not found in manpage
→ a lot of text but NOT a single word how to setup the path to get the package found !!

----

after some research the right name is "auto_path"

mfg ao

Subject: Re: typical TCL docu nonsens
From: Robert Heller
Newsgroups: comp.lang.tcl
Organization: Deepwoods Software
Date: Fri, 21 Jun 2024 12:25 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-3.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 21 Jun 2024 12:25:07 +0000
MIME-Version: 1.0
From: heller@deepsoft.com (Robert Heller)
Organization: Deepwoods Software
X-Newsreader: TkNews 3.0 (1.2.18)
Subject: Re: typical TCL docu nonsens
In-Reply-To: <v53hqa$33n2h$1@dont-email.me>
References: <v53hqa$33n2h$1@dont-email.me>
Newsgroups: comp.lang.tcl
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset="us-ascii"
Originator: heller@sharky4.deepsoft.com
Message-ID: <Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com>
Date: Fri, 21 Jun 2024 12:25:07 +0000
Lines: 104
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-ZrW1D3GZLiIL0wELTY7xZXdbXwQx0IzA8GtwPIMWbdINFHp80DXQ53IxjzvUEFCk4PvTDJcunr9vD6P!TdMDWldlBI1j2S/ug9WziCAWA3mWXA8rL1aQ0jArpBz22pz12Q28JjWsFHKq28fk6122RAGDtssm!oXs=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

At Fri, 21 Jun 2024 11:40:25 +0200 aotto1968 <aotto1968@t-online.de> wrote:

>
>
> typical TCL "package" horror
>
> # I know finally the "autopath" is the WRONG name
> lappend autopath /some/path/to/package/dir

The correct name is auto_path. The docs say so:

auto_path
If set, then it must contain a valid Tcl list giving directories
to search during auto-load operations (including for package in‐
dex files when using the default package unknown handler). This
variable is initialized during startup to contain, in order: the
directories listed in the TCLLIBPATH environment variable, the
directory named by the tcl_library global variable, the parent
directory of tcl_library, the directories listed in the tcl_pkg‐
Path variable. Additional locations to look for files and pack‐
age indices should normally be added to this variable using lap‐
pend.

Additional variables relating to package management exist. More
details are listed in the VARIABLES section of the library man‐
ual page.

Where did you see "autopath"?

>
> package require FileLib
>
> >>
> can't find package FileLib
>
> while executing
> "package require FileLib"
>
> ----
> → go into the directory
>
> sbin> cat pkgIndex.tcl
>
> package ifneeded FileLib 2.0 [list source [file join $dir FileLib.tcl]]
> package ifneeded StdLib 2.0 [list source [file join $dir StdLib.tcl]]
>
> ----
>
> → try to debug, add "set tcl_traceExec 1"
> → get a lot of "nonsens" (important info cut away)
>
> Calling proc "::unknown" "::tcl::tm::Unkn..." "::tclPkgUnknown" "FileLib" "0-"
> Calling proc "auto_load" "::tcl::tm::Unkn..." "::"
> Calling proc "auto_qualify" "::tcl::tm::Unkn..." "::"
> Calling proc "auto_load_index"
> Calling proc "::tcl::tm::Defa..."
> Calling proc "roots" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "add" "/home/dev1usr/e..."
> Calling proc "::tcl::tm::Unkn..." "::tclPkgUnknown" "FileLib" "0-"
> Calling proc "::unknown" "::tclPkgUnknown" "FileLib" "0-"
> Calling proc "auto_load" "::tclPkgUnknown" "::"
> Calling proc "auto_qualify" "::tclPkgUnknown" "::"
> Calling proc "::tclPkgUnknown" "FileLib" "0-"
> Calling lambda "apply" "{dir} {\n se..." "/home/dev1usr/e..."
> can't find package FileLib
> while executing
> "package require FileLib"
>
> ---
>
> call: man n package
>
> → check for the term "path" → not found in manpage
> → a lot of text but NOT a single word how to setup the path to get the package found !!
>
> ----
>
> after some research the right name is "auto_path"
>
> mfg ao
>
>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services

Subject: Re: typical TCL docu nonsens
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 21 Jun 2024 20:17 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: typical TCL docu nonsens
Date: Fri, 21 Jun 2024 22:17:29 +0200
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <v54n4p$3aslh$1@dont-email.me>
References: <v53hqa$33n2h$1@dont-email.me>
<Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 21 Jun 2024 22:17:30 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="72772beec07915e43ec9d6c2496e2ccf";
logging-data="3502769"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+pxsrRGc4kZmw8o+rJonAvmBETEv6Cogg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:bc5jDnBrfOFnZdhIScF4gzTIEGY=
Content-Language: en-US
In-Reply-To: <Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com>
View all headers

On 21.06.24 14:25, Robert Heller wrote:
> At Fri, 21 Jun 2024 11:40:25 +0200 aotto1968 <aotto1968@t-online.de> wrote:
>
>>
>>
>> typical TCL "package" horror
>>
>> # I know finally the "autopath" is the WRONG name
>> lappend autopath /some/path/to/package/dir
>
> The correct name is auto_path. The docs say so:
>
> auto_path
> If set, then it must contain a valid Tcl list giving directories
> to search during auto-load operations (including for package in‐
> dex files when using the default package unknown handler). This
> variable is initialized during startup to contain, in order: the
> directories listed in the TCLLIBPATH environment variable, the
> directory named by the tcl_library global variable, the parent
> directory of tcl_library, the directories listed in the tcl_pkg‐
> Path variable. Additional locations to look for files and pack‐
> age indices should normally be added to this variable using lap‐
> pend.
>
> Additional variables relating to package management exist. More
> details are listed in the VARIABLES section of the library man‐
> ual page.
>
> Where did you see "autopath"?
>
>>

the core problem is *not* the "autopath" is wrong because at the time I use it I
does not know it was wrong. The core problem is that is was *very* difficult to figure
out what was the "right" name. special the tcl_traceExec… does not help and more
important the package.n docu (package require…) does *not* spend a single word on
*how* to find a package.

Subject: Re: typical TCL docu nonsens
From: et99
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 21 Jun 2024 21:32 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: et99@rocketship1.me (et99)
Newsgroups: comp.lang.tcl
Subject: Re: typical TCL docu nonsens
Date: Fri, 21 Jun 2024 14:32:30 -0700
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <v54rhe$3bhpo$1@dont-email.me>
References: <v53hqa$33n2h$1@dont-email.me>
<Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com>
<v54n4p$3aslh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 21 Jun 2024 23:32:31 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1e574130f8558828b763ada68836992b";
logging-data="3524408"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wogCgSxr3mPVxBVK3exzF"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:Z3BsreNw4Wlxsj8c7XCgKeRa18U=
Content-Language: en-US
In-Reply-To: <v54n4p$3aslh$1@dont-email.me>
View all headers

On 6/21/2024 1:17 PM, aotto1968 wrote:
snip

>
> the core problem is *not* the "autopath" is wrong because at the time I use it I
> does not know it was wrong. The core problem is that is was *very* difficult to figure
> out what was the "right" name. special the tcl_traceExec… does not help and more
> important the package.n docu (package require…) does *not* spend a single word on
> *how* to find a package.
>

I'm not sure if this would have helped in your case, but I've used this with some success. It outputs every package command issued and by using a search pattern to limit the output to the ifneeded commands, sometimes gets me what I need to know.

Being on windows, I use the console and the update calls get quicker output. If on linux, I suppose you could also pipe it through grep.

rename package package_orig

proc package {args} {
if { [info exist ::packpat] } {
if { [string match -nocase *${::packpat}* $args]} {
puts "----package: $args" ; update idletasks
}
}
tailcall package_orig {*}$args
} console show ; update

set ::packpat "ifneeded*bwidget"

catch {package require foobar} ;# this won't be found, so it causes a big search

Subject: Re: typical TCL docu nonsens
From: Rich
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 21 Jun 2024 21:55 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: typical TCL docu nonsens
Date: Fri, 21 Jun 2024 21:55:54 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <v54sta$3bqij$1@dont-email.me>
References: <v53hqa$33n2h$1@dont-email.me> <Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com> <v54n4p$3aslh$1@dont-email.me> <v54rhe$3bhpo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 21 Jun 2024 23:55:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c1822e671ded941375ba81f7b10eb360";
logging-data="3533395"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MAGjJb8gBAP42Pqq6oWdI"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:4YMCGSmsw/rkI5X7VHase5/iyg0=
View all headers

et99 <et99@rocketship1.me> wrote:
> On 6/21/2024 1:17 PM, aotto1968 wrote:
> snip
>>
>> the core problem is *not* the "autopath" is wrong because at the
>> time I use it I does not know it was wrong. The core problem is
>> that is was *very* difficult to figure out what was the "right"
>> name. special the tcl_traceExec… does not help and more important
>> the package.n docu (package require…) does *not* spend a single word
>> on *how* to find a package.
>
> I'm not sure if this would have helped in your case, but I've used
> this with some success. It outputs every package command issued and
> by using a search pattern to limit the output to the ifneeded
> commands, sometimes gets me what I need to know.

aotto1968's complaint is that the "package" man page does not mention
that the auto_path variable stores the search path list for finding
packages. And, I looked, it does not make any mention of the
"specialness" of that variable.

On my Slack15 install, all of the Tcl special variables are documented
in a man page named "tcl_library" (although the page contents believes
it is named "tclvars"). So auto_path's specialness /is/ documented,
but unless one has discovered that it is documented in a different
manpage from 'package', one could very well spend a lot of time and not
find the proper docs.

So the least disruptive change to cover aotto1968's complaint would be
for aotto1968 to file a patch against the package man page adding a
"see tcl_library manpage for Tcl special variables related to package
handling".

That, or aotto1968 should file a patch against the package namespace to
add a brief paragraph to the package manpage detailing that the special
global auto_path contains a list of directories within which to search
for packages when doing a package require.

Either of the above would be a proactive step to eliminate the problem.

Grumbling on Usenet about the issue is not taking any direct steps to
proactively eliminate the issue.

Subject: Re: typical TCL docu nonsens
From: Gerald Lester
Newsgroups: comp.lang.tcl
Organization: fastusenet - www.fastusenet.org
Date: Fri, 21 Jun 2024 22:05 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.swapon.de!news.in-chemnitz.de!3.eu.feeder.erje.net!feeder.erje.net!npeer.as286.net!npeer-ng0.as286.net!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: typical TCL docu nonsens
Newsgroups: comp.lang.tcl
References: <v53hqa$33n2h$1@dont-email.me>
<Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com>
<v54n4p$3aslh$1@dont-email.me> <v54rhe$3bhpo$1@dont-email.me>
<v54sta$3bqij$1@dont-email.me>
Content-Language: en-US
From: Gerald.Lester@gmail.com (Gerald Lester)
In-Reply-To: <v54sta$3bqij$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 47
Message-ID: <ZOmdO.69593$Kxzd.52998@fx15.iad>
X-Complaints-To: abuse@fastusenet.org
NNTP-Posting-Date: Fri, 21 Jun 2024 22:05:45 UTC
Organization: fastusenet - www.fastusenet.org
Date: Fri, 21 Jun 2024 17:05:45 -0500
X-Received-Bytes: 3110
View all headers

On 6/21/24 16:55, Rich wrote:
> et99 <et99@rocketship1.me> wrote:
>> On 6/21/2024 1:17 PM, aotto1968 wrote:
>> snip
>>>
>>> the core problem is *not* the "autopath" is wrong because at the
>>> time I use it I does not know it was wrong. The core problem is
>>> that is was *very* difficult to figure out what was the "right"
>>> name. special the tcl_traceExec… does not help and more important
>>> the package.n docu (package require…) does *not* spend a single word
>>> on *how* to find a package.
>>
>> I'm not sure if this would have helped in your case, but I've used
>> this with some success. It outputs every package command issued and
>> by using a search pattern to limit the output to the ifneeded
>> commands, sometimes gets me what I need to know.
>
> aotto1968's complaint is that the "package" man page does not mention
> that the auto_path variable stores the search path list for finding
> packages. And, I looked, it does not make any mention of the
> "specialness" of that variable.
>
> On my Slack15 install, all of the Tcl special variables are documented
> in a man page named "tcl_library" (although the page contents believes
> it is named "tclvars"). So auto_path's specialness /is/ documented,
> but unless one has discovered that it is documented in a different
> manpage from 'package', one could very well spend a lot of time and not
> find the proper docs.
>
> So the least disruptive change to cover aotto1968's complaint would be
> for aotto1968 to file a patch against the package man page adding a
> "see tcl_library manpage for Tcl special variables related to package
> handling".
>
> That, or aotto1968 should file a patch against the package namespace to
> add a brief paragraph to the package manpage detailing that the special
> global auto_path contains a list of directories within which to search
> for packages when doing a package require.
>
> Either of the above would be a proactive step to eliminate the problem.
>
> Grumbling on Usenet about the issue is not taking any direct steps to
> proactively eliminate the issue.
>

Or read through all of the man/reference/doc pages when picking up a new
language.

Subject: Re: typical TCL docu nonsens
From: et99
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Fri, 21 Jun 2024 22:36 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: et99@rocketship1.me (et99)
Newsgroups: comp.lang.tcl
Subject: Re: typical TCL docu nonsens
Date: Fri, 21 Jun 2024 15:36:16 -0700
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <v54v90$3c8ip$1@dont-email.me>
References: <v53hqa$33n2h$1@dont-email.me>
<Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com>
<v54n4p$3aslh$1@dont-email.me> <v54rhe$3bhpo$1@dont-email.me>
<v54sta$3bqij$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 22 Jun 2024 00:36:17 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="20a6ea7912443f3db63c43642744f0a5";
logging-data="3547737"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/U8JW8/tcSoqMket+4ktPx"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:56p1OCPM9YZLeihq/amceAslgVs=
Content-Language: en-US
In-Reply-To: <v54sta$3bqij$1@dont-email.me>
View all headers

On 6/21/2024 2:55 PM, Rich wrote:
> et99 <et99@rocketship1.me> wrote:
>> On 6/21/2024 1:17 PM, aotto1968 wrote:
>> snip
>>>
>>> the core problem is *not* the "autopath" is wrong because at the
>>> time I use it I does not know it was wrong. The core problem is
>>> that is was *very* difficult to figure out what was the "right"
>>> name. special the tcl_traceExec… does not help and more important
>>> the package.n docu (package require…) does *not* spend a single word
>>> on *how* to find a package.

snip

> So the least disruptive change to cover aotto1968's complaint would be
> for aotto1968 to file a patch against the package man page adding a
> "see tcl_library manpage for Tcl special variables related to package
> handling".
>
> That, or aotto1968 should file a patch against the package namespace to
> add a brief paragraph to the package manpage detailing that the special
> global auto_path contains a list of directories within which to search
> for packages when doing a package require.
>
> Either of the above would be a proactive step to eliminate the problem.
>

Being that I'm mostly on windows, I use Ashok's documentation website. His index is great, and you can pre-load a search term, like so:

https://www.magicsplat.com/tcl-docs/docindex.html?search=tclvars

which takes you directly to the tclvars page where auto_path is the first variable described.

Now that Ashok is part of the core team (yay!) I think something like his webtools would be a great addition to the official tcl documentation, if Ashok would approve of such.

I use his tool from within my text editor, where the word under the cursor can be sent off as the search term using the above url and sending it through to chrome, all with a single keystroke.

Truly great resource!

Subject: Re: typical TCL docu nonsens
From: Robert Heller
Newsgroups: comp.lang.tcl
Organization: Deepwoods Software
Date: Fri, 21 Jun 2024 23:20 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!border-1.nntp.ord.giganews.com!border-3.nntp.ord.giganews.com!nntp.giganews.com!local-2.nntp.ord.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 21 Jun 2024 23:20:55 +0000
MIME-Version: 1.0
From: heller@deepsoft.com (Robert Heller)
Organization: Deepwoods Software
X-Newsreader: TkNews 3.0 (1.2.18)
Subject: Re: typical TCL docu nonsens
In-Reply-To: <v54sta$3bqij$1@dont-email.me>
References: <v53hqa$33n2h$1@dont-email.me>
<Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com>
<v54n4p$3aslh$1@dont-email.me> <v54rhe$3bhpo$1@dont-email.me>
<v54sta$3bqij$1@dont-email.me>
Newsgroups: comp.lang.tcl
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset="us-ascii"
Originator: heller@sharky4.deepsoft.com
Message-ID: <qumdnfiT_c1Kl-v7nZ2dnZfqnPudnZ2d@giganews.com>
Date: Fri, 21 Jun 2024 23:20:55 +0000
Lines: 63
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-9qSmbtY78J99IjyVkMCS76asWNw6mV5AgDMiYbhg1K2ezSSag7KTIgZ53Rmv1uEQkfb3TMtluy85XZn!wT2zNziRLJQ3eTUjXLU7yS9r+fLdUpDg5DHgDU2NyAyTN+m1tj8Jhkq2wg8+bPJvNOmyDidrIZLV!pv8=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
View all headers

At Fri, 21 Jun 2024 21:55:54 -0000 (UTC) Rich <rich@example.invalid> wrote:

>
> et99 <et99@rocketship1.me> wrote:
> > On 6/21/2024 1:17 PM, aotto1968 wrote:
> > snip
> >>
> >> the core problem is *not* the "autopath" is wrong because at the
> >> time I use it I does not know it was wrong. The core problem is
> >> that is was *very* difficult to figure out what was the "right"
> >> name. special the tcl_traceExec… does not help and more important
> >> the package.n docu (package require…) does *not* spend a single word
> >> on *how* to find a package.
> >
> > I'm not sure if this would have helped in your case, but I've used
> > this with some success. It outputs every package command issued and
> > by using a search pattern to limit the output to the ifneeded
> > commands, sometimes gets me what I need to know.
>
> aotto1968's complaint is that the "package" man page does not mention
> that the auto_path variable stores the search path list for finding
> packages. And, I looked, it does not make any mention of the
> "specialness" of that variable.
>
> On my Slack15 install, all of the Tcl special variables are documented
> in a man page named "tcl_library" (although the page contents believes
> it is named "tclvars"). So auto_path's specialness /is/ documented,
> but unless one has discovered that it is documented in a different
> manpage from 'package', one could very well spend a lot of time and not
> find the proper docs.
>
> So the least disruptive change to cover aotto1968's complaint would be
> for aotto1968 to file a patch against the package man page adding a
> "see tcl_library manpage for Tcl special variables related to package
> handling".

I suspect that the tcl_library manpage is replicated from the tclvars man
page. A number of Tcl's (and Tk's) man pages are dups. Which happen at build
or install time (links?) or possibly using an old UNIX trick where man pages
can implement a re-direct -- this is done because some man pages cover
multiple closely related topics (or groups commands that have common
documentation.

>
> That, or aotto1968 should file a patch against the package namespace to
> add a brief paragraph to the package manpage detailing that the special
> global auto_path contains a list of directories within which to search
> for packages when doing a package require.
>
> Either of the above would be a proactive step to eliminate the problem.
>
> Grumbling on Usenet about the issue is not taking any direct steps to
> proactively eliminate the issue.
>
>
>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services

Subject: Re: typical TCL docu nonsens
From: Rich
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Sat, 22 Jun 2024 01:29 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: typical TCL docu nonsens
Date: Sat, 22 Jun 2024 01:29:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <v559db$3hr1k$1@dont-email.me>
References: <v53hqa$33n2h$1@dont-email.me> <Da-cnft8h9O-7Oj7nZ2dnZfqnPednZ2d@giganews.com> <v54n4p$3aslh$1@dont-email.me> <v54rhe$3bhpo$1@dont-email.me> <v54sta$3bqij$1@dont-email.me> <qumdnfiT_c1Kl-v7nZ2dnZfqnPudnZ2d@giganews.com>
Injection-Date: Sat, 22 Jun 2024 03:29:15 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="43a00a6c9df3184c62368e08b74e19b2";
logging-data="3730484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18an6B2vteYBk+ZPEGh/Kxt"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:nqe7VRCpKWkaoBmFiNd0XX/r4sE=
View all headers

Robert Heller <heller@deepsoft.com> wrote:
> At Fri, 21 Jun 2024 21:55:54 -0000 (UTC) Rich <rich@example.invalid> wrote:
>
>>
>> et99 <et99@rocketship1.me> wrote:
>> > On 6/21/2024 1:17 PM, aotto1968 wrote:
>> > snip
>> >>
>> >> the core problem is *not* the "autopath" is wrong because at the
>> >> time I use it I does not know it was wrong. The core problem is
>> >> that is was *very* difficult to figure out what was the "right"
>> >> name. special the tcl_traceExec?????? does not help and more important
>> >> the package.n docu (package require??????) does *not* spend a single word
>> >> on *how* to find a package.
>> >
>> > I'm not sure if this would have helped in your case, but I've used
>> > this with some success. It outputs every package command issued and
>> > by using a search pattern to limit the output to the ifneeded
>> > commands, sometimes gets me what I need to know.
>>
>> aotto1968's complaint is that the "package" man page does not mention
>> that the auto_path variable stores the search path list for finding
>> packages. And, I looked, it does not make any mention of the
>> "specialness" of that variable.
>>
>> On my Slack15 install, all of the Tcl special variables are documented
>> in a man page named "tcl_library" (although the page contents believes
>> it is named "tclvars"). So auto_path's specialness /is/ documented,
>> but unless one has discovered that it is documented in a different
>> manpage from 'package', one could very well spend a lot of time and not
>> find the proper docs.
>>
>> So the least disruptive change to cover aotto1968's complaint would be
>> for aotto1968 to file a patch against the package man page adding a
>> "see tcl_library manpage for Tcl special variables related to package
>> handling".
>
> I suspect that the tcl_library manpage is replicated from the tclvars man
> page.

At least on a Slack 15 install, with the Slack distributed 8.6.12 it is
not ("tclvars" was what I tried first, as that is what it always has
been named). Note that this could very well be a glitch in the way
Slackware built their 8.6.12.

Subject: Re: typical TCL docu nonsens
From: aotto1968
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Mon, 24 Jun 2024 09:56 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1968@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: typical TCL docu nonsens
Date: Mon, 24 Jun 2024 11:56:12 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <v5bfrs$s87f$1@dont-email.me>
References: <v53hqa$33n2h$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 24 Jun 2024 11:56:12 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="fab158b6e9adeb1e0786b6f3fea2de69";
logging-data="925935"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zUVmPi151u6vbjrQT9BNhsi1ZdykqGr4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:cWh28TGCcTpxixeMPr775xvv1b8=
Content-Language: en-US
In-Reply-To: <v53hqa$33n2h$1@dont-email.me>
View all headers

There are a couple of layers to solve the TCL documentation bug:

1. -> get better error message

> can't find package FileLib
> while executing
> "package require FileLib"

Not just write the problem itself (can't find package FileLib) but also write about what was checked.
A good error message would be:

> can't find package FileLib
> while executing
> "package require FileLib"
>
> checked the tcl variable "tcl_pkgPath" filled with:
> ...
> checked the tcl variable "auto_path" filled with:
> ...
> checked the environment variable "TCLLIBPATH" filled with:
> ...
> read more about package path lookup at:
> ...

2. -> add the "pkg_mkIndex" docu INTO the "package.n" docu

*pkg_mkIndex* has a lot of information about the package lookup …

also add *pkg_mkIndex* as sub-command "mkindex" into the "package" command…

3. all commands which depend on a special variable set should also mention the variable in the docu :-)

mfg

1

rocksolid light 0.9.8
clearnet tor