3. User Interface
Walnut implements four viewer types: the Walnut control viewer, the message set display viewer, the message display viewer, and the message composition viewer. When Walnut is running there is one Walnut control viewer, and any number of instances of the other viewer types. The iconic form of the Walnut control viewer is a mailbox. Anything that can be done with Walnut can be done by starting from the control viewer (sometimes by creating other viewers).
Walnut's user interface attempts to be consistent with conventions used elsewhere in Cedar. Clicking LEFT on a button representing a Walnut entity (a message or a message set) "selects" the entity (makes it an implied parameter to other operations); clicking MIDDLE on such a button opens the entity (displays more information somehow). This is analogous to the behavior of icons in Cedar.
3.1 Message sets
The message sets in a Walnut database are represented by buttons in the Walnut control viewer. One can now control the order in which the message set buttons appear, by creating a tioga file that gets loaded into this viewer; every non-comment text string will be made into a button (with duplicate names being the same button as far as Walnut is concerned). If there are names that are not message sets in the database, their buttons appear with a line through them (and clicking on them will not open a message set). To make sure that one can access all one's message sets, the last node of this file is always replaced with a node containing all the message set names. Creating new message sets makes buttons appear in this last node only. When this viewer is in buttoning mode, one has access to one's message sets. To edit this viewer, select Edit msgSetButtons in the popup MsgSetOps menu. After editing, select Save msgSetButtons, and the changes will be saved. There is no Reset. To use this feature, one must have a file named Walnut.MsgSetButtonsFile in the same place as one's walnut root file. If this file does not exist, a local file is used, and only the names of message sets in the old style will appear. See section 3.1.1 for details on getting started (which is tricky).
In the last node, the Active and Deleted message set buttons always appear first; other message set buttons appear in alphabetical order.
Operations on message sets are performed by using menu items on the second line of the Walnut control window; the MsgSetOps menu item in the first menu line will open a popup menu with several selections. Many of the operations in the popup menu use the selected messages sets as implied arguments. Note that for the printing operations, Walnut will load any files necessary.
Database Info gives log length, number of deleted messages, total messages and number of message sets
Size of MsgSet(s) gives number of messages in the selected message sets
Create MsgSet uses the selection to create a new message set (containing no messages). A message set button with this name will appear at the end of the buttons and be selected
Delete MsgSet(s) deletes the selected message sets; requests confirmation if any message set to be deleted contains messages
Make MsgSet(s) Empty removes all the messages from the selected message sets; requests confirmation.
R.O.T. MsgSet (short for RemoveOverThere) takes the primary selection as the root message set. If this message set exists, it removes messages in this root message set from any of the selected (in the Walnut control window sense) message sets. If no message sets are selected, the R.O.T. is performed across the entire database, i.e. upon completion, the messages in the root message set will appear in no other message sets.
Save msgSetButtons or Edit msgSetButtons depends on the state of the message set buttons.
Append Msg to MsgSet(s) takes the selection contents (or the selected viewer if the length of the selection is less than 2), makes a unique gvID for it if necessary and adds it to the selected message sets.
PressPrint prints all the messages in the selected message sets.
Interpress2.0Print prints all the messages in the selected message sets using Interpress2.0.
Interpress3.0Print prints all the messages in the selected message sets using Interpress3.0.
Write MsgSet(s) To File writes the messages in the selected message sets to the tioga file whose name is either the selection or derived from the name of the first message set that was selected.
Write MsgSet TOCs To File writes the TOCs for the messages in the selected message sets to the file whose name is either the selection or derived from the name of the first message set that was selected.
Archive MsgSet(s) provides a way to copy a set of messages into a file that can later be read by another mail system that uses the "PARC standard mail format" (Hardy and Laurel do). Select a filename in some window and click Archive. All messages in the currently selected message sets are copied to the named file (if the file name has no extension, ".ArchiveLog" is appended to the name).
Append MsgSet(s) same as Archive but appends the messages to the given file.
ArchiveAndEmpty archives the messages in the selected message sets and then empties the message sets.
AppendAndEmpty appends the messages in the selected message sets to an existing archive file and then empties the message sets.
ArchiveAndDelete archives the messages in the selected message sets and then deletes the message sets.
AppendAndDelete appends the messages in the selected message sets to an existing archive file and then deletes the message sets.
DisplayMsgFromName takes the current selection as the internal id of a msg and displays the msg, if it exists.
OldMailReaderOptions creates a sub viewer in the control window, with file and msgSet fields to fill in. Clicking DoIt performs the operation. Close destroys the sub viewer. This option allows one to read a Laurel, Hardy or Lafite mail file, or a file created by Walnut's Archive operation. If you do not specify a msgSet name, the messages will be put in Active. If the specified message set does not exist, it will be created. Using the old mail reader to read a Walnut archive log will put the messages back into the message sets from which they were archived.
Printing Options creates a sub viewer in the control window, to allow multiple copies or the chance to use a server other than the default. Fill in either of these fields before clicking
Options, which gives another popup menu with the choices:
Msg print the message in the selected viewer (if it is in the database managed by this control window).
SelectedMsgInMsgSet(s) print the selected message (if any) in each of the msgSets selected in the control window.
MsgSet(s) print the selected msgSets
MsgSetTOC(s) print the TableOfContents for the selected msgSets
Close destroy the Printing Options sub viewer.
All but the
Close option produce yet another popup menu, letting you select which variant of print you want:
PressPrint
Interpress2.0Print
Interpress3.0Print
NOTE: it is up to the user to known what variant to send to which printer.
Finally, the Expunge button destroys all of the messages in the Deleted message set and reclaims the storage (in the database and log) used for these messages (it "expunges" the Deleted messages). You should expunge when the Deleted message set contains a few hundred messages; when Deleted begins to fill up to the point that it takes several seconds to display, it's time to expunge. Expunging is fairly slow.
Change in Cedar10.1: Expunge will expunge the LoganBerry database only, not the log. To expunge the log use the DoWalnutCopact commander command.
To create a message set display viewer, click MIDDLE on the corresponding message set button of the control viewer. The iconic form of a message set displayer is a stack of envelopes.
The message set displayer contains a one-line button for each message in the set. Each message button looks much like a line in the top window of Laurel: it shows the date of the message, the name of the sender (or To: field if the sender is the current user), and the message subject. At most one of the message buttons in a set is selected (the default is to display it in a small, bold font). To select a message, click LEFT on it; to select and display a message, click MIDDLE on it. To delete a message from the message set, click CTRL-LEFT on it; its button will disappear. (Note that if this message belonged to no other message set, it is added to the Deleted set, and hence is still accessible.)
A message set displayer also contains several command buttons that operate on the selected message:
MoveTo adds the message from the message set to all of the message sets selected in the control window and deletes it from the message set.
Display displays the selected message.
Delete deletes the message from the message set; if it thus becomes a member of no other message sets, then it is added to the Deleted message set.
AddTo adds the messages to the selected sets.
Places is a subset of the Tioga places menu.
Levels is the Tioga levels menu.
MsgOps provides some less frequently used operations (see below).
The Active message set includes a NewMail button that reads new mail and adds the new messages to the Active message set.
The
MsgOps (popup) menu provides the following choices:
Sender builds a Sender window
Size of MsgSet reports the number of messages in this message set
Categories lists (in the Walnut control window) the message sets in which the selected message appears (a message can simultaneously be in several message sets).
size Of Msg reports the number of bytes in the selected msg and indicates if it has Tioga formating or not
gvID of Msg prints the database name for the message in the control window.
Append Msg takes the selection contents (or the selected viewer if the length of the selection is less than 2), makes a unique gvID for it and adds it to the message set as a message.
PressPrintMsgSet prints all the messages in the message set (see WalnutDefault.profile for options).
Interpress2.0PrintMsgSet prints all the messages in the message set, using Interpress2.0 (see WalnutDefault.profile for options).
Interpress3.0PrintMsgSet prints all the messages in the message set, using Interpress3.0 (see WalnutDefault.profile for options).
PressPrintSelectedMsg prints the one selected message (see WalnutDefault.profile for options).
Interpress2.0PrintSelectedMsg prints the one selected message, using Interpress2.0 (see WalnutDefault.profile for options).
Interpress3.0PrintSelectedMsg prints the one selected message, using Interpress3.0 (see WalnutDefault.profile for options).
PressPrintTOC prints the TableOfContents of the message set (see WalnutDefault.profile for options).
Interpress2.0PrintSelectedMsg prints the TableOfContents of the message set using Interpress2.0 (see WalnutDefault.profile for options).
Interpress3.0PrintSelectedMsg prints the TableOfContents of the message set using Interpress3.0 (see WalnutDefault.profile for options).
R.O.T. MsgSet (for RemoveOverThere) removes messages in this msgSet from any of the selected (in the Walnut control window sense) message sets. If no message sets are selected, the R.O.T. is performed across the entire database, i.e. upon completion, the messages in this message set will appear in no other message sets.
For the MoveTo, Delete, and AddTo buttons, LEFT-clicking simply performs the operation described above, while RIGHT- or MIDDLE- clicking performs the operation and displays the next message in the set. (Note that if you have readonly access to a public database, then the MoveTo, Delete and AddTo buttons will not appear in message set displayers.)
3.2 Messages
As described above, a message can be displayed by clicking MIDDLE on a message button of a message set displayer. This creates a message display viewer, whose iconic form is an envelope (clicking SHIFT-MIDDLE on a message button causes the created viewer to fill the entire column). The message within such a viewer is not editable. This viewer is associated with the message set that created it, so clicking MIDDLE on another message of the same message set shows this new message in the same message displayer. This is designed to avoid a proliferation of message displayers. Of course, there are times when you really want to create viewers on several different messages in one set. Clicking a message displayer's Freeze button (which then disappears) permanently binds the message to the message displayer. If all message displayers for a given message set are frozen, then MIDDLE clicking in the message set creates a new displayer. A frozen message displayer cannot be unfrozen, but can be destroyed (it will be destroyed when the control window is destroyed).
Answer creates a Walnut Send viewer initialized with a proper heading for an answer.
Forward creates a Walnut Send viewer initialized either with a copy of the message for forwarding.
ReSend creates a Walnut Send viewer initialized with a copy of the message, with the Date: field changed to Original-Date:, any Sender: field changed to Original-Sender: and any From: field changed to Originally-From:.
MsgOps gives a popup menu, with the following selections:
Sender creates a Sender viewer.
Categories lists (in the Walnut control window) the message sets in which the selected message appears (a message can simultaneously be in several message sets).
AddTo adds this message to the message sets selected in the control window
Remove From ... shows in a popup menu which message sets this message belongs to; selecting one of these removes the message from that message set.
SizeOf types the byte count for text only in the control window
gvID types the gvID of the message in the control window.
PressPrint print the message using Press.
Interpress2.0Print print the message using Interpress2.0
Interpress3.0Print print the message using Interpress3.0
MakeEditable allows one to play with fonts in teh displayed version of the message; makes no changes in the stored version of the message
Split, Places and Levels buttons are from Tioga.
3.3 Sending mail
To create a Walnut Sender, left-click Sender in the Walnut control viewer, or use the Answer or the Forward button on a message viewer: one can also get a Sender by typing WalnutSend to a command tool, or selecting the Sender option in the MsgOps menu of a MsgSet displayer or of a Msg displayer. A Walnut Sender is a Tioga viewer for typing in the header fields and body of a message you want to send.
WalnutSend will save copies of the messages you have sent. The profile option:
WalnutSend.OutBoxLength: number (defaults to 1)
specifies how many to save. Setting this option to 0 (or some negative number) will save all the messages that have been sent, but the the popup menu will show you no more than 25. The others would be available for postmortems. See Forms below.
The Sender menu:
Send is well named. StopSending! pops up during part of the sending process; clicking it gives you a last-minute chance to change your mind about sending a message. Right-clicking Send makes the Walnut Sender become iconic after syntax checking. (In iconic form a Walnut Sender is the back of an envelope.) A Walnut Sender will not allow itself to be destroyed while sending is in progress.
SendChecked will warn you if the message to be sent contains comment nodes; if it does, you have the option of sending anyway or quitting.
Get is similar Tioga Get -- Will load a local or remote file and allow editing
Store is like Tioga Store. If you right-click, the viewer will be left in edited mode, so that it won't get re-used.
Save is like Tioga Save. If you right-click, the viewer will be left in edited mode, so that it won't get re-used.
Forms shows the
Forms popup menu, which provides three options plus forms supplied by the user.
NewSender creates another Sender.
DefaultForm replaces the current Sender with the default. (You can specify a non-standard default in your User.profile.)
Previous Msg if your outBox has only one message, that will get stuffed into the Sender; otherwise you'll be given a popup menu of selections.
You specify your own forms (see below).
Get and Store change the name of the Sender to be the file name. Clicking the Forms items will cause any backing file association for the Sender to be cleared and the caption will revert to Walnut Sender.
Split is the Tioga Split.
Places is the Tioga Places.
Levels is the Tioga Levels.
The default Sender form has node structure and uses a small bold font (looks) for the header fields. Added header fields use the same looks; to get added fields to have some other looks, include in your User.profile the key WalnutSend.MsgHeadersLooks, set to whatever you like.
If you want to change the default forms, you can create your own and specify them in your User.profile with the entries:
WalnutSend.DefaultForm: filename
WalnutSend.AnswerForm: filename
WalnutSend.ForwardForm: filename
The answer form must have header lines in the same order as the standard form and provide placeholders in the appropriate header positions. The forward form must have a node with the contents "ForwardedMessage"; Forward replaces this node with the message being forwarded. These private defaults can be local or remote.
If you need additional sending forms, you can specify them in your User.profile with the entry:
WalnutSend.MsgForms: {list of file names}
These additional forms will then appear in the pop-up Forms menu. Like private defaults, these additional forms can be local or remote. (You might, for instance, want to specify remote forms from /Cedar/CedarChest®/Top/Forms.df.) Only the short name pops up; the default extension is .form, and only non-default extensions pop up. At the moment, there is no way to create additional answer or forward forms.
A message to a public distribution list or to more than ten individuals probably needs a Reply-to: field. If your message doesn't contain one, Send will show a menu with the items
Self,
All, and
Cancel. Self means insert the Reply-to:
field and fill in my name
; All means do not insert a
Reply-to: field (replies then go to the full list)
; Cancel means whoops, don't send the message yet. To get Reply-to: sender when appropriate, without being asked, insert the entry
WalnutSend.ReplyToSelf: TRUE
in your User.profile. (With this entry, if at some point you want Reply-to: all you have to insert it by hand.)
WalnutSend will use a (local or remote) file as a private distribution list. To invoke this feature, put the file name, followed immediately by ":;" (colon semicolon) in the To: or Cc: field. The file format is quite restricted; anything up to a colon is ignored; the addressees must be separated by commas, and parsing terminates at the first semicolon or end of file; no CR's are allowed. A default extension of .dl is assumed.
Watch the Walnut control window for errors in transmission. If the transmission is successful, the message is saved and a new default form appears.
WalnutSend will also run standalone, in which case it creates a small typescript viewer for reporting progress, errors, etc.