BATMAIL - READING MAIL IN AN EDITOR(THIS IS AN EXAMPLE SCRIBE FILE, IT CAN BE FOUND IN /AFS/CS/USER/RITTER/PSY/PUBLIC/INTRO-BATMAIL.MS Frank Ritter Copyright 23 May 1991, Frank Ritter. Permission to copy and distribute for use at CMU granted freely as long as the following conditions are met: 1) I get half of your sale price, 2) any revisions are posted back to me. BatMail is an extension to GNU-Emacs for reading mail and bboards on the Andrew system. Refreshingly, the name BatMail was chosen not as an acronym, but "because it sounds cool...and provided a theme" [1]. It offers four advantages over most other mail readers: 1. mail and bboard headers are automatically displayed, 2. mail and bboards can be read concurrently, 3. it can be used from anywhere you can telnet or dialup from, 4. an editor is integrated, not just available. Batmail offers a rather concise and portable interface -- its only drawback is its power. It is more powerful because it is keystroke driven, not menu driven, but the help that is always available does mitigate this problem for more than casual users. Once the dozen or so most basic commands are memorized (presented in Appendix I), mail and bboards can be read and responded to very quickly. The lack of screen based menus allows BatMail to be run from any machine that a) runs Andrew, or b) allows you to telnet to an Andrew machine, or c) that can create links to /afs (i.e., mached Pmaxen like mine). How to startup BatMail To startup BatMail the first time type /afs/andrew/usr/cl0x/bin/batmail. Putting the commands below in your .cshrc file will define an alias for BatMail which will substantially cut down on your typing. Aliases for Emacs and for very fast mail reading (qmail and smail) are also defined below. You will have to replace the your-name-here with your user name. # you can also come into this Scribe file and copy with esc-w and # paste into your file with ^y alias batmail '/afs/andrew/usr/cl0x/bin/batmail' alias qmail 'head -50 /afs/andrew/usr/your-name-here/Mailbox/* | more' alias smail 'cat /afs/andrew/usr/your-name-here/Mailbox/* | more' alias gnu gnu-emacs alias emacs gnu-emacs You can also start up BatMail after you have entered Emacs if you put the commands in Appendix 2 in your .emacs. If these commands have been inserted, x batmail and x bat-send will start up BatMail, or allow you to send mail, respectively. Running BatMail in the CMU CS Environment. You can run BatMail on a CS workstation running Mach.(At least a PMAX and Vaxen anyhow.) BatMail is not available directly as a command that also starts up Emacs (although one could be written), but it can be started up within GNU-Emacs. In this case the extensions to the .emacs file to automatically load BatMail (Appendix 2) are required. There are two ways to direct BatMail to read your mail files in Andrew cell in afs while your home directory is in the CS cell.(Depending on whom you talk to, either you can't have mail sent directly to the CS cell, it's unreliable, or can't be backed up. In any case, you can't do it. If you learn how, though, of course, let John Myers and me know.) The simplest was is to insert AMShome: andrew.cmu.edu into the "preferences" file in your home directory in the CS cell. This method was suggested to me by Chris Koenigsberg. A slightly more complicated method, suggested by Chuck Silvers, is to create links from your CS directory to your Andrew directory. .AMS.prof, .AMS_aliases, .MESSAGES, and Mailbox all need links. Using them both in a belt-and-suspenders approach also works (which I do), but is not necessary. There is one difference between the two environments: mail copies are delivered more slowly from the CS environment. While running on Andrew, mail will be posted (and back to you with a bcc) often within 10 minutes. While running on a CS machine you will often experience delivery delays of several hours. When you post from a CS machine, you aren't running the mail delivery program called queuemail, which actually does the delivery. You mail will be picked up by a system postmaster about twice a day. If you really want mail to get there quickly, you can speed your mail by either posting originally on a andrew machine, or by sending a small mail to yourself from such a machine which will post all your letters out. Your incoming mail suffers no such delay. I gave up trying to get this to work, and just telnet to an andrew machine to send time critical mail, which turns out to be actually rather rare for me. How to use BatMail After you call BatMail, an Emacs window will be created on your screen or terminal. You will be queried about which bboards you want to read and their starting date. You can select the quite sensible defaults (all = *, and updates = those not read yet) by hitting each time you are queried. Two windows in the Emacs will appear. The larger top one is the message display area, the bottom a list of folders you are subscribed to, and by default, their current contents. You can move around as in Emacs with control characters. Typing will display the next message; typing "s" will allow you to compose mail. After you compose a message, ^X^S will send it. A very brief set of commands is presented in the mode line, a partial list of commands is presented in Appendix I, and a complete list of commands is available on-line by typing "?c". In addition to the bboards that you are initially subscribed to such as official.andrew, there are two bboards that all graduate students should read: the department bboard, and ego. You can subscribe to them by typing "S" and at the prompt typing their full names: org.psy.psychology and org.psy.ego. In addition to these two, there are hundreds of bboards that you could subscribe to. Be careful, it's easy to waste time reading too many, yet many of them do cover topics that are truly useful for your research and personal life. A sampling of my favorites are presented below. You can see complete listings of what's available by typing "L" and then giving one of the bboards or its first word, such as Andrew. You should assume that case is important. For work:. andrew.contributed org.cs.cogsci andrew.contributed.hints org.cs.cs andrew.hints org.cs.general andrew.hints.psy org.cs.scribe andrew.mac org.cs.soar-bugs andrew.ms.batmail org.cs.unix-announce andrew.programming.lisp org.cs.unix-forum andrew.programs.S org.psy.comphints andrew.programs.emacs org.psy.lisp andrew.programs.gnu-emacs org.psy.pdp andrew.programs.scribe org.psy.unix andrew.scribe internet.mac-digest assocs.mac-users-group internet.s-news cmu.mac news.sci.psychology.digest For pleasure:. assocs.ski-club org.cs.opinion cmu.market org.cs.sports magazines.humor.ckk netnews.pgh.general org.cs.film netnews.rec.humor.funny org.cs.market netnews.misc.consumers Extensions and Customization After you become comfortable using BatMail (or after you become annoyed with one of its so-called features), you may wish to change it to fit your needs. You can do this by putting commands in your .emacs file (which controls how Emacs is set up). An example set of commands to do this is available in /afs/psy/usr/fr07/ic/batmail.el and below in Appendix 2. A very simple command is (setq bat-exit-to-shell nil). If this is in your .emacs file, exiting BatMail will not exit Emacs -- handy if you use Emacs to do more than edit mail. Other commands in batmail.el support calling BatMail from within an Emacs started on its own. To learn more: If you want to learn more there are numerous sources of further information. 1. You can subscribe to the following related bulletin boards by typing S in the header window: andrew.ms.batmail and andrew.hints. 2. BatMail's modest help facilities are available by typing "?" in the header window. Separate screens are available for the commands, bat-variables, and optional hooks and files. An abbreviated version of the help on commands is presented as Appendix I. 3. Type "help networks-access" on Andrew to find out how to send mail to external networks. 4. Learning more about Emacs in general will significantly extend how easily you will be able to use BatMail. I. Key-bindings A more complete listing is available on-line by typing "?c". Normal keys: SPC Scroll forward in message or read next message n Read next message p Read previous message s Send mail r Reply to currently displayed message P Send to the current folder (i.e., post) a Append message to file v Scroll currently displayed message forward b Scroll currently displayed message backward Q Exit Batmail d Delete a message u d Undelete a message S Subscribe to folder L List all folders under this one / Punt (goto end, mark all messages read) this folder II. .emacs File Additions A more complete listing is available on-line by typing "?c". ; automatically load BatMail if a bat command is called (autoload 'batmail "/afs/andrew/usr0/cl0x/batcave/el/batmail" nil t) (autoload 'bat-send "/afs/andrew/usr0/cl0x/batcave/el/batmail" nil t) ; set defaults for released version of BatMail (setq bat-yow-sources "") ;turn off zippy comments in the comment line (setq bat-exit-to-shell nil) ; don't quit Emacs if you quit BatMail References [1] Bader, Miles. Personal communication. 1990 Table of Contents I. Key-bindings 2 II. .emacs File Additions 2