Return-Path: owner-exmh-users@sunlabs
Return-Path: <owner-exmh-users@sunlabs>
Received: from Eng.Sun.COM by sage.Eng.Sun.COM (SMI-8.6/SMI-SVR4)
	id EAA21260; Sat, 10 May 1997 04:19:34 -0700
Received: from sunlabs.Eng.Sun.COM by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id EAA22856; Sat, 10 May 1997 04:19:33 -0700
Received: by sunlabs.Eng.Sun.COM (SMI-8.6/SMI-SVR4)
	id EAA11108; Sat, 10 May 1997 04:16:31 -0700
Received: from Eng.Sun.COM by sunlabs.Eng.Sun.COM (SMI-8.6/SMI-SVR4)
	id EAA11103; Sat, 10 May 1997 04:16:29 -0700
Received: from saturn.Sun.COM by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id EAA22813; Sat, 10 May 1997 04:19:06 -0700
Received: from mail.zrz.TU-Berlin.DE (mail.zrz.TU-Berlin.DE [130.149.4.15]) by saturn.Sun.COM (SMI-8.6/mail.byaddr) with ESMTP id EAA27769 for <exmh-users@sunlabs.eng.sun.com>; Sat, 10 May 1997 04:19:29 -0700
Received: from DeepThought.zrz.TU-Berlin.DE (actually dial1-87.zrz.TU-Berlin.DE) 
          by mail.zrz.TU-Berlin.DE with SMTP (IC-PP);
          Sat, 10 May 1997 13:19:00 +0200
Received: from DeepThought.zrz.TU-Berlin.DE 
          by DeepThought.zrz.TU-Berlin.DE (8.8.5/ZRZ-Gen) id BAA06619;
          Sat, 10 May 1997 01:32:25 GMT
X-Mailer: exmh version 2.0gamma 1/27/96
To: exmh-users@sunlabs.Eng.Sun.COM
Subject: Re: Unanswered mail
In-reply-to: Your message of "Fri, 09 May 1997 14:59:16 EDT." <199705091859.OAA08974@bksmp2.FRB.GOV>
X-Face: .c1ONfqS%gF>{nYIi~O{Wu1&saRMa@xOrMlZM?V&M5?BKPM*{HA`<6eQ=qfv1`~c)DRS+&e 
        y$np#>1;1+:jn>z_9q}'p|gy(/<^K[M^*vpm"_QG;memRP'-Ut7+M0^Z&b)tqCz#k^4h^M^}LllczU 
        gs,dH2,Fo#uYP[Gph3hZ-Fn=*5)kfDC_#aJ~d-L.SdB8Yy-)Esfa*7i)7H@n4.3
X-URL: http://satchmo.physik.TU-Berlin.DE/~henrik/
Reply-to: henrik@satchmo.physik.tu-berlin.de
MIME-Version: 1.0
Content-ID: <6596.863227837.0@DeepThought.zrz.TU-Berlin.DE>
Date: Sat, 10 May 1997 03:30:37 +0200
Message-ID: <6599.863227837@DeepThought.zrz.TU-Berlin.DE>
From: Henrik Seidel <henrik@DeepThought.zrz.TU-Berlin.DE>
Sender: owner-exmh-users@sunlabs.sun.com
Precedence: bulk
Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
Content-Length: 5356

------- =_aaaaaaaaaa0
Content-type: text/plain; charset="us-ascii"
Content-ID: <6596.863227837.1@DeepThought.zrz.TU-Berlin.DE>

Hi,

Well, I wrote "priority.tcl" based on Tom Allard's "anno.tcl". Put it 
into your tcl code directory (e.g., ~/.tk/exmh), re-index that 
directory (run auto_mkindex from the tclsh prompt), and add the 
resources on top of priority.tcl to your ~/.exmh-defaults.

What you will get is a submenu in "More...". That submenu is labelled 
"Set Priority" and does what it promises (the items of that submenu are 
"Priority 0" to "Priority 9"). A field "X-Priority: #" will be added on 
top of the selected messages (or of the current message if none is 
selected). Multiple invocations of "Set Priority" give multiple 
"X-Priority:" components. That way you can keep track of the history of 
your priorities. The scan command (with the attached format file) uses 
the first "X-Priority" field. That is, is your last invocation of "Set 
Priority" takes precedence.

Consider the code an example. It should be easy to use characters or 
strings for the priority instead of numbers (if you prefer those). Make 
sure that you increase the field width in the scan format file if you 
want to use strings of more than one character.

After changing priority, you need to rescan the folder to make the 
change appear in the scan list.

You can easily Search...pick messages of a certain priority by using 
the "X-Priority" component.

To activate the scan format file, put it into your Mail directory and 
add the line

	scan: -form scan.form

to your ~/.mh_profile. You DEFINITELY have to adapt scan.form (when you 
go over it you will agree that you aren't Henrik Seidel and should 
change something; by the way, the name is in there since I send mail 
from several computers, that is "From" does not always come from the 
same email address, although my full name should be pretty constant. 
Therefore, I am scanning for my full name and display "To:" instead of 
"From:" whenever my full name occurs somewhere in the From: field. This 
works much better than the standard mymbox{from} test, since much of my 
outgoing mail does NOT come from mymbox.)

You may also want to add the following lines to your ~/.exmh-defaults:

	*Fops.more.m.c_thread:  busy Thread_DisplayAll 14 ==>
	*Fops.search.m.c_thread:  busy Thread_Display 14 ==>

Fiddle with the numbers to make the position of "==>" in threaded scans 
meet your taste.

Regards
						--- Henrik


------- =_aaaaaaaaaa0
Content-type: text/plain; charset="us-ascii"
Content-ID: <6596.863227837.2@DeepThought.zrz.TU-Berlin.DE>
Content-Description: ~/.tk/exmh/priority.tcl

# priority.tcl
#
# Interface to MH anno utility for setting the X-Priority component
#
# To add to your Mops "More..." menu, add to your .exmh-defaults:
#
# *Mops.more.m.uentrylist: prio
# *Mops.more.m.l_prio: Set Priority
# *Mops.more.m.t_prio: cascade
# *Mops.more.m.m_prio:  prio
# *Mops.ugm_current: {Set Priority}
# *Mops.ugm_range: {Set Priority}
# *Mops.more.m.prio.entrylist: p9 p8 p7 p6 p5 p4 p3 p2 p1 p0
# *Mops.more.m.prio.l_p9: Priority 9
# *Mops.more.m.prio.c_p9: Msg_Priority 9
# *Mops.more.m.prio.l_p8: Priority 8
# *Mops.more.m.prio.c_p8: Msg_Priority 8
# *Mops.more.m.prio.l_p7: Priority 7
# *Mops.more.m.prio.c_p7: Msg_Priority 7
# *Mops.more.m.prio.l_p6: Priority 6
# *Mops.more.m.prio.c_p6: Msg_Priority 6
# *Mops.more.m.prio.l_p5: Priority 5
# *Mops.more.m.prio.c_p5: Msg_Priority 5
# *Mops.more.m.prio.l_p4: Priority 4
# *Mops.more.m.prio.c_p4: Msg_Priority 4
# *Mops.more.m.prio.l_p3: Priority 3
# *Mops.more.m.prio.c_p3: Msg_Priority 3
# *Mops.more.m.prio.l_p2: Priority 2
# *Mops.more.m.prio.c_p2: Msg_Priority 2
# *Mops.more.m.prio.l_p1: Priority 1
# *Mops.more.m.prio.c_p1: Msg_Priority 1
# *Mops.more.m.prio.l_p0: Priority 0
# *Mops.more.m.prio.c_p0: Msg_Priority 0

proc Msg_Priority {{level 0}} {
    global prio exmh
    Exmh_Status ""
    set prio(msgs) {}
    Ftoc_Iterate line {
	set msgid [Ftoc_MsgNumber $line]
	lappend prio(msgs) $msgid
    }
    if [catch \
	{eval exec \
	  anno +$exmh(folder) $prio(msgs) -nodate -inplace \
	       -component \"X-Priority\" -text \"$level\"
	} txt] {
	Exmh_Status $txt red
     } else {
	Exmh_Status "X-Priority:=$level for message(s) $prio(msgs)"
	if {[llength $prio(msgs)] == 1} {
	    Msg_ShowCurrent
	}
     }
}

------- =_aaaaaaaaaa0
Content-type: text/plain; charset="us-ascii"
Content-ID: <6596.863227837.3@DeepThought.zrz.TU-Berlin.DE>
Content-Description: ~/Mail/scan.form

%; NOTE: This file is supplied for reference only; it shows the default
%;	format string (for non-UK sites) which was compiled into "scan".
%;	See the source file "h/scansbr.h" for details.
%5(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%01{x-priority} %02(mday{date})\.%02(mon{date})%<{date} %|*%>\
%(void(friendly{from}))%<(amatch Henrik Seidel)%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
%{subject}

------- =_aaaaaaaaaa0
Content-type: text/plain; charset="us-ascii"
Content-ID: <6596.863227837.4@DeepThought.zrz.TU-Berlin.DE>

-- 
Henrik Seidel, http://satchmo.physik.tu-berlin.de/~henrik/
TU Berlin, Inst. f. Theor. Physik, Sekr. PN 7-1, Hardenbergstr. 36
10623 Berlin, GERMANY, tel: +49-30-314-23000 fax: +49-30-314-21130
use "finger henrik@satchmo.physik.tu-berlin.de" to get my public pgp key



------- =_aaaaaaaaaa0--
