NIU Department of Mathematical Sciences
Short Guide to elm

Starting elm

  denali 1 % elm [Return]
(answer `yes' to the questions which show up if this is the first time you use this program)

Most commands that can be used at various stages are described in the built-in help facility. Just hit [?] to enter help, and [?] again for the list of all commands (note that [?] means the question mark key; do not type the brackets!) Some of them are listed in this summary of elm commands.

Reading mail

Use the up and down cursor (arrow) keys to highlight the letter you want to look at. The right and left cursor keys move to the next/previous screenful of messages. You can also type the number of the message you want to move to, then press the [Return] key.

Once the right message is selected, you can open it by pressing [Return] or [Space]. If the letter is longer than one screen, it will be displayed using the standard more facility, in which you press [Space] to see the next screenful, or [q] to stop the display.

When you are done reading, press [i] (`index') or [q] to see the list of messages again. When you are at the index level, hitting [q] again will quit the program.


When elm starts, it displays the contents of your main mailbox where all the incoming messages end up initially. To sort letters into categories and logical groups, you can create separate `mini-mailboxes' (called `folders' in elm terminology). When a message is highlighted, hitting [s] (`save') will move it to a different mailbox.

The name of that mailbox is suggested by elm and derived from the sender's address. For example, if the letter to be saved is from, the name =ely will show up. The equals sign means that the folder ely will be put in the subdirectory Mail; this is the default place where elm stores folders.

You can change this by typing over the name suggested by elm. If you type =elizabeth, the message will be put in the file (folder) elizabeth inside the subdirectory Mail. If you type ely, the letter will be put in the file ely in the current directory, i.e. wherever you were when you started elm.

To tell elm to close the current folder and open another one, hit [c] (`change folder'), and type the name of the folder you want to open. The same conventions apply: =ely will mean folder (file) ely inside Mail, etc. You can use a path relative to your home directory, e.g. ~/Memos/Staff/ely. The main system mailbox has a special name: ! (exclamation mark).

To view the list of folders you can open, type * at the Change to which folder: prompt. To see all folders whose names begin with `el' inside the Mail subdirectory, type =el* at this point.

Note: Please take the time to learn manipulating folders from within mail. Avoid opening mail files with an editor! They have a special format which is likely to get messed up if you edit them directly.

Deleting, undeleting and printing

When a message is selected (highlighted) or open for reading, hitting [d] will delete it. A message marked for deletion can be `undeleted' by selecting it and pressing [u]. Since the cursor keys skip the messages marked for deletion, you will have to select it by typing the number of the message.

A highlighted or opened message can be printed by pressing [p]. This requires configuring your environment so that a preferred printer is set. Open the file .login in your home directory with your favorite editor, and add the line setenv PRINTER "m1" somewhere near the end (naturally you have to pick a suitable printer name, not necessarily m1). This setting will take effect next time you log in.

Composing mail

There are two main ways to do this. Pressing [m] will start a message from scratch, asking for the recipient, subject, etc. Another way is to hit [r] (`reply'); this will start a new message to the sender of the letter that is currently highlighted or open. In either case you will be put in an editor (most likely vi, unless you've changed the options).

When you quit the editor elm gives you a chance to edit the message again (hit [e]), view and/or change the headers such as the Subject or Cc (hit [h]), or abort the message ([f], `forget').

Advanced features

Some of the operations such as saving to a folder can be performed on groups of messages. Hitting [t] `tags' the highlighted message and puts a plus sign next to it in the index view. A command such as [s] (`save') will now apply to all the tagged messages.

You can create an alias for an address or a group of addresses which you use often. Hit [a] at the index level; you will enter the alias editing subsystem. Follow the instructions on the screen.

Some aspects of the configuration can be changed by hitting [o] (`options') at the index level. For example, to change the default editor to pico, which many people find simpler than vi, hit [e] while in the options submenu, and type pico. You then have to save the change by pressing [>].

All settings are stored in a file elmrc in the subdirectory .elm of your home directory. This file doesn't exist initially; you have to go to the `options' submenu and hit [>] to save options, even if you haven't changed any, for elmrc to be created. Once this is done, you can edit that file with an editor. This lets you change behavior of the program in many ways. Be careful, though: follow the instructions closely, and make a backup of the original file before editing it.

A useful companion to this or any other mail program is filter, which lets you specify the destination for incoming messages (including deletion!) depending on their sender, subject and so on. See man filter for more information.

Back to the NIU Math Department Web page

Last modified: 4/24/97 by