RE: post-upgrade Log no longer works.

"Welch, Brent" <[email protected]> Tue, 10 Sep 2013 19:25:52 +0000
Newsgroups gmane.mail.exmh.user
Message-ID <DA636AC7BF798243A4007D3AA0B3D3A7E2893709@seabiscuit>
You want

  [lindex $args end]

because the optional --encoding argument comes first, and the file name is the last argument
--
Brent


-----Original Message-----
From: Harvey Eneman [mailto:[email protected]] 
Sent: Tuesday, September 10, 2013 9:44 AM
To: Welch, Brent
Cc: Discussion list for EXMH users; Harvey Eneman
Subject: Re: post-upgrade Log no longer works.

[email protected] said:
> Change the proc source def to
> proc source {args} { ...
>    set result [uplevel 1 "source-orig $args"] ... }
> args is special, and is a list.  The " " concatenates that list onto
> source-orig and creates a well-formed command for use by uplevel.

> -- Brent

You will also want to replace the remaining reference to the prior argument
with the first element in the args list, so the patch should be something
like:


*** source.tcl.orig	2013-09-10 09:41:07.000000000 -0700
--- source.tcl	2013-09-10 09:33:55.000000000 -0700
***************
*** 1,9 ****
  if {$exmh(sourceHook) && [info command source-orig] ==  ""} {
      rename source source-orig
!     proc source {file} {
  	 global SourceHook
! 	 set result [uplevel 1 [list source-orig $file]]
! 	 set fn [file rootname [file tail $file]]
  	 if [info exists SourceHook($fn)] {
  	    if [catch {uplevel 1 $SourceHook($fn)} err] {
  		Exmh_Status "Error in source hook for $fn: $err" warning
--- 1,9 ----
  if {$exmh(sourceHook) && [info command source-orig] ==  ""} {
      rename source source-orig
!     proc source {args} {
  	 global SourceHook
! 	 set result [uplevel 1 "source-orig $args"]]
! 	 set fn [file rootname [file tail [lindex $args 0]]]
  	 if [info exists SourceHook($fn)] {
  	    if [catch {uplevel 1 $SourceHook($fn)} err] {
  		Exmh_Status "Error in source hook for $fn: $err" warning