{The `exmh' Mode

Introduction
The exmh mode of jedit is intended for composing email in conjunction with Brent Welch <welch@parc.xerox.com>'s excellent exmh mail reader, itself built upon MH.  When you're done composing your mail, the exmh mode communicates with the running copy of exmh that invoked it, causing exmh to pop up its confirmation panel and (if you so choose) send your mail.

This document describes the exmh mode available with version 4.0/4.0b of jedit.

Usage
To use exmh mode, set your editor to `jedit -mode exmh -for &' in exmh's `Editor Preferences' panel (accessed from the `Preferences' button).  exmh will strip off the ampersand and add its own name and then the name of the draft mail message file after the `-for' argument, and run jedit in the background.

When you tell jedit you're done with the message (by choosing `Done' or `Quit'), jedit will send the command `EditDialog filename' to exmh, where filename is the name of the draft message file.  That tells exmh to bring up the `What Now?' panel asking whether you want to send the message.

The MH Menu and the Buttonbar
The exmh mode provides a mode­specific `MH' menu and buttonbar.  The buttonbar duplicates the commands on the menu (with terser names); what I say here about the menu commands also applies to the buttons.

Start Reply
The `Start Reply' command inserts the contents of the file @ in the current directory at the end of the message.   (By MH convention, this should contain the message you're replying to.)  The header is stripped from the file, and it's indented to indicate it's a reply.  (See Bugs and Misfeatures.)

Sign Email
The `Sign Email' command inserts the contents of your ~/.signature file at the bottom of your mail.  (The signature is automatically inserted in a fixed­pitch font, in case you normally use a proportional font and you have ASCII graphics in your .signature, not that I recommend that practise. :-)

List Recipients
The `List Recipients' command saves your message and runs the MH whom(1) command on it, displaying the output.  This can sometimes be useful in identifying typos in email addresses.

Insert Border
The `Insert Border' command inserts a row of spaced asterisks into your message.  I sometimes use this when forwarding mail or copying snippets of files or a screen dump into mail.

Done
The `Done' command from the `Editor' menu is duplicated on the buttonbar for convenience, and on the `MH' menu for consistency.

The Tab Key
Hitting the Tab key while typing in your message takes you the first header field, whose contents are selected.  Hitting Tab again (not too quickly!) will cycle through the header fields.  If you have `Typing replaces selection' chosen on the jstools Global Preferences panel, this lets you easily fill in the header fields of your message.

Hitting Tab twice quickly, or hitting it when the last header field is selected, takes you directly to the end of your text.

Preferences
By default, the exmh mode displays breaks in long lines at character boundaries rather than just at word boundaries; this makes it a little easier to see if you have a line that's too long for email (assuming your window itself isn't too wide).  Also, exmh mode will automatically insert newlines for you as you approach the right margin.  (There are two different concepts here - whether real newlines are inserted, creating a new line even if you didn't hit the Return key, and how long lines are displayed on the screen.  When you're composing email, it's a good idea not to let your lines get any longer than about 72 characters.)

Of course, you can change these preferences on jedit's Mode­Specific Preferences panel.

See Also
	The `mh' Mode
	The `mail' Mode

Evolution
Bugs and Misfeatures
* Hardcoding Tab to jump to the header fields makes it hard to use dynamic abbreviations (or tabs, for that matter!).

* My quirky indentation style for quoting text should not be hardwired into exmh mode!  This (and possibly the use of Tab to jump to the headers) should be a user preference; that will require changes to jedit's mode­ and preference­handling mechanisms.

Future Directions
* I hope to add creeping features. :-)

* I'd like to add MIME support, either based on Brent's code in exmh's built­in editor, or based on code similar to that in jtagconvert.tcl.

* I'd like to put the headers on their own panel, separate from the body of the message.  Of course, I'd want to do this in a sufficiently general way not to prevent people from adding headers like `Precedence:', `X-Face:', or `X-Opcode-of-the-Week:' if they choose.
} {{{jdoc:xref:link {4.17 4.22 17.276 17.296 32.251 32.269 39.55 39.80 42.1 42.14 43.1 43.16 54.124 54.139}} {jdoc:xref:manpage {4.122 4.126 4.158 4.160 23.65 23.69}} {jdoc:anchor:anchorname {3.0 4.0 8.0 9.0 13.0 14.0 31.0 32.0 36.0 37.0 41.0 42.0 45.0 47.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.8 4.17 4.22 4.87 4.109 4.122 4.126 4.205 4.209 4.253 4.257 4.283 4.287 6.28 6.32 6.73 6.78 8.0 9.0 9.7 9.11 9.38 9.61 9.66 9.70 9.143 9.147 9.258 9.262 9.282 9.287 11.14 11.19 11.81 11.86 11.110 11.129 11.134 11.138 11.146 11.154 11.206 11.210 13.0 14.0 14.4 14.8 16.0 17.0 17.59 17.60 17.276 17.296 19.0 20.0 20.54 20.66 20.246 20.256 22.0 23.0 23.65 23.69 25.0 26.0 28.0 29.0 31.0 32.0 32.12 32.15 32.121 32.124 32.243 32.250 34.8 34.11 36.0 37.0 37.16 37.20 37.252 37.256 37.389 37.393 37.464 37.470 37.499 37.508 39.47 39.52 41.0 42.0 42.1 42.14 43.1 43.16 45.0 47.0 47.13 47.16 49.76 49.80 49.118 49.121 49.204 49.209 51.0 52.0 54.64 54.68 54.124 54.139 56.199 56.210 56.214 56.220 56.228 56.249 57.0}} {richtext:font:italic {11.121 11.129 11.146 11.154 37.389 37.393 37.499 37.508}} {richtext:font:bold {17.59 17.60 20.54 20.66 20.246 20.256 32.12 32.15 32.121 32.124 32.243 32.250 34.8 34.11 37.464 37.470 47.13 47.16 49.118 49.121 54.124 54.139}} {richtext:font:bolditalic {17.276 17.296 42.1 42.14 43.1 43.16}} {richtext:font:typewriter {4.4 4.8 4.17 4.22 4.87 4.109 4.122 4.126 4.205 4.209 4.253 4.257 4.283 4.287 6.28 6.32 6.73 6.78 9.7 9.11 9.38 9.61 9.66 9.70 9.143 9.147 9.258 9.262 9.282 9.287 11.14 11.19 11.81 11.86 11.110 11.121 11.134 11.138 11.206 11.210 14.4 14.8 23.65 23.69 37.16 37.20 37.252 37.256 39.47 39.52 49.76 49.80 49.204 49.209 54.64 54.68 56.199 56.210 56.214 56.220 56.228 56.249}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 8.0 9.0 13.0 14.0 31.0 32.0 36.0 37.0 41.0 42.0 45.0 46.0}} {richtext:font:heading2 {16.0 17.0 19.0 20.0 22.0 23.0 25.0 26.0 28.0 29.0 46.0 47.0 51.0 52.0}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:link:jedit.jdoc {4.17 4.22}} {jdoc:manpage:MH {4.158 4.160}} {jdoc:manpage:exmh {4.122 4.126}} {jdoc:link:#Bugs_and_Misfeatures {17.276 17.296}} {jdoc:manpage:whom {23.65 23.69}} {jdoc:link:panels/prefs.jdoc {32.251 32.269}} {jdoc:anchorname:The_Tab_Key {31.0 32.0}} {jdoc:anchorname:Preferences {36.0 37.0}} {jdoc:link:jedit.jdoc#Mode­Specific_Preferences {39.55 39.80}} {jdoc:anchorname:See_Also {41.0 42.0}} {jdoc:anchorname:Evolution {45.0 46.0}} {jdoc:anchorname:Usage {8.0 9.0}} {jdoc:link:jeditmodes/mh-mode.jdoc {42.1 42.14}} {jdoc:link:jeditmodes/mail-mode.jdoc {43.1 43.16}} {jdoc:link:jtagconvert.tcl.jdoc {54.124 54.139}} {jdoc:anchorname:The_MH_Menu_and_the_Buttonbar {13.0 14.0}} {jdoc:anchorname:Bugs_and_Misfeatures {46.0 47.0}}} {{matchend 25.13} {abbrevstart 4.111} {abbrevend 4.111} {insert 1.0} {matchstart 25.7} {anchor 17.288} {current 1.0}}}