Return-Path: xerox.com!exmh-workers-request.PARC
Received: from alpha.xerox.com ([13.1.64.93]) by palain.parc.xerox.com with SMTP id <96>; Tue, 27 Sep 1994 04:42:18 -0700
Received: from mu.parc.xerox.com ([13.2.116.81]) by alpha.xerox.com with SMTP id <14489(1)>; Tue, 27 Sep 1994 04:39:43 PDT
Received: from alpha.xerox.com ([13.1.64.93]) by mu.parc.xerox.com with SMTP id <58373>; Tue, 27 Sep 1994 04:38:41 -0700
Received: from zag.netlab.london.sco.com ([150.126.4.77]) by alpha.xerox.com with SMTP id <14496(7)>; Tue, 27 Sep 1994 04:35:49 PDT
Received: from zag.london.sco.COM by zag.netlab.london.sco.com id aa17040;
          27 Sep 94 12:37 GMT
To:	hyperbole@cs.brown.edu, exmh-workers@parc.xerox.com
Subject: exmh and hyperbole
X-Face: "?v.huY]?B[a4C|xid!Tx8TpwOQe6]C(I}h8Vo1z6'9soM_Xvq2f3u::[F~rW>GWj6;
	IfU,10H;B&1JDE/H8?``q4XH4~!\_z{n3RDmkC;9d!Yx3O7n?9,[CE;TWB!F8.e5fc0
	dJXikU'v1qFVTfptB7xe$y*t#jx4`I44n,ypMQg@.|Z^ycJ:G]{dR~E}_.T1^shwC%T
	4eRGVu%h+J7lBzb>m20==Q*OPAf^~@6Lj^)rI9Tb*m*L}}HC~{>/__Od\I=[|aP6s}B
	%BhqtE-9uGJ0J3jchjcyJz5fW[i0$RfPv7Zp=!a+0pR
X-Mailer: exmh version 1.5epsilon+ 9/12/94
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
Content-ID: <17033.780669438.0@sco.com>
Date:	Tue, 27 Sep 1994 05:37:19 -0700
From:	Dave Edmondson <davided@sco.com>
Message-ID: <9409271237.aa17040@zag.netlab.london.sco.com>

------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <17033.780669438.1@sco.com>

i've been using the following wish script and hyperbole implicit button type 
for a while now, and they prove useful to me.  i maintain my todo list using 
kotl, and it's often convenient to include pointers to mail messages.  
link-to-mail was never quite what i had in mind.


------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <17033.780669438.2@sco.com>
Content-Description: rexmh

#!/usr/local/bin/wish -f
#
# Send some instructions to a running exmh interpreter.
#
# The following are supported:
# compose		- ask exmh to start composing a message.
# show +folder msg	- ask exmh to display the indicated message.
#
# I attach `rexmh compose' to a function key on my root window (using the
# window manager).  `rexmh show' is currently only used by a Hyperbole
# implicit button type (mail me for details if you want it).
#
# Written by Dave Edmondson (davided@sco.com), July-September 1994.
#

wm withdraw .

while {[llength $argv] != 0} {
    set arg [lindex $argv 0]
    set argv [lrange $argv 1 end]
    
    case $arg in {
	"compose" {
	    send exmh {Msg_Compose Mh_CompSetup}
	}
	
	"show" {
	    set f [lindex $argv 0]
	    set msg [lindex $argv 1]
	    set argv [lrange $argv 2 end]
	    
	    
	    if {![string match "+*" $f]} {
		puts "invalid folder spec"
	    } else {
		set folder [string range $f 1 end]
		set cmd "Folder_Change $folder; MsgChange $msg"
		send exmh $cmd
	    }
	}
	
	default {
	    puts "unknown command $arg";
	    
	}
    }
}

exit 0;

------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <17033.780669438.3@sco.com>
Content-Description: exmh-ref ibut

(ibtype:create exmh-xref ()
  "Given a specification of an mh folder and message, ask exmh to show the
message.  The format of the button is +folder[/subfolder]/msg+.  This
requires `rexmh', a simple little wish script that talks to exmh."
  (let ((label (hbut:label-p t "\+" "\+")))
    (and label
	 (string-match "\\([^/]+\\)/\\([0-9]+\\)" label)
	 (hact 'exec-window-cmd (format "rexmh show +%s %s"
					(substring label
						   (match-beginning 1)
						   (match-end 1))
					(substring label
						   (match-beginning 2)
						   (match-end 2))
					  )	
	       )
	 )
    )
  )

------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <17033.780669438.4@sco.com>

for the curious, exmh is a tcl/tk mail reader which is based on MH.  hyperbole 
is `an open, efficient, programmable information management and hypertext 
system', which is written in emacs lisp.

i'm using mh 6.8.3, exmh 1.5epsilon+, xemacs 19.11 and hyperbole 3.15.

any suggestions for improvements (or indeed news of anyone using a similar 
combination !) would be most welcome.

dave.
--
Dave Edmondson, The Santa Cruz Operation, davided@sco.com
  I think my career is ruined!


------- =_aaaaaaaaaa0--
