WalnutSortDoc.tioga
Copyright © 1986 by Xerox Corporation. All rights reserved.
Eric Nickell, April 3, 1986 2:26:27 pm PST
Dave Rumph, June 23, 1986 5:22:22 pm PDT
WalnutSort
CEDAR 6.1 — FOR INTERNAL XEROX USE ONLY
WalnutSort
Automatic Sorting of New Mail for Walnut
Eric Nickell, Dave Rumph
© Copyright 1985, 1986 Xerox Corporation. All rights reserved.
Abstract: WalnutSort is a facility which automatically selects message set buttons in the Walnut Control window, on the basis of the contents of the message.
Keywords: Walnut, Mail (for review by the Index Grue)
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. Overview
Intent
With a good set of WalnutSort definitions, the Walnut user will find that the proper message set buttons have been selected by the time she or he has scanned the incoming mail message, for most messages. As a result, mouse movement is normally limited to the MoveTo and Delete buttons in the Active Message window. While it seems that the second or so needed to select the buttons manually could hardly be considered insurmountable, the authors have found the convenience addicting.
Mechanics
WalnutSort maintains a Cypress database of triggers. A trigger is a pair of ROPE's, the keyword and the message set. The message set (obviously) is the name of the button in the Walnut control window. The keyword is that ROPE which, when found in any particular message, will cause the corresponding message button to be activated for that message. WalnutSort selects message set buttons only the first time a message is displayed.
Also associated with each keyword is a priority. A match found at a higher priority level will cause lower-priority keywords to be ignored. Thus, if the highest priority one uses is 20, and the only trigger at that level has keyword "WantAds^" and message set name is "Deleted", then WalnutSort will always select only the Deleted message set button when somebody is trying to unload their junk through ethermail.
2. Use of WalnutSort
Use
Once WalnutSort has been enabled (see below), everything is automatic. Whenever a message is opened for the first time, WalnutSort will select the message set buttons appropriate to the contents of the message. Normally, WalnutSort will have the buttons selected before you have scanned the message. Be forewarned, however, that the first operation after start-up or changing triggers can be slow (up to 15 seconds).
Commands
WalnutSort on|off
Enables/disables automatic button selection.
WSSetTrigger [-priority] keyword msgset
Creates a new trigger of the specified priority (default priority is 10).
WSDeleteTrigger keyword msgset
Removes the trigger.
WSListTriggers
Lists the current triggers.
WSDump filename
Saves the entire trigger database to the given filename.
WSLoad filename
Loads the entire trigger database from the given filename.
Profile Options
WalnutSort.SegmentFile: ROPE ← "[defaultServer.Alpine]<user.registry>WalnutSort.Segment"  --Specifies Alpine segment to use for trigger database.
Alpine.Server: ROPE ← "Luther" --Defines defaultServer
WalnutSort.DefaultSelections: LIST OF ROPENIL--Buttons to enable if no keyword matches the message text. NIL => don't change selections.
WalnutSort.SelectOnTOC: BOOLEANFALSE--If TRUE, search for keywords only in table of contents entry.
3. WSResort
The WSResort command will copy (or move) messages, based on the contents, from one or more existing message sets to a (possibly new) message set. Form:
WSResort [-mt] toMsgSet ← searchPattern(s) IN fromMsgSet(s)
The -m switch causes the message to be removed from the old message set. The -t switch causes the keyword search to be performed on the table of contents entry, rather than the whole message. searchPattern(s) may be either a list of ropes to search for separated by spaces or the single character '*, which indicates that all messages should be moved (or copied). fromMsgSet(s) is similar, but '* is not allowed.
4. Wish List
1. Nicer facilities for editing the specifications.
2. Searching for regular expressions.