Bug in Exmh or Tcl?
"Andy Bradford" <[email protected]> 10 Sep 2013 00:22:54 -0600
| Newsgroups | gmane.mail.exmh.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I recently had a strange problem with logging not working in Exmh. As it
turns out it is due to clock format not functioning properly here:
--- main.tcl Mon Sep 9 23:46:55 2013
+++ main.tcl.amb Mon Sep 9 23:50:07 2013
@@ -405,7 +405,9 @@
if [info exists exmh(log)] {
catch {
# $exmh(log) insert end " [bw_delta] "
+ catch {
$exmh(log) insert end [clock format [clock seconds] -format "%H:%M:%S "]
+ }
global tcl_version
if {$tcl_version >= 8.3} {
set sec [clock seconds]
If I remove both catch's that are seen in the patch above, I get the
following:
exmh: tkerror: wrong # args: should be "source ...
wrong # args: should be "source file"
while executing
"source -encoding utf-8 [file join $TclLibDir clock.tcl]"
(procedure "::tcl::clock::format" line 3)
invoked from within
"clock format [clock seconds] -format "%H:%M:%S ""
invoked from within
"if [info exists exmh(log)] {
# $exmh(log) insert end " [bw_delta] "
$exmh(log) insert end [clock format [clock seconds] -format "%H:%M:%S "]
..."
(procedure "ExmhLog" line 23)
invoked from within
"ExmhLog $args"
(procedure "Exmh_Debug" line 9)
invoked from within
"Exmh_Debug [lindex $line 0]"
(procedure "Exmh" line 92)
invoked from within
"Exmh"
("after" script)
What I don't understand is how this is even happening. How is it
possible that the source command doesn't know about the ``-encoding
utf-8'' option?
I have only tclsh8.5 installed:
% set tcl_version
8.5
% source
wrong # args: should be "source ?-encoding name? fileName"
Yet, when I run exmh, it is clearly calling a source that does not have
the option! Is this a bug in Exmh? Some strange environment that is
causing Tcl 8.5 to behave like Tcl 8.4? Tcl 8.4 is not installed.
This only recently happened after I upgraded my OS from OpenBSD 5.2 to
OpenBSD 5.3.
Thanks,
Andy
--
TAI64 timestamp: 40000000522ebade