A Gentle Introduction to Emacspeak a quickstart for normal people Gary Lawrence Murphy President and CEO Teledynamics Communications Inc. 7 Forest Place Sauble Beach Ontario Canada garym@teledyn.com $Revision: 1.3 $ Copyright © 2000 by Teledynamics Communications Inc $Date: 2000/05/14 05:41:41 $ I hope you are listening to this and not reading it. This article is intended as the first introduction to using both EMACS and Emacspeak for non-technical people, and is installed as a default help page on the eyes-free machines configured by Teledynamics. The most current version of this document should be available online at The TCInc Emacspeak help page. _________________________________________________________________ prelude This is my first shot at a brief guide to help you up the learning cliff with Emacspeak. If you are listening to this file on a webpage, you can move through the tutorial using the N or P keys to hear it one section at a time. There is a ton of stuff you need to know to even begin using Emacspeak. Emacspeak is huge, it does email, web, news, plays games, keeps notes, calendars, writes computer languages, slices, dices and even makes a decent cup of coffee (honest). Comments, corrections and feedback are invited. Please contact Gary Murphy at gary m at t e l e d y n dot com. _________________________________________________________________ What is C-x and M-x? Two special keys are used for all emacspeak commands. All help pages call these the Control and Meta keys; on your PC, these are the Control and the Alt keys on the left and right side of the space bar. Alt is meta. Remember that. Note: Meta is also Escape: Emacs also allows you to press the escape key and then to press the second key, and quite often this is easier than trying to press both the Alt and some other key at the same time. "Meta" is directly beside the spacebar; there is an Alt key on both sides, but on most keyboards, only the left Alt key will work as the Meta key. Control is at the far left and far right (just like in politics). If your computer has a Microsoft Windows key between the Control and Alt keys, get a knife and remove it[1] . Get to know Control and Meta. In Emacspeak, Control and Meta are called C and M. For example, to exit emacspeak, you enter Control X followed by Control C. The guides will call this "C-x C-c". Don't Panic: If you have typed a command by mistake, type Control-G to cancel it. You can also type C-e l to re-read the current line. If the sound stops (or you get a lot of beeps and no voice) use C-n and C-p to go down one line and back up (this will restart the voice). A note to ViaVoice users: Sometimes the voice software overruns itself and jams solid. The voice will stop and nothing will restart it. Don't panic. Most often, you can restart the voice by pressing C-e s to restart the speech synthesizer; if you are using my configuration files, you can also press the Meta-Pause key to clear out the stuck voice processes. Your next N or P move will restart a fresh process and the voice will return. _________________________________________________________________ How to find more help: More help than you will ever read is started by pressing Meta-H or function key F1 for help. Press F1 twice (or C-h twice) to get help using help. C-h m Describe Mode lists all the key commands for the current mode. For example, if you are looking at your files list in dired-mode, C-h m will tell you to use D to mark a file for delete, E to edit that file, and many other file commands. C-h a This runs "Apropos" and asks for a word. It gives you a list of all commands which mention that word. C-h a save will list all commands which include the word "save" such as save-all-buffers. C-h k Describe Key is more useful than you think. It asks you to press a key and then describes what that key would do if you pressed it. C-h k C-x C-x says "exchange point and mark", whatever that means. _________________________________________________________________ Help for Emacs speak Emacs speak ads more commands and extensive help for the audio desktop. Most of these commands begin with Control E, that is "C-e". C-h C-e means describe-emacspeak and lists the Emacspeak commands available everywhere. C-e F runs emacspeak-view-emacspeak-faq which opens a new buffer on the Emacspeak FAQ (Frequently Asked Questions). Some of this information is horribly technical, but bear with it: The last half contains many useful tips. C-e C-h is emacspeak-learn-mode and enters a special mode where every key that you type is spoken but does nothing; you exit learn-mode with our old buddy, the C-g Cancel command. M-x emacspeak-generate-documentation asks for a filename where it will save an automatically generated summary of all Emacspeak commands. Finally, C-h t loads the Emacs Tutorial, a fairly complete beginner's guide to the basics of using Emacs. _________________________________________________________________ Moving Around A Page The arrow keys are arranged like an upside down T between the numeric keypad and the main keyboard. You can use those keys to move, but you will later find it more convenient to use the Control Keys. C-n Moves to next line. C-p Moves to previous line. C-f Moves forward one character. C-b Moves backward one character. C-v Moves down one "window" (also Page-Down) which jumps a block of lines; the number of lines depends on whether or not your screen is a single frame or split into two or more, and the old last line will always become the new first line. M-v Moves up one frame (also Page-Up). M-C-v Yes, Meta-Control-v, this will move the other frame down one frame full of text. This is very useful if the other frame is a help page. These commands are the same no matter what type of buffer you are using. When looking at your file list in dired-mode, forward and backward are not very useful, but they are still there. Remember: Backspace is not Delete Backspace will erase previous characters, the Delete key will erase the next characters, and arrow keys do not erase anything. Trying to delete characters on a protected page will give you an error message. Most emacspeak movement commands have a Meta version that is like the Control version but operates differently depending on what you are doing. For example, M-f moves forward one word, M-b moves back one word. Are you annoyed yet?: If you have followed this far, you have probably noticed some things which particularly annoy you. For example, Emacspeak may be reading all the punctuation marks, or speaking too fast, or making odd pauses all over the page. The good news is all of this can be changed. C-e d p changes the "punctuation mode" to let you switch between hearing all the marks (useful for proofreading), some of them, or none at all. I will add more in here when I have them. _________________________________________________________________ What are Buffers and Frames? Emacs came from the computer science labs at MIT; expect many geek words. For example, no matter what you are doing, the thing you are working on is called a buffer. A buffer is a magical imaginary place where stuff is kept. You could call it a workspace, a bit bucket or a page. Emacs calls it a buffer. You can open many buffers, one for email, one for writing, one for surfing the web, and you can move from one buffer to another. Buffers are not saved when you leave them, they are just off the air. Think of buffers as radio stations, not telephone calls. You can tune them in or tune them out, but you won't hang up on them until you save them and "kill buffer" to dump them. You tune in a buffer through a Frame. You can have many frames open, but you can only hear one at a time. Usually, you have only one or two frames (visual users see a split screen). If you have two open frames (on two different buffers or different places in the same buffer), you can switch between them and emacspeak will tell you the name of the buffer you have just entered. Example 1. An example of switching frames The Help pages, directory lists and info pages all open a new second frame to let you jump between the help and your work without losing your place in either frame. Emacspeak will start to read the help until you try to do something; then it returns to your main frame. Expect to be confused. Some buffers are silent. For example, if you copy files to some other computer, there is a hidden buffer where Emacs does this transfer. You will normally never hear these buffers, but you will find them listed in the buffer directory and may stumble into one, especially the buffer called "Messages". _________________________________________________________________ Essential Buffer Commands C-c C-b Shows a list of all open buffers. C-c b Change the buffer in this frame (press tab for a list). C-x C-s Asks to save any changed buffers. C-x s Save this buffer to its filename. C-x k Kill this buffer. _________________________________________________________________ Some Some Frame Commands C-x 0 close this frame (if two or more are open). C-x 1 make this frame the only frame and hide all others. C-x 2 split this frame into two frames (on the same buffer). You mean I have to remember all that?: Emacs understands. Emacs does so much, we couldn't leave you stranded trying to remember 50 keycodes: Almost every command is available from the "command" mode, and if you type M-x and then type the start of a command followed by the space, emacs will give you a list of "completions"; you can even press space to start to get the whole list of commands. M-x apropos can also be used to give you a list of all commands which mention some word; once you find a command and execute it the "hard way" using the M-x, Emacs will kindly remind you of the key sequence that would do the same thing. After a while, you start to remember them. _________________________________________________________________ Deleting text Buffers do not "erase" text. Text is "deleted", snipped out like cutting the middle section out of a string and sticking the two ends back together. C-d Deletes the next character. C-k Deletes the rest of the current line. _________________________________________________________________ The meta-delete keys are M-d Deletes the next word. _________________________________________________________________ Searching Emacs Pages Searching is probably the biggest advantage you have as a blind user of emacs; everyone can do this, but visual users tend to "overlook" the power of incremental search. You can search any page in Emacspeak by pressing C-s (Control S) and then, as you type the letters, Emacspeak will jump to what matches so far. When you type C-s, emacspeak will say "I-search:" and you can then enter the search string; Emacs will jump to the matches to what you type as you type it. You can then return to where you were by pressing C-x twice.For example, if you press C-s and then enter t-i you will move forward to . Searching Tips: When searching, use C-s to search, and when you find the line you want, press C-a to go to the start of the line, or C-f or C-b to go forward or back one letter. _________________________________________________________________ Command mode Many Emacs functions do not have a key-command. Emacs has thousands of commands and there are only so many keys you can remember. All emacs commands, even those already described, can be run by entering M-x. M-x will respond with command and let you type in the command name. In emacs commands and mode-line questions, you only type as much as you need, then press space to complete the command. Emacs will wait for you to press Enter to make certain this is the correct command. For example, you can enter M-x d e s c space and emacs will fill the line to say describe-; you can then type m o space and emacs will fill out the rest of the line to say "describe-mode". _________________________________________________________________ Emacs Info Mode C-h i Emacs Info mode is a pre-web form of hypertext page where certain words can be linked to other info pages. By tradition, most of the useful documents for your Emacspeak and your Linux system are available as info-pages. Navigating Info Pages: In the info pages, a * star marks jump point (called an 'anchor'); you may or may not hear this, but if you use the N and P keys, it will be obvious that you are over a link. Most title pages have anchors to an index of commands and an index of keys at the bottom of the page. _________________________________________________________________ A Full Working Example OK. Let's Send us some EMAIL! Yes, you are ready for email now. At the very least, you are ready to hear about it. Just keep chanting: "It is not so difficult. It is not so difficult." Your email and your internet discussion groups or newsgroups are read using the Emacs Gnus (G-N-U-S) reader. You start Gnus by M-x g n u s and hit Enter. If you are using my diald dialup configuration, Gnus will connect to your ISP to check for new messages and give you a list of all your discussion areas including your mailbox[2]. _________________________________________________________________ Sending an Email We'll send a message first: To send a message in gnus-mode, just type M for mail. This opens a new frame with a new empty mail message in the buffer; the first line to enter is the email address. We will send this to yourself, so enter your own email address, but don't hit Enter at the end. This is an unfortunate bit of visualization: You must press the down arrow instead to move to the Subject Line, then before you type the subject of press C-e to make sure you are at the end of that line. Here you can enter the subject of your message, and again, don't press Enter at the end. Moving around in a mail message: Emacspeak wouldn't leave you stranded: You can hop around in an email message using the "header select" keys, for example C-c C-f C-s will take you straight to the subject line. A faster way to enter email is to enter the email address, press C-c C-f C-s, enter the Subject, and then press M-> to jump over that seperator line. Instead of trying to twist your pinky for meta shift period, it is probably easier press escape, and then press shift-period. To complete the addressing of your email, you must press next-line (C-n or the down arrow) twice; there is a marker line in emacs email that says "text follows this line" and without that line (or if you mess it up) Emacs cannot split the buffer into address and message. Once you are clear of that splitter line, you can safely enter your message. Enter your message to yourself and press Control-C twice to send the message. That's it. You're done. If all goes well, you computer will dial in to your ISP and send your email message, then disconnect when the line is quiet. _________________________________________________________________ Receiving That Email Back at the Gnus *Group* window, press G to Get New Mail; if we are lucky, your email will be waiting for you. You can exit each group window and exit Gnus itself with the Q key. Normally you do not need to exit Gnus unless you are closing Emacs because it does not stay online and will not dial in until you press G to check for new messages. You can safely leave it running for your whole session. _________________________________________________________________ That's All That's my tutorial so far. Thank you for listening and I hope it has been helpful. Your comments for improving this guide are most welcome: Please send all feedback on this file to Gary Murphy at gary m at t e l e d y n dot com. _________________________________________________________________ Special Thanks This document would not be what it is if not for the patient and dilligent feedback from readers, members of the emacspeak mailing list, and especially Ann K. Parsons Victor Tsaran Jim Van Zandt Paul Stewart and of course, T. V. Raman, author of Emacspeak. Notes [1] If you do rip out the Microsoft key, don't throw it away. Emacspeak author T. V. Raman tells me he prefers to map that key as a hyper key that Emacspeak can use. [2] diald is a program by Eric Schenk which watches for Internet traffic requests and when they happen, automatically connects you to your ISP. When the line is quiet, it automatically disconnects again. Very cool, highly recommended. Diald will be distributed as part of the standard Mandrake Linux distribution on the next release.