|
NAMExmh - send and read mail with an X interface to MHSYNOPSISxmh [-path mailpath] [-initial foldername] [-flag] [-toolkitoption ...]DESCRIPTIONThe xmh program provides a graphical user interface to the MH Message Handling System. To actually do things with your mail, it makes calls to the MH package. Electronic mail messages may be composed, sent, received, replied to, forwarded, sorted, and stored in folders. xmh provides extensive mechanism for customization of the user interface.This document introduces many aspects of the Athena Widget Set. OPTIONS
These three options have corresponding application-specific resources, MailPath, InitialFolder, and MailWaitingFlag, which can be specified in a resource file. The standard toolkit command line options are given in X(7). INSTALLATIONxmh requires that the user is already set up to use MH, version 6. To do so, 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 stderr, which can hang xmh depending on your setup.)If you do not already have a .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. Much of the user interface of xmh is configured in the Xmh application class defaults file; if this file was not installed properly a warning message will appear when xmh is used. xmh is backwards compatible with the R4 application class defaults file. The default value of the SendBreakWidth resource has changed since R4. BASIC SCREEN LAYOUTxmh starts out with a single window, divided into four major areas:
XMH AND THE ATHENA WIDGET SETxmh 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 the Athena Widget Set documentation.SCROLLBARSSome parts of the main window will have a vertical area on the left containing a grey bar. This area is a scrollbar. They are used whenever the data in a window takes up more space than can be displayed. The grey bar indicates what portion of your data is visible. Thus, if the entire length of the area is grey, then you are looking at all your data. If only the first half is grey, 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 with pointer button 2, the top of the grey area will move to where the pointer is, and the corresponding portion of data will be displayed. If you hold down pointer button 2, you can drag around the grey area. This makes it easy to get to the top of the data: just press with button 2, drag off the top of the scrollbar, and release. If you click with button 1, then the data to the right of the pointer will scroll to the top of the window. If you click with pointer button 3, then the data at the top of the window will scroll down to where the pointer is. BUTTONBOXES, BUTTONS, AND MENUSAny 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 AREASIf 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 the 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 MAILThis 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 button box created by the application resource CommandButtonCount. FOLDERS AND SEQUENCESA folder contains a collection of mail messages, or is empty. xmh supports folders with one level of subfolders.The selected folder is whichever foldername appears in the bar above the folder buttons. Note that this is not necessarily the same folder that is currently being viewed. To change the selected folder, just press on the desired folder button with pointer button 1; 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 title bar above the Table of Contents displays the name of the viewed folder. The toc title bar also displays the name of the viewed sequence of messages within the viewed folder. Every folder has an implicit ``all'' sequence, which contains all the messages in the folder, and initially the toc title bar will show ``inbox:all''. FOLDER COMMANDSThe Folder command menu contains commands of a global nature:
HIGHLIGHTED MESSAGES, SELECTED MESSAGES, AND THE CURRENT MESSAGEIt 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. Upon opening a new folder, for example, the current message will be different from the viewed message. When a message is viewed, the title bar above the view will identify the message. TABLE OF CONTENTS COMMANDSThe Table of Contents command menu contains commands which operate on the open, or viewed, folder.
MESSAGE COMMANDSThe Message command menu contains commands which operate on the selected message(s), or if there are no selected messages, the current message.
SEQUENCE COMMANDSThe 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.
The following menu entries will be sensitive only if the current folder has any message-sequences other than the ``all'' message-sequence.
VIEW COMMANDSCommands in the View menu and in the buttonboxes of view windows (which result from the Message menu 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.
OPTIONSThe Options menu contains one entry.
COMPOSITION WINDOWSComposition windows are created by selecting Compose Message from the Message command menu, or by selecting Reply or Forward or Use as Composition from the Message or View command menu. These are used to compose mail messages. Aside from the normal text editing functions, there are six command buttons associated with composition windows:
ACCELERATORSAccelerators 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, or current message if none have been highlighted, to be moved to a folder in a single action, 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:
TEXT EDITING COMMANDSAll 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 the X Toolkit Intrinsics and the Athena Widget Set documentation 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 clicking rapidly five times 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. 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:
In addition, the pointer may be used to copy and paste text:
CONFIRMATION DIALOG BOXESWhenever 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 the ``Yes'' will proceed with the operation.When xmh is run under a Release 6 session manager it will prompt the user for confirmation during a checkpoint operation. The dialog box asks whether any current changes should be committed (saved) during the checkpoint. Responding ``Yes'' will have the same effect as pressing the ``Commit Changes'' or ``Save Message'' buttons in the respective folder and view windows. Responding ``No'' will cause the checkpoint to continue successfully to completion without actually saving any pending changes. If the session manager disallows user interaction during the checkpoint a ``Yes'' response is assumed; i.e. all changes will be committed during the checkpoint. 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-SEQUENCESAn 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 named ``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 title bar 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 ``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 should be 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, in the bottom part of the window will appear several more boxes. 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 only get 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 HIERARCHYIn 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 Command delete 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 Form rowform Toggle Toggle Text Text Command Form rowform Command Viewport.core pick.clip Form form From groupform Form rowform Label Text Label Text Form rowform Label Text Label Text Label Text Form rowform Label Toggle Toggle Form rowform Command Command APPLICATION-SPECIFIC RESOURCESThe application class name is Xmh. Application-specific resources are listed below by name. Application-specific resource class names always begin with an upper case character, but unless noted, are otherwise identical to the instance names given below.Any of these options 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,
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:
MULTIPLE MAIL DROPSUsers may need to incorporate mail from multiple spool files or mail drops. If incoming mail is forwarded to the MH slocal program, it can be sorted as specified by the user into multiple incoming mail drops. Refer to the MH man page for slocal to learn how to specify forwarding and the automatic sorting of incoming mail in a .maildelivery file.To inform xmh about the various mail drops, create a file in your home directory called .xmhcheck. In this file, a mapping between existing folder names and mail drops is created by giving a folder name followed by the absolute pathname of the mail drop site, with some white space separating them, one mapping per line. xmh will read this file whether or not resources are set for notification of new mail arrival, and will allow incorporation of new mail into any folder with a mail drop. xmh will invoke inc with the -file argument, and if xmh has been requested to check for new mail, it will check directly, instead of using msgchk. An example of .xmhcheck file format, for the folders ``inbox'' and ``xpert'': inbox /usr/spool/mail/converse xpert /users/converse/maildrops/xpert ACTIONS AND INTERFACE CUSTOMIZATIONBecause xmh provides action procedures which correspond to command functionality and installs accelerators, users can customize accelerators and new button functionality in a private resource file. For examples of specifying customized resources, see the file mit/clients/xmh/Xmh.sample. To understand the syntax, see the Appendix of the X Toolkit Intrinsics specification on Translation Table Syntax, and any general explanation of using and specifying X resources. Unpredictable results can occur if actions are bound to events or widgets for which they were not designed.Here's an example of how to bind actions to your own xmh buttons, and how to redefine the default accelerators so that the Meta key is not required, in case you don't have access to the sample file mentioned above. ! To create buttons in the middle of the main window and give them semantics: Xmh*CommandButtonCount: 5 Xmh*commandBox.button1.label: Inc Xmh*commandBox.button1.translations: #override\ <Btn1Down>,<Btn1Up>: XmhIncorporateNewMail() unset() Xmh*commandBox.button2.label: Compose Xmh*commandBox.button2.translations: #override\ <Btn1Down>,<Btn1Up>: XmhComposeMessage() unset() Xmh*commandBox.button3.label: Next Xmh*commandBox.button3.translations: #override\ <Btn1Down>,<Btn1Up>: XmhViewNextMessage() unset() Xmh*commandBox.button4.label: Delete Xmh*commandBox.button4.translations: #override\ <Btn1Down>,<Btn1Up>: XmhMarkDelete() unset() Xmh*commandBox.button5.label: Commit Xmh*commandBox.button5.translations: #override\ <Btn1Down>,<Btn1Up>: XmhCommitChanges() unset() ! To redefine the accelerator bindings to exclude modifier keys, ! and add your own keyboard accelerator for Compose Message: Xmh*tocMenu.accelerators: #override\n\ !:<Key>I: XmhIncorporateNewMail()\n\ !:<Key>C: XmhCommitChanges()\n\ !:<Key>R: XmhForceRescan()\n\ !:<Key>P: XmhPackFolder()\n\ !:<Key>S: XmhSortFolder()\n Xmh*messageMenu.accelerators: #override\n\ !:<Key>E: XmhComposeMessage()\n\ !<Key>space: XmhViewNextMessage()\n\ !:<Key>c: XmhMarkCopy()\n\ !:<Key>d: XmhMarkDelete()\n\ !:<Key>f: XmhForward()\n\ !:<Key>m: XmhMarkMove()\n\ !:<Key>n: XmhViewNextMessage()\n\ !:<Key>p: XmhViewPreviousMessage()\n\ !:<Key>r: XmhReply()\n\ !:<Key>u: XmhUnmark()\n xmh provides action procedures which correspond to entries in the command menus; these are given in the sections describing menu commands, not here. In addition to the actions corresponding to commands in the menus, these action routines are defined:
CUSTOMIZATION USING MHThe 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 every successive new composition.xmh uses MH commands, including inc, msgchk, comp, send, repl, forw, refile, rmm, pick, pack, sort, and scan. Some flags for these commands can be specified in the MH profile; xmh may override them. The application resource debug can be set to true to see how xmh uses MH commands. ENVIRONMENTHOME - users's home directoryMH - to get the location of the MH profile file 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 /tmp - temporary files, see tempDir. SEE ALSOX(7), xrdb(1), X Toolkit Intrinsics, Athena Widget Set, mh(1), enscript(1)At least one book has been published about MH and xmh. 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. - Should save a temporary checkpoint file rather than requiring changes to be committed in the non-shutdown case. AUTHORTerry Weissman, formerly of Digital Western Research LaboratoryDonna Converse, MIT X Consortium
Visit the GSP FreeBSD Man Page Interface. |