XMH(1) XMH(1)
NAME
xmh - X window interface to the MH message handling
system.
SYNOPSIS
xmh [-path mailpath] [-initial foldername] [-flag]
[-toolkitoption ...]
DESCRIPTION
The xmh program provides a window-oriented front end to
the MH message handling system. It is designed to take
advantage of a large graphical display and pointer; it
will not function on an ordinary terminal.
xmh consists of user-interface code only. To actually
do things with your mail, it makes calls to the mh
package. The mh package is available in the public
domain and is not provided as part of GSE. You should
check with your system administrator whether mh is
installed on your system before attempting to use xmh.
Please do not be misled by the size of this manual
page. xmh is easy to use.
INSTALLATION
The current version of xmh requires that the user is
already set up to use mh, version 6. To do so, see if
there is a file called .mhprofile in your home
directory. If you do, check to see if it contains a
line that starts with Current-Folder. If it does, then
you have 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 .mhprofile, you can
create one (and everything else you need) by typing inc
to the shell. For more information, see mh(1).
RUNNING XMH
Run xmh as you would any other X application, such as
xterm. It accepts a command-line display of the form
-display host:dpy. The default display is specified in
the environment variable DISPLAY.
To best understand this document, run xmh and observe
the steps being described.
- 1 -
XMH(1) XMH(1)
BASIC SCREEN LAYOUT
xmh starts out with a single screen with 6 or 7 areas:
A list of your folders. (New mh users will only see
inbox here.)
A list of the global and folder-oriented commands.
A list of the messages in one of your folders
(initially, this shows the messages in inbox).
A list of the message-oriented commands.
A view of one of your messages. (Initially this is
blank.)
A list of commands for the message being viewed.
Optionally, a list of message-sequences defined for
this folder. This appears just below the list of
messages in this folder. See the Message Sequences
section for information on how to define message-
sequences.
XMH AND THE TOOLKIT
xmh uses the X Toolkit. Many of the features described
below (e.g., scrollbars, buttonboxes) are part of the
Toolkit, and are described here only for completeness.
For more information, see the Toolkit documentation.
SCROLLBARS
Some parts of the screen 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.
You can use the pointer in the scrollbar to change what
part of the data is visible. If you click with the
middle button, the top of the grey area moves to where
the pointer is, and the corresponding portion of data
is displayed. If you hold down the middle button, you
can drag around the grey area. This makes it easy to
get to the top of the data: just press with the middle,
drag off the top of the scrollbar, and release.
If you click with button 1, the data to the right of
the pointer scrolls to the top of the window. If you
- 2 -
XMH(1) XMH(1)
click with pointer button 3, the data at the top of the
window scrolls down to where the pointer is.
BUTTONBOXES
Any area consisting of many words or short phrases,
each enclosed in a box, is called a buttonbox. Each
box is 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
is displayed with a scrollbar, so you can always scroll
to the button you want.
ADJUSTING THE RELATIVE SIZES OF AREAS
If you are not satisfied with the size of the various
areas on the screen, they can be changed easily. Near
the right edge of the border between each region is a
black box, called a grip. 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 middle button, only that border
moves. This mode is simplest to understand, but is
probably the least useful.
If you drag with pointer button 1, you are adjusting
the size of the window above. xmh attempts to
compensate by adjusting some window below it.
If you drag with pointer button 3, you are adjusting
the size of the window below. xmh attempts to
compensate by adjusting some window above it. All
windows have a minimum and maximum size; you are
never allowed to move a border past the point where
it would make a window have an invalid size.
SELECTED FOLDER
The selected folder is whichever foldername is
highlighted in the top buttonbox. Note that this is
not necessarily the same folder that is being viewed.
To change the selected folder, press on the desired
folder button.
GENERAL COMMANDS AND FOLDER COMMANDS
The second buttonbox contains commands of a global
nature:
Quit XMH
Exits xmh, after first checking that you would not
lose any changes.
Compose Message
- 3 -
XMH(1) XMH(1)
Composes a new message and brings up a new window.
For a complete description, see the Composition
Windows section.
Open Folder
Display the data in the selected folder. Thus, the
selected folder also becomes the viewed folder.
Open Folder in New Window
Creates a new screen, and displays the selected
folder in that screen. Note, however, that you may
not display the same folder in more than one screen
at a time.
Create Folder
Create a new folder. You are prompted for a name
for the new folder; to enter the name, point the
pointer at the blank box provided and type. Press
the CONFIRM button when finished, or press ABORT to
cancel this operation.
Delete Folder
Destroy the selected folder. You are asked to
confirm this action. (See the Confirmation Windows
section.)
HIGHLIGHTED MESSAGES, SELECTED MESSAGES
AND THE CURRENT MESSAGE
It is possible to highlight a set of messages in the
list of messages for the viewed folder. 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.
The selected messages are the same as the highlighted
messages, if there are any. If no messages are
highlighted, 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.
MESSAGE COMMANDS
The third buttonbox (fourth if you have message-
sequences displayed) contains the following commands to
deal with messages:
Incorporate New Mail
Add any new mail received to your inbox folder, and
set the current message to be the first new
- 4 -
XMH(1) XMH(1)
message. (This button is selectable only if inbox
is the folder being viewed.)
View Next Message
View the first selected message. If no messages
are highlighted, view the current message. If
current message is already being viewed, view the
first unmarked message after the current message.
View Previous Message
View the last selected message. If no messages are
highlighted, view the current message. If current
message is already being viewed, view the first
unmarked message before the current message.
Mark Deleted
Mark the selected messages for deletion. If no
messages are highlighted, this automatically
displays the next unmarked message.
Mark Move
Mark the selected messages to be moved into the
current folder. (If the current folder is the same
as the viewed folder, this command will just beep.)
If no messages are highlighted, this automatically
displays the next unmarked message.
Mark Copy
Mark the selected messages to be copied into the
current folder. (If the current folder is the same
as the viewed folder, this command will just beep.)
Unmark
Remove any of the above three marks from the
selected messages.
View in New Window
Create a new window containing only a view of the
first selected message.
Reply
Create a composition window in reply to the first
selected message.
Forward
Create a composition window whose body is
initialized to be the contents of the selected
messages.
Use as Composition
Create a composition window whose body is
initialized to be this message. Note that any
- 5 -
XMH(1) XMH(1)
changes you make in the composition are also saved
in this message. This function is meant to be used
with the drafts folder. (See to the Composition
Windows section.)
Commit Changes
Execute any deletions, moves, and copies that have
been marked in this folder.
Print
Print the selected messages. xmh normally prints
by invoking the enscript(1) command, but you may
change the command it uses. (See the Customizing
Xmh section.)
Pack folder
Renumber the messages in this folder so they start
with 1 and increment by 1.
Sort folder
Sort the messages in this folder in chronological
order. As a side effect, this also packs the
folder.
Force Rescan
Rebuild the list of messages. This can be used
whenever you suspect xmh's idea of what messages
you have is wrong. (In particular, this is useful
if you ever change things using straight mh
commands without using xmh.)
Pick Messages
Define a new message-sequence. (See the Message
Sequences section.)
The following buttons appear but are sensitive only if
the current folder has any message-sequences defined.
(See the Message-Sequences section.)
Open Sequence
Change the viewed sequence to be the same as the
selected sequence.
Add to Sequence
Add the selected messages to the selected sequence.
Remove from Sequence
Remove the selected messages from the selected
sequence.
Delete Sequence
Remove the selected sequence entirely. Note the
- 6 -
XMH(1) XMH(1)
messages themselves are not affected; they simply
are no longer grouped together as a message-
sequence.
VIEW WINDOWS
The commands in these windows are the same as the
message commands by the same name, except instead of
affecting the selected messages, they affect the viewed
message. In addition there is the Edit View button,
which allows you to edit the message being viewed.
While editing, the Edit View button changes to a Save
View button, which should be pressed to save your
edits.
COMPOSITION WINDOWS
Aside from the normal text editing functions, there are
six command buttons associated with composition
windows:
Close
Close this composition window. If changes have
been made since the most recent Save or Send, you
are asked to confirm losing them.
Send
Send this composition.
Reset
Replace the current composition with an empty
message. If changes have been made since the most
recent Send or Save, you are asked to confirm
losing them.
Compose
Bring up new composition window.
Save
Save this composition in your drafts folder. (If
you do not have a folder named drafts, one is
created.) Then you can safely close the
composition. At some future date, you can continue
working on the composition by opening your drafts
folder, selecting the message, and using the Use as
Composition command.
Insert
Insert a related message into the composition. If
the composition window was created with a Reply
button, the related message is the message being
replied to, otherwise, no related message is
defined and this button is inactive. The message
is filtered before being inserted; see
- 7 -
XMH(1) XMH(1)
ReplyInsertFilter under the Customizing Xmh
section.
TEXT EDITING COMMANDS
All the text editing commands are defined by the Text
widget in the X Toolkit. The commands may be bound to
different keys than the defaults described below
through the standard X Toolkit key rebinding
mechanisms. See the X Toolkit and Athena Widgets
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 an
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 paragraph, and quadruple-
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. A paragraph refers to the
text between carriage returns. Text within a paragraph
is broken into lines based on the current width of the
window.
The following keystroke combinations are defined:
CTRL-A
Move to the beginning of the current line.
CTRL-B, CTRL-H, BACKSPACE
Move back one character.
CTRL-D
Delete the next character.
CTRL-E
Move to the end of the current line.
CTRL-F
Move forward one character.
CTRL-J, LINEFEED
Create a new paragraph with the same indentation as
the previous one.
CTRL-K
Kill the rest of this line.
- 8 -
XMH(1) XMH(1)
CTRL-L
Refresh; repaint this window.
CTRL-M, Return
New paragraph.
CTRL-N
Move down to the next line.
CTRL-O
Break this paragraph into two.
CTRL-P
Move up to the previous line.
CTRL-V
Move down to the next screen-full of text.
CTRL-W
Kill the selected text.
CTRL-Y
Insert the last killed text.
CTRL-Z
Scroll the text one line up.
Meta-<
Move to the beginning of the document.
Meta->
Move to the end of the document.
Meta-[
Move back one paragraph.
Meta-]
Move forward one paragraph.
Meta-B
Move back one word.
Meta-D
Kill the next word.
Meta-F
Move forward one word.
Meta-H, Meta-Delete
Kill the previous word.
Meta-I
- 9 -
XMH(1) XMH(1)
Insert a file. If any text is selected, use the
selected text as the filename. Otherwise, a box
appears in which you can type the desired filename.
Meta-V
Move up to the previous screen-full of text.
Meta-Y
Stuff 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.
Meta-Z
Scroll the text one line down.
Delete
Delete the previous character.
CONFIRMATION WINDOWS
Whenever you press a button that may cause you to lose
some work or is otherwise dangerous, a window appears
asking you to confirm the action. This window contains
an Abort or No button and a Confirm or Yes button.
Pressing Abort cancels the operation; pressing Confirm
proceeds with the operation.
A very handy shortcut exists: if you press the
original, offending button again, it is interpreted as
a Confirm. If you press any other command button, it
is interpreted as an Abort.
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. In all folders, the
sequence all is predefined; it consists of the set of
all messages in that folder. (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 the unseen sequence, so that sequence
is also hidden from the user.)
- 10 -
XMH(1) XMH(1)
The message sequences for a folder are displayed as
buttons containing the names of the sequences
(including one for all). The Table of Contents (TOC)
is at any one time displaying one message sequence.
This is called the viewed sequence. If it is not all,
its name is displayed in the title bar just after the
folder name. Also, at any time one of the sequence
buttons will be highlighted. This is called the
selected sequence. Note that the viewed sequence and
the selected sequence are not necessarily the same.
(This closely corresponds to the way the folder buttons
work.)
The Open Sequence, Add to Sequence, Remove from
Sequence, and Delete Sequence buttons are active only
if the viewed folder contains message-sequences.
Note that none of these buttons actually affect whether
a message is in the folder. Remember that a sequence
is a set of messages within the folder; the above
operations simply affect what messages are in that set.
To create a new sequence, press the Pick button. A new
window appears, with many places to enter text. 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 with boolean
operators, so you can select all things from weissman
with the subject 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 only selects
messages that match all nonempty fields.
The more complicated cases arise when you want things
that match one field or another, but not necessarily
both. That is what all the Or buttons are for. If you
want all things with the subject xmh or xterm, just
press the Or button next to the Subject: field.
Another box appears 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 doubles 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 ever select the Skip button, only those messages
- 11 -
XMH(1) XMH(1)
that do not 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 are 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 are considered. These dates
must be entered in 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 because messages on the
8th will have arrived after midnight.
Date field specifies which date field in the header to
look at for this date range; it probably will not be
useful to anyone. If the sequence you are defining
already exists, you can optionally merge the old set
with the new with the Yes and No buttons. Finally, you
can OK the whole thing, or Cancel it.
In general, most people will rarely use these features.
However, it is nice to occasionally use Pick to find
some messages, look through them, then press Delete
Sequence to put things back in their original state.
CUSTOMIZING XMH
As with all standard X applications, xmh may be
customized through entries in the resource manager.
The following resource manager entries are defined.
(Note that the entry names must be entered in either
all lowercase or in the exact case shown below.)
BackGround
Background color. Currently, this affects only
buttons. The default is white.
ButtonFont
What font to use for button names. The default is
timrom10.
CheckNewMail
- 12 -
XMH(1) XMH(1)
If True, xmh checks at regular intervals to see if
new mail has arrived for any of the folders. A
visual indication is given if new mail is waiting
to be retrieved. The default is True.
CompButtonLines
How many rows of buttons to display under a
composition. The default is 1.
CompFont
What font to use when composing a message. The
default is 6x13.
CompGeometry
Initial geometry for windows containing
compositions.
CompLines
How many lines of a composition to display. The
default is 20.
ConfirmFont
What font to use for confirmation windows. The
default is timrom10b.
FolderButtonLines
How many rows of folder command buttons to display.
The default is 1.
FolderLines
How many rows of foldername buttons to display.
The default is 1.
ForeGround
Foreground color. Currently, this affects only
title bars and buttons. The default is black.
Geometry
Default geometry to use. The default is none.
HideBoringHeaders
If on, xmh attempts to skip uninteresting header
lines within messages by scrolling them off. The
default is on.
InitialFolder
Which folder to display on startup. May also be
set with the command-line option -initial. The
default is inbox.
InitialIncFile
The filename of your incoming mail drop. xmh tries
- 13 -
XMH(1) XMH(1)
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.
LabelFont
What font to use for the title bars. The default
is timrom10i.
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/.mhprofile, or $HOME/Mail if none.
MailWaitingFlag
If True, xmh attempts 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.
MhPath
The directory with the mh commands. If a command
is not found here, the directories in the user's
path are searched. The default is /usr/local/mh6.
PickGeometry
Initial geometry for pick windows.
PickEntryFont
What font to use for user text fields in pick
windows. The default is timrom10.
PickTextFont
What font to use for static text fields in pick
windows. The default is timrom10.
PrintCommand
What sh command to execute to print a message.
Note that stdout and stderr must be specifically
redirected. If a message or range of messages is
selected for printing, the full file paths of each
message file are appended to the specified print
command. The default is:
enscript >/dev/null 2>/dev/null
- 14 -
XMH(1) XMH(1)
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 are
added to the end of the command before being passed
to sh(1). The default filter is echo; i.e., it
merely inserts the name of the file into the
composition.
Other interesting filters are:
awk -e '{print " " $0}'
or
/usr/new/mh.6.5/lib/mhl -form mhl.body
TempDir
Directory for xmh to store temporary directories.
For privacy, a user might want to change this to a
private directory. The default is /tmp.
TocButtonLines
How many rows of message command buttons to
display. The default is 1.
TocFont
What font to use for a folder's Table of Contents.
The default is 6x13.
TocGeometry
Initial geometry for master xmh windows.
To22ines
How many messages to display in a folder's Table of
Contents. The default is 10.
TocWidth
How many characters to generate for each message in
a folder's Table of Contents. The default is 100.
Use 80 if you plan to use mhl frequently.
ViewButtonLines
How many rows of buttons to display under a view of
a message. The default is 1.
ViewFont
What font to use for a view of a message. The
default is 6x13.
ViewGeometry
Initial geometry for windows showing only a view of
- 15 -
XMH(1) XMH(1)
a message.
ViewLines
How many lines of a message to display. The
default is 20.
If TocGeometry, ViewGeometry, CompGeometry, or
PickGeometry are not specified, the value of Geometry
is used. If the resulting height is not specified
(e.g., a NULL value, =500, +0-0), then the default
height is calculated from the fonts and line counts
specified above. If the width is not specified (e.g.,
a NULL value, x300 -0+0), half of the display width is
used. If unspecified, the height of a pick window
defaults to half the height of the display.
Any of these options may also be specified on the
command line by using the standard X Toolkit resource
specification mechanism. Thus, to run xmh showing all
message headers, type:
xmh -xrm '*HideBoringHeaders:off'
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 reused for each
successive new composition.
FILES
/Mail
~
/.mhprofile
~
SEE ALSO
xrdb(1), mh(1)
BUGS
Printing support is minimal.
Keyboard shortcuts for commands would be nice.
Should handle the unseen message-sequence.
Should determine by itself if the user has not used mh
before and offer to set things up for him or her.
Still a few commands missing (rename folder, remail
message).
Needs subfolder support.
- 16 -
XMH(1) XMH(1)
AUTHOR
Terry Weissman, Digital Western Research Laboratory
- 17 -