NAME
xmh − read and send mail with an X window interface to mh.
SYNTAX
xmh [-path mailpath] [-initial foldername] [-flag] [-toolkitoption]
DESCRIPTION
xmh provides a graphical user interface to the mh message handling system. To actually do things with your mail, xmh makes calls to the mh package. Electronic mail messages may be composed, sent, received, replied to, forwarded, sorted, and stored in folders. Note that the mh package is not distributed with the DeltaWINDOWS release; it is available in the public domain.
Please don’t be misled by the size of this document. It introduces many aspects of the Athena widget set and provides extensive mechanism for customization of the user interface. xmh really is easy to use.
For further information, see the Nutshell Handbook MH & xmh: E-mail for Users & Programmers, by Jerry Peek, also published by O’Reilly and Associates, Inc.
OPTIONS
xmh accepts all of the standard X Toolkit command-line options, which are listed on the X reference page. In addition, xmh accepts the following application-specific options:
-path mailpath
To specify an alternate collection of mail folders in which to process mail, use -path followed by the absolute pathname of the alternate mail directory. The default mail path is $HOME/Mail; another mail path can be specified using the Path component in $HOME/.mh_profile.
-initial foldername
Specifies an alternate folder that may receive new mail and is initially opened by xmh. The default initial folder is "inbox".
-flagCauses xmh to change the appearance of the appropriate folder buttons and to request the window manager to change the appearance of the xmh icon when new mail arrives. By default, xmh changes the appearance of the "inbox" folder button when new mail is waiting. You can use the application-specific resource checkNewMail to turn off this notification and the -flag option will still override it.
These three options have corresponding application-specific resources, named MailPath, InitialFolder, and MailWaitingFlag, which can be used in a resource file.
INSTALLATION
xmh requires that the user is already set up to use mh, version 6. First, see if there is a file called .mh_profile in your home directory. If it exists, check to see if it contains a line that starts with Current-Folder. If it does, you’ve been using version 4 or earlier of mh; to convert to version 6, you must remove that line. (Failure to do so causes spurious output to standard error, which, depending on your setup, can hang xmh.)
If you do not already have an .mh_profile, you can create one (and everything else you need) by typing inc to the shell. You should do this before using xmh to incorporate new mail.
For more information, refer to the mh(1) documentation and the Nutshell Handbook MH & xmh.
Much of the user interface of xmh is configured in the Xmh application defaults file; if this file was not installed properly a warning message will appear when xmh is used. The Release 5 version of xmh is backwards compatible with the R4 application defaults file.
The default value of the SendBreakWidth resource has changed since R4.
BASIC SCREEN LAYOUT
xmh starts out with a single window, divided into four main areas:
•Six buttons with pull-down command menus.
•A collection of buttons, one for each top level folder. New users of mh will have two folders, "drafts" and "inbox".
•A listing, or Table of Contents, of the messages in the open folder. Initially, this will show the messages in "inbox".
•A view of one of your messages. Initially this is blank.
XMH AND THE ATHENA WIDGET SET
xmh uses the X Toolkit Intrinsics and the Athena widget set. Many of the features described below (scrollbars, buttonboxes, etc.) are actually part of the Athena widget set and are described here only for completeness. For more information, see Appendix G, Athena Widget Resources.
Scrollbars
Some parts of the main window will have a vertical area on the left containing a gray bar. This area is a scrollbar. Scrollbars are used whenever the data in a window takes up more space than can be displayed. The gray bar indicates what portion of your data is visible. If the entire length of the area is gray, then you are looking at all your data. If only the first half is gray, then you are looking at the top half of your data. The message viewing area will have a horizontal scrollbar if the text of the message is wider than the viewing area.
You can use the pointer in the scrollbar to change what part of the data is visible. If you click the second pointer button, then the top of the gray area will move to where the pointer is, and the corresponding portion of data will be displayed. If you hold down the second pointer button, you can drag around the gray area. This makes it easy to get to the top of the data: just press with the second button, drag off the top of the scrollbar, and release.
If you click with the first pointer button, then the data to the right of the pointer will scroll to the top of the window. If you click with the third pointer button, then the data at the top of the window will scroll down to where the pointer is.
Buttonboxes, Buttons, and Menus
Any area containing many words or short phrases, each enclosed in a rectangular or rounded boundary, is called a buttonbox. Each rectangle or rounded area is actually a button that you can press by moving the pointer onto it and pressing pointer button 1. If a given buttonbox has more buttons in it than can fit, it will be displayed with a scrollbar, so you can always scroll to the button you want.
Some buttons have pull-down menus. Pressing the pointer button while the pointer is over one of these buttons will pull down a menu. Continuing to hold the button down while moving the pointer over the menu, called dragging the pointer, will highlight each selectable item on the menu as the pointer passes over it. To select an item in the menu, release the pointer button while the item is highlighted.
Adjusting the Relative Sizes of Areas
If you’re not satisfied with the sizes of the various areas of the main window, they can easily be changed. Near the right edge of the border between each region is a black box, called a grip. Simply point to that grip with the pointer, press a pointer button, drag up or down, and release. Exactly what happens depends on which pointer button you press:
If you drag with pointer button 2, then only that border will move. This mode is simplest to understand, but is the least useful.
If you drag with pointer button 1, then you are adjusting the size of the window above. xmh will attempt to compensate by adjusting some window below it.
If you drag with pointer button 3, then you are adjusting the size of the window below. xmh will attempt to compensate by adjusting some window above it.
All windows have a minimum and maximum size; you will never be allowed to move a border past the point where it would make a window have an invalid size.
PROCESSING YOUR MAIL
This section will define the concepts of the selected folder, current folder, selected message(s), current message, selected sequence, and current sequence. Each xmh command is introduced.
For use in customization, action procedures corresponding to each command are given; these action procedures can be used to customize the user interface, particularly the keyboard accelerators and the functionality of the buttons in the optional buttonbox created by the application resource CommandButtonCount.
Folders and Sequences
A folder contains a collection of mail messages, or is empty. xmh supports folders with one level of subfolders.
The selected folder is whichever folder name appears in the bar above the folder buttons. Note that this is not necessarily the same folder that is being viewed. To change the selected folder, just press on the desired folder button; if that folder has subfolders, select a folder from the pull-down menu.
The Table of Contents, or toc, lists the messages in the viewed folder. The titlebar above the Table of Contents displays the name of the viewed folder.
The toc titlebar also displays the name of the viewed sequence of messages within the viewed folder. Every folder has an "all" sequence, which contains all the messages in the folder, and initially the toc titlebar will show "inbox:all".
Folder Commands
The Folder command menu contains commands of a global nature:
Open Folder
Displays the data in the selected folder. Thus, the selected folder also becomes the viewed folder. The action procedure corresponding to this command is XmhOpenFolder([foldername]). It takes an optional argument as the name of a folder to select and open; if no folder is specified, the selected folder is opened. It may be specified as part of an event translation from a folder menu button or from a folder menu, or as a binding of a keyboard accelerator to any widget other than the folder menu buttons or the folder menus.
Open Folder in New Window
Displays the selected folder in an additional main window. Note, however, that you may not reliably display the same folder in more than one window at a time, although xmh will not prevent you from trying. The corresponding action is XmhOpenFolderInNewWindow().
Create Folder
Creates a new folder. You will be prompted for a name for the new folder; to enter the name, move the pointer to the blank box provided and type. Subfolders are created by specifying the parent folder, a slash, and the subfolder name. For example, to create a folder named "xmh" which is a subfolder of an existing folder named "clients", type "clients/xmh". Click on the Okay button when finished, or just press Return; click on Cancel to cancel this operation. The action corresponding to Create Folder is XmhCreateFolder().
Delete Folder
Destroys the selected folder. You will be asked to confirm this action (see "Confirmation Windows"). Destroying a folder will also destroy any subfolders of that folder. The corresponding action is XmhDeleteFolder().
Close Window
Exits xmh, after first confirming that you won’t lose any changes; or, if selected from any additional xmh window, simply closes that window. The corresponding action is XmhClose().
Highlighted Messages, Selected Messages and the Current Message
It is possible to highlight a set of adjacent messages in the area of the Table of Contents. To highlight a message, click on it with pointer button 1. To highlight a range of messages, click on the first one with pointer button 1 and on the last one with pointer button 3; or press pointer button 1, drag, and release. To extend a range of selected messages, use pointer button 3. To highlight all messages in the table of contents, click rapidly three times with pointer button 1. To cancel any selection in the table of contents, click rapidly twice.
The selected messages are the same as the highlighted messages, if any. If no messages are highlighted, then the selected messages are considered the same as the current message.
The current message is indicated by a "+" next to the message number. It usually corresponds to the message currently being viewed. When a message is viewed, the titlebar above the view will identify the message.
Table of Contents Commands
The Table of Contents command menu contains commands that operate on the open, or viewed, folder.
Incorporate New Mail
Adds any new mail received to viewed folder and sets the current message to be the first new message. This command is selectable in the menu and will execute only if the viewed folder is allowed to receive new mail. By default, only "inbox" is allowed to receive new mail. The corresponding action is XmhIncorporateNewMail().
Commit Changes
Executes all deletions, moves, and copies that have been marked in this folder. The corresponding action is XmhCommitChanges().
Pack Folder
Renumbers the messages in this folder so they start with 1 and increment by 1. The corresponding action is XmhPackFolder().
Sort Folder
Sorts the messages in this folder in chronological order. (As a side effect, this may also pack the folder.) The corresponding action is XmhSortFolder().
Rescan Folder
Rebuilds the list of messages. This can be used whenever you suspect that xmh’s idea of what messages you have is wrong. (In particular, this is necessary if you change things using straight mh commands without using xmh.) The corresponding action is XmhForceRescan().
Message Commands
The Message command menu contains commands that operate on the selected message(s), or if there are no selected messages, the current message.
Compose Message
Composes a new message. A new window will be brought up for composition; a description of it is given in the "Composition Windows" section below. This command does not affect the current message. The corresponding action is XmhComposeMessage().
View Next Message
Views the first selected message. If no messages are highlighted, views the current message. If the current message is already being viewed, views the first unmarked message after the current message. The corresponding action is XmhViewNextMessage().
View Previous
Views the last selected message. If no messages are highlighted, views the current message. If current message is already being viewed, views the first unmarked message before the current message. The corresponding action is XmhViewPrevious().
DeleteMarks the selected messages for deletion. If no messages are highlighted, this command marks the current message for deletion and automatically displays the next unmarked message. The corresponding action is XmhMarkDeleted().
MoveMarks the selected messages to be moved into the currently selected folder. (If the selected folder is the same as the viewed folder, this command will just beep.) If no messages are highlighted, this command marks the current message to be moved and displays the next unmarked message. The corresponding action is XmhMarkMove().
Copy as Link
Marks the selected messages to be copied into the selected folder. (If the selected folder is the same as the viewed folder, this command will just beep.) If no messages are highlighted, marks the current message to be copied. Note that messages are actually linked, not copied; editing a message copied by xmh will affect all copies of the message. The corresponding action is XmhMarkCopy().
Unmark
Removes any of the above three marks from the selected messages, or the current message, if none is highlighted. The corresponding action is XmhUnmark().
View in New
Creates a new window containing only a view of the first selected message, or the current message, if none is highlighted. The corresponding action is XmhViewInNewWindow().
ReplyCreates a composition window in reply to the first selected message, or the current message, if none is highlighted. The corresponding action is XmhReply().
Forward
Creates a composition window whose body is initialized to contain an encapsulation of the selected messages, or the current message if none is highlighted. The corresponding action is XmhForward().
Use as Composition
Creates a composition window whose body is initialized to be the contents of the first selected message, or the current message if none is selected. Any changes you make in the composition will be saved in a new message in the "drafts" folder, and will not change the original message. However, there is an exception to this rule. If the message to be used as composition was selected from the "drafts" folder (see "Bugs"), the changes will be reflected in the original message (see "Composition Windows"). The corresponding action is XmhUseAsComposition().
PrintPrints the selected messages, or the current message if none is selected. xmh normally prints by invoking the enscript(1) command, but this can be customized with the xmh resource PrintCommand. The corresponding action is XmhPrint().
Sequence Commands
The Sequence command menu contains commands pertaining to message sequences (See "Message Sequences"), and a list of the message sequences defined for the currently viewed folder. The selected message sequence is indicated by a check mark in its entry in the margin of the menu. To change the selected message sequence, select a new message sequence from the sequence menu.
Pick Messages
Defines a new message sequence. The corresponding action is XmhPickMessages().
The following menu entries will be sensitive only if the current folder has any message sequences other than the "all" message sequence.
Open Sequence
Changes the viewed sequence to be the same as the selected sequence. The corresponding action is XmhOpenSequence().
Add to Sequence
Adds the selected messages to the selected sequence. The corresponding action is XmhAddToSequence().
Remove from Sequence
Removes the selected messages from the selected sequence. The corresponding action is XmhRemoveFromSequence().
Delete Sequence
Removes the selected sequence entirely. The messages themselves are not affected; they are simply no longer grouped together to define a message sequence. The corresponding action is XmhDeleteSequence().
View Commands
Commands in the View menu and in the buttonboxes of view windows (which result from the Message command View in New) correspond in functionality to commands of the same name in the Message menu, but they operate on the viewed message rather than the selected messages or current message.
Close Window
When the viewed message is in a separate view window, this command will close the view, after confirming the status of any unsaved edits. The corresponding action procedure is XmhCloseView().
ReplyCreates a composition window in reply to the viewed message. The related action procedure is XmhViewReply().
Forward
Creates a composition window whose body is initialized to contain the contents of the viewed message. The corresponding action is XmhViewForward().
Use As Composition
Creates a composition window whose body is initialized to be the contents of the viewed message. Any changes made in the composition window will be saved in a new message in the "drafts" folder and will not change the original message. An exception: if the viewed message was selected from the "drafts" folder (see "Bugs"), the original message is edited. The action procedure corresponding to this command is XmhViewUseAsComposition().
Edit Message
Enables the direct editing of the viewed message. The action procedure is XmhEditView().
Save Message
This command is insensitive until the message has been edited; when activated, edits will be saved to the original message in the view. The corresponding action is XmhSaveView().
PrintPrints the viewed message. xmh prints by invoking the enscript(1) command, but this can be customized with the application-specific resource PrintCommand. The corresponding action procedure is XmhPrintView().
DeleteMarks the viewed message for deletion. The corresponding action is XmhViewMarkDelete(). (Available as of Release 5.)
OPTIONS MENU
The Options menu contains one entry.
Read in Reverse
When selected, a check mark appears in the margin of this menu entry. Read in Reverse will switch the meaning of the next and previous messages and will increment to the current message marker in the opposite direction. This is useful if you want to read your messages in the order of most recent first. The option acts as a toggle; select it from the menu a second time to undo the effect. The check mark appears when the option is selected.
COMPOSITION WINDOWS
Composition windows are created by selecting Compose Message from the Message menu, or by selecting Reply, Forward, or Use as Composition from either the Message or View menu. Aside from the normal text editing functions, there are six command buttons associated with composition windows:
Close Window
Closes this composition window. If changes have been made since the most recent Save or Send, you will be asked to confirm losing them. The corresponding action is XmhCloseView().
SendSends this composition. The corresponding action is XmhSend().
New Headers
Replaces the current composition with an empty message. If changes have been made since the most recent Send or Save, you will be asked to confirm losing them. The corresponding action is XmhResetCompose().
Compose Message
Brings up another new composition window. The corresponding action is XmhComposeMessage().
Save Message
Saves this composition in your drafts folder. Then you can safely close the composition. At some future date, you can continue working on the composition by opening the drafts folder, selecting the message, and using the Use as Composition command. The corresponding action is XmhSave().
InsertInserts a related message into the composition. If the composition window was created with a Reply command, the related message is the message being replied to; otherwise, no related message is defined and this button is insensitive. The message may be filtered before being inserted; see ReplyInsertFilter under "Application-specific Resources" for more information. The corresponding action is XmhInsert().
ACCELERATORS
Accelerators are shortcuts. They allow you to invoke commands without using the menus, either from the keyboard or by using the pointer.
xmh defines pointer accelerators for common actions: to select and view a message with a single click, use pointer button 2 on the message’s entry in the table of contents; to select and open a folder or a sequence in a single action, make the folder or sequence selection with pointer button 2.
To mark the highlighted messages to be moved to a folder in a single action, or current message if none has been highlighted, use pointer button 3 to select the target folder and simultaneously mark the messages. Similarly, selecting a sequence with pointer button 3 will add the highlighted or current message(s) to that sequence. In both of these operations, the selected folder or sequence and the viewed folder or sequence are not changed.
xmh defines the following keyboard accelerators over the surface of the main window, except in the view area while editing a message:
Meta-IIncorporate new mail.
Meta-CCommit changes.
Meta-RRescan folder.
Meta-PPack folder.
Meta-SSort folder.
Meta-space
View next message.
Meta-cMark copy.
Meta-dMark deleted.
Meta-fForward the selected or current message.
Meta-mMark move.
Meta-nView next message.
Meta-pView previous message.
Meta-rReply to the selected or current message.
Meta-uUnmark.
Control-VScroll the table of contents forward.
Meta-VScroll the table of contents backward.
Control-vScroll the view forward.
Meta-vScroll the view backward.
TEXT EDITING COMMANDS
All of the text editing commands are actually defined by the Text widget in the Athena widget set. The commands may be bound to different keys than the defaults described below through the X Toolkit Intrinsics key re-binding mechanisms. See Chapter 11, Setting Resources, and Appendix G, Athena Widget Resources, for more details.
Whenever you are asked to enter any text, you will be using a standard text editing interface. Various control and meta keystroke combinations are bound to a somewhat Emacs-like set of commands. In addition, the pointer buttons may be used to select a portion of text or to move the insertion point in the text. Pressing pointer button 1 causes the insertion point to move to the pointer. Double-clicking button 1 selects a word, triple-clicking selects a line, quadruple-clicking selects a paragraph, and quintuple-clicking selects everything. Any selection may be extended in either direction by using pointer button 3.
In the following, a line refers to one displayed row of characters in the window, while a paragraph refers to the text between carriage returns. Text within a paragraph is broken into lines for display based on the current width of the window. When a message is sent, text is broken into lines based upon the values of the SendBreakWidth and SendWidth application-specific resources.
The following keystroke combinations are defined:
Control-aMove to the beginning of the current line.
Control-bMove backward one character.
Control-dDelete the next character.
Control-eMove to the end of the current line.
Control-fMove forward one character.
Control-h, or
Delete the previous character.
Backspace
Control-jNew line and indent.
Control-kKill the rest of the current line. (Does not kill the carriage return at the end of the line. To do so, use Control-k twice. However, be aware that the second kill overwrites the text line in the kill buffer.)
Control-lRefresh the window.
Control-m,New line.
Return, or
Linefeed
Control-nMove down to the next line.
Control-oDivide this line into two lines at this point and move the cursor back up.
Control-pMove up to the previous line.
Control-rSearch and replace backward.
Control-sSearch and replace forward.
Control-tTranspose characters. (Swap the characters immediately before and after the cursor.)
Control-uPerform next command four times. For example, the sequence Control-u, Control-n moves the cursor down four lines.
Control-vMove down to the next screenful of text.
Control-wKill the selected text.
Control-yInsert the last killed text. (If the last killed text is a carriage return—see Control-k above—a blank line is inserted.)
Control-zScroll the text up one line.
Meta-bMove backward one word.
Meta-dDelete the next word.
Meta-DKill the next word.
Meta-fMove forward one word.
Meta-h,Delete the previous word.
Meta-Backspace, or
Meta-Delete
Meta-H,Kill the previous word.
Meta-Shift-Backspace, or
Meta-Shift-Delete
Meta-iInsert a file. A dialog box will appear in which you can type the desired filename.
Meta-kKill to end of paragraph.
Meta-qJoin lines to form a paragraph.
Meta-vMove up to the previous screenful of text.
Meta-yInsert the last selected text here. Note that this can be text selected in some other text subwindow. Also, if you select some text in an xterm window, it may be inserted in an xmh window with this command. Pressing pointer button 2 is equivalent to this command.
Meta-zScroll one line down.
Meta-<Move to the beginning of the file.
Meta->Move to the end of the file.
Meta-]Move forward one paragraph.
Meta-[Move backward one paragraph.
In addition, the pointer may be used to copy and paste text:
Button 1 Down
Start selection.
Button 1 Motion
Adjust selection.
Button 1 Up
End selection (copy).
Button 2 Down
Insert current selection (paste).
Button 3 Down
Extend current selection.
Button 3 Motion
Adjust selection.
Button 3 Up
End selection (copy).
CONFIRMATION DIALOG BOXES
Whenever you press a button that may cause you to lose some work or is otherwise dangerous, a popup dialog box will appear asking you to confirm the action. This window will contain an Abort or No button and a Confirm or Yes button. Pressing the No button cancels the operation, and pressing Yes will proceed with the operation.
Some dialog boxes contain messages from mh. Occasionally when the message is more than one line long, not all of the text will be visible. Clicking on the message field will cause the dialog box to resize so that you can read the entire message.
MESSAGE SEQUENCES
An mh message sequence is just a set of messages associated with some name. They are local to a particular folder; two different folders can have sequences with the same name. The sequence "all" is predefined in every folder; it consists of the set of all messages in that folder. As many as nine sequences may be defined for each folder, including the predefined "all" sequence. (The sequence "cur" is also usually defined for every folder; it consists of only the current message. xmh hides "cur" from the user, instead placing a "+" by the current message. Also, xmh does not support mh’s "unseen" sequence, so that one is also hidden from the user.)
The message sequences for a folder (including one for "all") are displayed in the Sequence menu, below the sequence commands. The table of contents (also known as the "toc") is at any one time displaying one message sequence. This is called the "viewed sequence," and its name will be displayed in the toc titlebar after the folder name. Also, at any time one of the sequences in the menu will have a check mark next to it. This is called the "selected sequence." Note that the viewed sequence and the selected sequence are not necessarily the same. (This all pretty much corresponds to the way folders work.)
The Open Sequence, Add to Sequence, Remove from Sequence, and Delete Sequence commands are active only if the viewed folder contains message-sequences other than the "all" sequence.
Note that none of the above actually affect whether a message is in the folder. Remember that a sequence is a set of messages within the folder; the above operations just affect what messages are in that set.
To create a new sequence, select the Pick menu entry. A new window will appear, with lots of places to enter text. Basically, you can describe the sequence’s initial set of messages based on characteristics of the message. Thus, you can define a sequence to be all the messages that were from a particular person, or with a particular subject, and so on. You can also connect things up with Boolean operators, so you can select all things from "weissman" with a subject containing "xmh."
The layout is fairly obvious. The simplest cases are the easiest: just point to the proper field and type. If you enter in more than one field, it will only select messages which match all non-empty fields.
The more complicated cases arise when you want things that match one field or another one, but not necessarily both. That’s what all the or buttons are for. If you want all things with subjects that include "xmh" or "xterm," just press the or button next to the Subject: field. Another box will appear where you can enter another subject.
If you want all things either from "weissman" or with subject "xmh," but not necessarily both, select the -Or- button. This will essentially double the size of the form. You can then enter weissman in a from: box on the top half, and "xmh" in a subject: box on the lower part.
If you select the Skip button, then only those messages that don’t match the fields on that row are included.
Finally, several more boxes will appear in the bottom part of the window. One is the name of the sequence you’re defining. (It defaults to the name of the selected sequence when Pick was pressed, or to "temp" if "all" was the selected sequence.) Another box defines which sequence to look through for potential members of this sequence; it defaults to the viewed sequence when Pick was pressed.
Two more boxes define a date range; only messages within that date range will be considered. These dates must be entered in RFC 822-style format: each date is of the form dd mmm yy hh:mm:ss zzz, where dd is a one or two digit day of the month, mmm is the three-letter abbreviation for a month, and yy is a year. The remaining fields are optional: hh, mm, and ss specify a time of day, and zzz selects a time zone. Note that if the time is left out, it defaults to midnight; thus if you select a range of "7 nov 86" - "8 nov 86", you will get only messages from the 7th, as all messages on the 8th will have arrived after midnight.
Date field specifies which field in the header to look at for this date range; it defaults to Date. If the sequence you’re defining already exists, you can optionally merge the old set with the new; that’s what the Yes and No buttons are all about. Finally, you can OK the whole thing, or Cancel it.
In general, most people will rarely use these features. However, it’s nice to occasionally use Pick to find some messages, look through them, and then hit Delete Sequence to put things back in their original state.
WIDGET HIERARCHY
In order to specify resources, it is useful to know the hierarchy of widgets which compose xmh. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name. The application class name is Xmh.
The hierarchy of the main toc and view window is identical for additional toc and view windows, except that a TopLevelShell widget is inserted in the hierarchy between the application shell and the Paned widget. Xmh xmh Paned xmh SimpleMenu folderMenu SmeBSB open SmeBSB openInNew SmeBSB create SmeBSB delete SmeLine line SmeBSB close SimpleMenu tocMenu SmeBSB inc SmeBSB commit SmeBSB pack SmeBSB sort SmeBSB rescan SimpleMenu messageMenu SmeBSB compose SmeBSB next SmeBSB prev SmeBSB delete SmeBSB move SmeBSB copy SmeBSB unmark SmeBSB viewNew SmeBSB reply SmeBSB forward SmeBSB useAsComp SmeBSB print SimpleMenu sequenceMenu SmeBSB pick SmeBSB openSeq SmeBSB addToSeq SmeBSB removeFromSeq SmeBSB deleteSeq SmeLine line SmeBSB all SimpleMenu viewMenu SmeBSB reply SmeBSB forward SmeBSB useAsComp SmeBSB edit SmeBSB save SmeBSB print SimpleMenu optionMenu SmeBSB reverse Viewport.Core menuBox.clip Box menuBox MenuButton folderButton MenuButton tocButton MenuButton messageButton MenuButton sequenceButton MenuButton viewButton MenuButton optionButton Grip grip Label folderTitlebar Grip grip Viewport.Core folders.clip Box folders MenuButton inbox MenuButton drafts SimpleMenu menu SmeBSB <folder_name> . . .
Grip grip Label tocTitlebar Grip grip Text toc Scrollbar vScrollbar Grip grip Label viewTitlebar Grip grip Text view Scrollbar vScrollbar Scrollbar hScrollbar The hierarchy of the Create Folder popup dialog box: TransientShell prompt Dialog dialog Label label Text value Command okay Command cancel The hierarchy of the Notice dialog box, which reports messages from mh: TransientShell notice Dialog dialog Label label Text value Command confirm The hierarchy of the Confirmation dialog box: TransientShell confirm Dialog dialog Label label Command yes Command no The hierarchy of the dialog box which reports errors: TransientShell error Dialog dialog Label label Command OK The hierarchy of the composition window: TopLevelShell xmh Paned xmh Label composeTitlebar Text comp Viewport.Core compButtons.clip Box compButtons Command close Command send Command reset Command compose Command save Command insert The hierarchy of the view window: TopLevelShell xmh Paned xmh Label viewTitlebar Text view Viewport.Core viewButtons.clip Box viewButtons Command close Command reply Command forward Command useAsComp Command edit Command save Command print The hierarchy of the pick window: (Unnamed widgets have no name.) TopLevelShell xmh Paned xmh Label pickTitlebar Viewport.Core pick.clip Form form Form groupform The first 6 rows of the pick window have identical structure: Form rowform Toggle Toggle Label Text Command
Formrowform Toggle Toggle Text Text Command Form rowform Command Viewport.Core pick.clip Form form Form groupform Form rowform Label Text Label Text Form rowform Label Text Label Text Label Text Form rowform Label Toggle Toggle Form rowform Command Command See Appendix G, Athena Widget Resources for a list of resources that can be set for the Athena widgets.
APPLICATION-SPECIFIC RESOURCES
The application class name is Xmh. Application-specific resource class names always begin with an uppercase character, but unless noted, are otherwise identical to the instance names.
Any of these resources may also be specified on the command line by using the X Toolkit Intrinsics resource specification mechanism. Thus, to run xmh showing all message headers, % xmh -xrm ’∗HideBoringHeaders:off’ If TocGeometry, ViewGeometry, CompGeometry, or PickGeometry are not specified, then the value of Geometry is used instead. If the resulting height is not specified (e.g., "", "=500", "+0-0"), then the default height of windows is calculated from fonts and line counts. If the width is not specified (e.g., "", "=x300", "-0+0), then half of the display width is used. If unspecified, the height of a pick window defaults to half the height of the display.
The following resources are defined:
banner
A short string that is the default label of the folder, Table of Contents, and view. The default is: xmh MIT X Consortium R5
blockEventsOnBusy
Whether to disallow user input and show a busy cursor while xmh is busy processing a command. Default is true.
busyCursor
The name of the symbol used to represent the position of the pointer, displayed if blockEventsOnBusy is true, when xmh is processing a time-consuming command. The default is watch.
busyPointerColor
The foreground color of the busy cursor. Default is XtDefaultForeground.
checkFrequency
How often to check for new mail, make checkpoints, and rescan the Table of Contents, in minutes. If checkNewMail is true, xmh checks to see if you have new mail each interval. If makeCheckpoints is true, checkpoints are made every fifth interval. Also every fifth interval, the Table of Contents is checked for inconsistencies with the file system, and rescanned. To prevent all of these checks from occurring, set checkFrequency to 0. The default is 1. This resource is retained for backward compatibility with user resource files; see also checkpointInterval, mailInterval, and rescanInterval.
checkNewMail
If true, xmh will check at regular intervals to see if new mail has arrived for any of the top level folders. A visual indication will be given if new mail is waiting to be retrieved. Default is true. (See "Bugs.") The interval can be adjusted with the checkFrequency resource.
commandButtonCount
The number of command buttons to create in a buttonbox in between the toc and the view areas of the main window. xmh will create these buttons with the names button1, button2 and so on, in a box with the name commandBox. The user can specify labels and actions for the buttons in a private resource file; see the section on "Actions." The default is 0.
compGeometry
Initial geometry for windows containing compositions.
cursor
The name of the symbol used to represent the pointer. Default is left_ptr.
draftsFolder
The folder used for message drafts. Default is drafts.
geometry
Default geometry to use. Default is none.
hideBoringHeaders
If "on", then xmh will attempt to skip uninteresting header lines within messages by scrolling them off. Default is on.
initialFolder
Which folder to display on startup. Can also be set with the command-line option -initial. Default is inbox.
initialIncFile
The file name of your incoming mail drop. xmh tries to construct a filename for the inc -file command, but in some installations (e.g., those using the Post Office Protocol) no file is appropriate. In this case, initialIncFile should be specified as the empty string, and inc will be invoked without a -file argument. The default is to use the value of the environment variable MAIL, or if that is not set, to append the value of the environment variable USER to /usr/spool/mail/.
mailPath
The full path prefix for locating your mail folders. May also be set with the command-line option, -path. The default is the Path component in $HOME/.mh_profile, or $HOME/Mail if none.
mailWaitingFlag
If true, xmh will attempt to set an indication in its icon when new mail is waiting to be retrieved. If this option is true, then checkNewMail is assumed to be true as well. The -flag command-line option is a quick way to turn mailWaitingFlag on.
makeCheckpoints
If true, xmh will attempt to save checkpoints of volatile information. The frequency of checkpointing is controlled by the resource checkFrequency.
mhPath
The directory in which to find the mh commands. If a command isn’t found here, then the directories in the user’s path are searched. Default is /usr/local/mh6.
pickGeometry
Initial geometry for pick windows.
pointerColor
The foreground color of the pointer. Default is XtDefaultForeground.
prefixWmAndIconName
Whether to prefix the window and icon name with "xmh:". Default is true.
printCommand
The sh command to execute to print a message. Note that standard output and standard error must be specifically redirected! If a message or range of messages is selected for printing, the full file path of each message file is appended to the specified print command. The default is enscript >/dev/null 2>/dev/null.
replyInsertFilter
A shell command to be executed when the Insert button is activated in a composition window. The full path and filename of the source message is added to the end of the command before being passed to sh(1). The default filter is cat; i.e., it inserts the entire message into the composition. Interesting filters are: awk -e ’{print " " $0}’ or <mh directory>/lib/mhl -form mhl.body.
reverseReadOrder
When true, the next message will be the message prior to the current message in the Table of Contents, and the previous message will be the message after the current message in the Table of Contents. The default is false.
sendBreakWidth
When a message is sent from xmh, lines longer than this value will be split into multiple lines, each of which is no longer than sendWidth. This value may be overridden for a single message by inserting an additional line in the message header of the form sendBreakWidth: value. This line will be removed from the header before the message is sent. The default is 85.
sendWidth
When a message is sent from xmh, lines longer than sendBreakWidth characters will be split into multiple lines, each of which is no longer than this value. This value may be overridden for a single message by inserting an additional line in the message header of the form sendWidth: value. This line will be removed from the header before the message is sent. The default is 72.
skipCopied
Whether to skip over messages marked for copying when using View Next Message and View Previous Message. Default is true.
skipDeleted
Whether to skip over messages marked for deletion when using View Next Message and View Previous Message. Default is true.
skipMoved
Whether to skip over messages marked for moving to other folders when using View Next Message and View Previous Message. Default is true.
stickyMenu
If true, when popup command menus are used, the most recently selected entry will be under the cursor when the menu pops up. Default is false. See the file clients/xmh/Xmh.sample for an example of how to specify resources for pop up command menus.
tempDir
Directory for xmh to store temporary directories. For privacy, a user might want to change this to a private directory. Default is /tmp.
tocGeometry
Initial geometry for master xmh windows.
tocPercentage
The percentage of the main window that is used to display the Table of Contents. Default is 33.
tocWidth
How many characters to generate for each message in a folder’s Table of Contents. Default is 100. Use 80 if you plan to use mhl a lot, because it will be faster, and the extra 20 characters may not be useful.
viewGeometry
Initial geometry for windows showing only a view of a message.
ACTIONS
Because xmh provides action procedures which correspond to command functionality and installs accelerators, users can customize accelerators in a private resource file. xmh provides action procedures which correspond to entries in the command menus; these are given in the sections describing menu commmands. For examples of specifying customized resources, see the file clients/xmh/Xmh.sample. Unpredictable results can occur if actions are bound to events or widgets for which they were not designed.
In addition to the actions corresponding to commands, these action routines are defined:
XmhPushFolder([foldername, ...])
Pushes each of its argument(s) onto a stack of folder names. If no arguments are given, the selected folder is pushed onto the stack.
XmhPopFolder()
Pops one folder name from the stack and sets the selected folder.
XmhPopupFolderMenu()
Should always be taken when the user selects a folder button. A folder button represents a folder and zero or more subfolders. The menu of subfolders is built upon the first reference, by this routine. If there are no subfolders, this routine will mark the folder as having no subfolders, and no menu will be built. In that case, the menu button emulates a toggle button. When subfolders exist, the menu will popup, using the menu button action PopupMenu().
XmhSetCurrentFolder()
Allows menu buttons to emulate toggle buttons in the function of selecting a folder. This action is for Menubutton widgets only, and sets the selected folder.
XmhLeaveFolderButton()
Ensures that the menu button behaves properly when the user moves the pointer out of the menu button window.
XmhPushSequence([sequencename, ...])
Pushes each of its arguments onto the stack of sequence names. If no arguments are given, the selected sequence is pushed onto the stack.
XmhPopSequence()
Pops one sequence name from the stack of sequence names, which then becomes the selected sequence.
XmhPromptOkayAction()
Equivalent to pressing the Okay button in the Create Folder popup.
XmhCancelPick()
Equivalent to pressing the Cancel button in the Pick window.
CUSTOMIZATION USING MH
The initial text displayed in a composition window is generated by executing the corresponding mh command; i.e., comp, repl, or forw, and therefore message components may be customized as specified for those commands. comp is executed only once per invocation of xmh and the message template is re-used for each successive new composition.
FILES
~/.mh_profile
mh profile, used if the MH environment variable is not set.
~/Mail
Directory of folders, used if the mh profile cannot be found.
~/.xmhcheck
Optional, for multiple mail drops in cooperation with slocal.
/usr/local/mh6
mh commands, as a last resort (see mhPath).
~/Mail/<folder>/.xmhcache
scan output in each folder.
~/Mail/<folder>/.mh_sequences
Sequence definitions in each folder.
/tmpTemporary files (see tempDir).
SEE ALSO
X, xrdb, mh(1); Appendix G, Athena Widget Resources; the Nutshell Handbook MH and xmh: E-mail for Users and Programmers.
BUGS
When the user closes a window, all windows which are transient for that window should also be closed by xmh.
When XmhUseAsComposition and XmhViewUseAsComposition operate on messages in the DraftsFolder, xmh disallows editing of the composition if the same message is also being viewed in another window.
Occasionally after committing changes, the table of contents will appear to be completely blank when there are actually messages present. When this happens, refreshing the display, or typing Control-l in the table of contents, will often cause the correct listing to appear. If this doesn’t work, force a rescan of the folder.
Should recognize and use the "unseen" message-sequence.
Should determine by itself if the user hasn’t used mh before, and offer to create the .mh_profile, instead of hanging on inc.
A few commands are missing (rename folder, resend message).
WM_DELETE_WINDOW protocol doesn’t work right when requesting deletion of the first toc and view, while trying to keep other xmh windows around.
Doesn’t support annotations when replying to messages.
Doesn’t allow folders to be shared without write permission.
Doesn’t recognize private sequences.
mh will report that the .mh_sequences file is poorly formatted if any sequence definition in a particular folder contains more than BUFSIZ characters. xmh tries to capture these messages and display them when they occur, but it cannot correct the problem.
COPYRIGHT
Copyright 1988, 1989, Digital Equipment Corporation.
Copyright 1989, 1991, Massachusetts Institute of Technology.
See X for a full statement of rights and permissions.
AUTHOR
Terry Weissman, formerly of Digital Western Research Laboratory;
Donna Converse, MIT X Consortium.