Re: post-upgrade Log no longer works.
"Andy Bradford" <[email protected]> 9 Sep 2013 23:54:19 -0600
| Newsgroups | gmane.mail.exmh.user |
|---|---|
| Message-ID | <[email protected]> |
Thus said Harvey Eneman on Mon, 09 Sep 2013 22:16:15 -0700:
> It's been a while, but I found it necessary to apply the following
> patch for logging to work. Perhaps you're having the same issue.
Yes, that did the trick! Thanks. What's interesting is that this wasn't
required before I upgraded.
Also, it turns out that really, all that needs to be caught is this:
--- 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]
Without this, I actually get an error from exmh and a trace which seem
to indicate that source is being used incorrectly:
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)
The man page clearly indicates there is no ``-encoding utf-8'' option to
source. So why is ::tcl::clock::format trying to use such a thing?
And here it is from tcl-8.5's clock.tcl:
if { [catch {
source -encoding utf-8 [file join $DataDir $fileName]
}] } {
Seems like a bug in Tcl proper.
Andy
--
TAI64 timestamp: 40000000522eb42b