MH & nmh: Email for Users & Programmers

May, 2006

exmh Reference Guide
by Brent Welch

Command-line Options

There are just a handful of command-line options for exmh. Note that Xt-like options are not supported because exmh is based on Tk, not Xt.

-bgAction action
Override background processing setting. Valid actions are: off, count, msgchk, flist, and inc.
-bgPeriod minutes
Override background period setting.
-geometry geometry
Initial geometry to use for the window. exmh remembers the geometry when you change it interactively, so you do not really need to specify it each time on the command line.
-iconposition geometry
Initial position to use for the icon in the form +xoff+yoff. You can use minus signs (-) instead of plus signs (+) to position relative to the right and bottom of the screen.
Begin execution iconic.
Override the editor command defined in Preferences and use the built-in editor (sedit) instead.
If the argument is not one of the flags given above, it is assumed to be the name of a folder. In this case exmh begins in that folder.

Main Buttons and Menus

exmh Main Buttons (top row)
Menu/ButtonTcl CommandExplanation
Help -- A menu with three choices:
Quick IntroHelp -- Some get-started information.
Color LegendHelp_KeyDisplay -- A highlighting key for color or monochrome screens.
Frequently Asked QuestionsHelp FAQ -- Displays the exmh.FAQ file.
Bindings -- A menu with two choices:
CommandsBind_Pref -- Dialog to change command key bindings.
Simple EditSedit_Pref -- Dialog to change editing key bindings.
LogExmhLogShow Display the debug log, if it is enabled.
AliasesAliases_Pref Display an interface to the MH alias file.
PreferencesPreferences_Dialog Display the preferences user interface.
QuitExmh_DoneQuit exmh.

Folder Buttons and Menus

Folder Buttons (middle row)
Menu/ButtonTcl CommandExplanation
PickPick An interface to the MH pick command.
NewFolder_NewCreate a new mail folder.
FindFind_Setup Display find dialog.
Flist Fdisp_ClearHighlights ; busy Flist_FindUnseen Refreshes highlights of labels for folders with unseen messages.
IncInc Incorporate new mail from your spool file.
CommitFolder_Commit Commit pending delete and move operations.
More... -- A menu with more folder operations:
Rescan folder busy Scan_FolderForce ; Msg_ShowSomething Force a rescan of the folder contents.
Pack folder busy Folder_Pack ; Msg_ShowSomething Renumber messages in the current folder to eliminate any gaps in the number sequence.
Sort folder busy Folder_Sort ; Msg_ShowSomething This will sort the current folder by date.
Find all foldersFlist_Refresh Scan the file system for all your folders.
Delete folderFolder_DeleteDelete a folder.
Catch-up UnseenPick_MarkSeen Clear the unseen sequence from the current folder.
Update scan cachesScan_AllFolders Updates any scan caches that are out of date.
Update all scan cachesScan_AllFolders 1Rescans all folders.
Purge folderFolder_PurgeBg Delete old messages renamed by rmm.
Purge all foldersFolder_PurgeAllBgPurge all folders.
Import mailbox foldersImport_DialogCopy messages from mailtool folders.

Message Buttons and Menus

Message Buttons (bottom row)
Menu/ButtonTcl CommandExplanation
ForwardMsg_ForwardForward the current message(s).
SendMsg_ComposeCompose a mail message.
PrevFtoc_Prev showShow previous message.
NextFtoc_Next showShow next message.
DeleteMsg_Remove Mark the current message(s) for deletion and advance.
MoveMsg_Move Ftoc_MoveMark Mark the selected message(s) to be moved to the target folder and go to the next message.
LinkMsg_Move Ftoc_CopyMark advance? Link message to target folder.
"Reply..." -- This is a menu of reply options.
Reply to senderMsg_Reply -nocc all Reply to the current message, only to the person that send the original.
Reply allMsg_Reply -cc all Reply to the current message, including on the cc line everyone that got the original message.
Reply helpMsg_ReplyHelp Explains how to add more Reply... menu entries.
More... -- This is a menu of more message operations:
PrintPrint Print the current message(s).
Unmark (Undo)Ftoc_Unmark Cancel a move or delete mark on the selected message(s).
ClipMsg_Clip Display a new the current message in a new window.
First UnseenMsg_ShowUnseen Display the first unseen message, if any.
Burst DigestMsg_BurstDigest Use MH burst to split up a digest message into its individual messages.
RedistributeMsg_Dist Mh_DistSetup Resend a message to a different recipient.
Save to fileMsg_Save Copy the current message(s) to a file.
Use message as draftMsg_CompUse Copy the current message into the drafts folder and open your editor on the message.
Edit messageMsg_Edit Open your editor on the current message.
uudecode messageMsg_UUdecode Run uudecode with the current message as input.
Print as postscriptPrint_Postscript Strip lines before %! and print the rest.
Apply to messageMessage_Apply This runs a UNIX command over the current message, header and body.
Apply to bodyMessage_Apply body This runs a UNIX command over a temporary file containing the body of the current message.
Mark UnseenMsg_MarkSeen Put the current message(s) back into the unseen sequence.
PGP viewPgp_view Temporarily decrypt a message using PGP.
PGP decryptPgp_decrypt Decrypt and save a message using PGP.

sedit Buttons and Menus

The following table describes the buttons and menus for the built-in editor sedit. Most of these Tcl commands are parameterized by $draft and $t to allow for multiple drafts in progress.

Simple Editor (sedit) Buttons
Menu/ButtonTcl Command/VariableExplanation
AbortSeditAbort $draft $t This deletes the draft message and removes the editor window.
Save&QuitSeditSave $draft $t SeditNuke This will save the message and quit the editor window.
HelpSeditHelp Display a window with a short explanation of the editor.
Insert @SeditInsertFile $draft $t @ Format and insert the message being replied to. Only enabled during replies.
SignSeditSign $draft $t This appends your ~/.signature file to the draft. If this file is instead an executable script or program, it is executed in order to generate the signature.
Sign... -- A menu of signature possibilities, which are all files that match the ~/.signature* pattern
SendSeditSend $draft $t Send the message.
WhomSeditWhom $draft $f $t Expand aliases to determine who the message is going to.
Text... -- This menu is used to add bold, italic, underline, etc. to your messages. This results in a MIME message of type text/enriched.
More... -- This menu contains a few entries for less common operations. The first three are checkbox entries that set the named Tcl variable.
Keep on sendsedit($t,keep) If selected it prevents the editor window from disappearing after you send or abort a message.
Format mailsedit($t,format) Enables line breaking and text/enriched encoding.
Attempt mhnsedit($t,mhn) Run your message through mhn to create MIME messages.
Insert File...SeditInsertFileDirect $draft $t Insert a file into the message without MIME formatting.
Insert Part...SeditInsertFileDialog $draft $t Insert a file as part of a MIME message.
Insert External...SeditInsertExternalDialog $draft $t Create a Message/External-Body MIME message part.
SaveSeditSave $draft $t Save the editor buffer to disk. This does not mean the draft is preserved after you send it. Use Save&Quit or Keep on Send instead.
Spell...SeditSpell $draft $f $t This runs a spell command over the draft body.
Find SELSedit_Find $draft $t This searches the draft for the current X selection.
PGP -- A menu of Pretty Good Privacy commands. These all work by inserting a pgp-action header into the message, and the action takes effect when the message is sent.
encryptPgp_encrypt encrypt $draft $t Encrypt a message for the recipients of the message.
sign clearPgp_encrypt signclear $draft $t Digitally sign a plain text message.
sign binaryPgp_encrypt signbinary $draft $t Digitally sign and base64-encode the message.
encrypt & signPgp_encrypt encryptsign $draft $t Encrypt and sign the message.

What Now Buttons and Menus

The What Now dialog is opened after you edit a draft with an external editor that is run via the exmh-async wrapper script.

What Now Dialog
Menu/ButtonTcl CommandExplanation
KillEditDialogDone abort $id Remove the draft instead of sending it.
DismissEditDialogDone dismiss $id Leave the draft in the drafts folder - do not send, yet.
Re-editEditDialogDone reedit $id nohide Re-run the editor on the draft.
SendEditDialogDone send $idSend the message.
More... -- A menu with more operations:
WhomEditDialogDone whom $id nohide Expand aliases to determine who the message is going to.
MHNEditDialogDone mhn $id nohide Run the draft through mhn.
SpellEditDialogDone spell $id nohide Run a spell program on the message.
SeditEditDialogDone sedit $id Run the built-in editor on the message.

External Editor Interface

The following Tcl commands are designed to be used with an external Tcl-based editor. Use the Tk send command to get exmh to do these operations.

Tcl Interface for External Editors
Tcl CommandExplanation
Edit_Dialog $id Display the WhatNow dialog for the draft. The $id is the message number of the draft. Alternatively, the following commands can be issued directly from the editor's interface.
Edit_Done send $idSend the message $id in the drafts folder.
Edit_Done reedit $idRe-edit the message.
Edit_Done sedit $idRun the built-in editor on the message.
Edit_Done spell $idRun a spell program on the message.
Edit_Done mhn $idRun mhn on the message.
Edit_Done abort $idRemove the draft message.
Edit_Done dismiss $idLeave the message in the drafts folder.
Edit_Done whom $id Run the MH whom program on the message.

Command Keys

The following table lists command key bindings. The keystroke syntax is given as you would specify it to the Tk bind command. Capitalization is important. Note that punctuation characters are spelled out; these are X keysyms. The special keysyms like Next may vary from keyboard to keyboard. You can change these bindings via the Command Binding menu entry, and the results are saved in your ~/.exmhbindings file.

Command Key Bindings

KeystrokeTcl CommandExplanation
<Key-c>Msg_Compose Open the editor on a new draft message.
<Key-d>Msg_RemoveDelete the current message(s).
<Key-D>Msg_RemoveNoshow Delete the current message(s) and advance without displaying.
<Key-f>Msg_ForwardForward the current message(s).
<Key-F>Folder_Unseen Change to the next folder with unseen messages.
<Key-i>IncIncorporate Mail
<Key-m>Msg_Move Refile the current message(s) to the target folder.
<Key-M>Msg_MoveNoshow Refile the current message(s) and advance without displaying.
<Key-n>Ftoc_Next showDisplay the next message.
<Key-N>Ftoc_Next noshow Select, but do not display, the next message.
<Key-p>Ftoc_Prev showDisplay the previous message.
<Key-P>Ftoc_Prev noshow Select, but do not display, the previous message.
<Key-r>Msg_Reply -nocc all Reply to the sender of the current message.
<Key-R>Msg_Reply -cc all Reply to the sender and all recipients of the current message.
<Key-s>Msg_ShowCurrent Display the currently selected message.
<Control-s>Find_It forw Search forward in message or FTOC.
<Key-u>Ftoc_UnmarkUnmark the current message(s).
<Key-U>Msg_ShowUnseenShow the next unread message.
<asciicircum>Msg_First Select, but do not display, the first message in the folder. This key prints as ^.
<dollar>Msg_Last Select, but do not display, the last message. This key prints as $.
<minus>Ftoc_PrevMarked Display the the previous message, whether or not it is marked. This key prints as -.
<space>Msg_PageOrNext Page down the message or advance to the next one.
<question>Bind_Pref Display command binding user interface. This key prints as ?.
<BackSpace>Msg_PageUpPage back through the message.
<Prior> -- Same as <BackSpace>
<Up> -- Same as <BackSpace>
<Next>Msg_PageDown Page down in the message display.
<Down> -- Same as <Next>
<Control-p>Ftoc_PageUp Page up the folder table of contents.
<Shift-Prev> -- Same as <Control-p>
<Control-r>Find_It prev Search backwards in message or FTOC.
<Control-Return>Folder_Commit Commit pending deletes and refiles.
<Control-n>Ftoc_PageDown Page down the folder table-of-contents.
<Shift-Next> -- Same as <Control-n>

Editing Keys

The following table lists editing key bindings. These are used in the built-in editor and, where applicable, in the text entry widgets in dialogs. You can change (but not extend) these bindings via the Simple Edit menu entry, and the results are saved in your ~/.exmhsedit file.

Simple Edit Bindings

<Control-h>backspaceDestructive backspace.
<Control-b>backcharMove cursor back a character.
<Meta-less>bofMove to beginning of buffer.
<Meta-b>backwordMove cursor back a word.
<Control-d>delcharDelete the character ahead of cursor.
<Control-x><Delete>delbolDelete to beginning of line.
<Meta-h>delwordbackDelete back a word.
<Control-k>deleolDelete to end of line.
<Control-n>down1lineMove cursor down one line.
<Meta-d>delwordforwDelete word ahead of cursor.
<Meta-greater>eofMove to end of buffer.
<Control-v>down1pageScroll down one page.
<Meta-f>forwwordMove cursor ahead one word.
<Control-f>forwcharMove cursor ahead one characer.
<Control-a>linestartMove cursor to beginning of line.
<Control-e>lineendMove cursor to end of line.
<Control-w>seldeleteCut the selection.
<Control-o>openlineOpen a new line after the cursor.
<Control-c><Control-c>sendMsgSend the draft.
<Control-y>selpastePaste the selection.
<Meta-t>transwordTranspose words.
<Control-t>transposeTranspose characters.
<Meta-v>up1pageScroll up one page.
<Control-p>up1lineMove cursor up one line.