Note that this only applies to exmh releases prior to 2.6
As I move from folder to folder in Exmh, I often am asking myself, how many unread messages are left in this folder?
What I used to do would be to would look at the current message number and then how many messages are in the folder and then just do the subtraction in my head.
Then I discovered the Unseen Window which was a step up. The problem that I had then was to pick out, at a glance, which folder I was in to see how many unread messages are left.
Being lazy, I figured that there had to be a (slightly) better way to do this. This is what I came up with.
I modified unseenwin.tcl and added one line
UnseenWinSetSelection $index
at the end of the UnseenWinShow proc. Here's what my UnseenWinShow proc looks like now:
proc UnseenWinShow {index delete folder count} {
global unseenwin
if $delete {
.unseen.lb delete $index
}
set width $unseenwin(listwidth)
set digits $unseenwin(digits)
.unseen.lb insert $index [format "%${width}s %${digits}d" $folder $count]
if {$width > $unseenwin(curwidth)} {
.unseen.lb xview [expr $width - $unseenwin(curwidth)]
}
UnseenWinSetSelection $index
}I didn't like modifying the code (I'd rather add a fix/extension via ~/.tk/exmh so my change survives upgrades) but I didn't see any easy way around that.
(This is with exmh 2.4 05/15/2001.)
Hope that someone finds this useful.
- Bill Benedetto <bbenedetto@goodyear.com>