Emacspeak User's Manual --2nd Edition.

User Manual

T. V. Raman


Table of Contents


Copyright

This manual documents Emacspeak, a speech extension to Emacs.

Copyright (C)1994 -- 1998 T. V. Raman All Rights Reserved.

Permission is granted to make and distribute verbatim copies of this manual without charge provided the copyright notice and this permission notice are preserved on all copies.

@title Emacspeak --The Complete Audio Desktop Copyright (C) 1994--1998 T. V. Raman. All Rights Reserved.

Permission is granted to make and distribute verbatim copies of this manual without charge provided the copyright notice and this permission notice are preserved on all copies.

Announcing Emacspeak Manual 2nd Edition As An Open Source Project

This is to announce the launch of a new open source project to create a user manual for Emacspeak --an Emacs speech extension that provides a complete audio desktop.

How To Contribute To This Manual

This manual is organized as a series of chapters, with each chapter in a separate file. If you feel capable of contributing to a specific section, send out a message to the Emacspeak mailing list emacspeak@cs.vassar.edu. You can then start adding content to a local copy of the chapter to which you are contributing. When you feel you have something to submit, mail out the file to the emacspeak mailing list-- I'll integrate new content as it comes in.

Authoring Guidelines

For this manual to hang together and make sense to the new user at whom it is targetted, contributors need to stick to a consistent style. If you plan to contribute content, you should take some time to read the existing sections --note that many of these are skeletal and the first contributions will be to flesh these sections out.

If you are familiar with texinfo, go ahead and mark up your content using texinfo. If you are not, simply author the documentation you create as plain formatted ASCII. If you do submit files as texinfo source, make sure to validate them at your end first by running the files through makeinfo --badly created or malformed texinfo source takes more time to fix than marking up straight text.

Credits

This initial version draws heavily from the original Emacspeak user manual, and includes contributions from Jim Van Zandt and Jason White. Authors who contribute complete sections will be acknowledged here as well as in the specific section they author.

Introduction

Emacspeak provides a complete audio desktop by speech-enabling all of Emacs.

In the past, screen reading programs have allowed visually impaired users to get feedback using synthesized speech. Such programs have been commercially available for well over a decade. Most of them run on PC's under DOS, and these are now moving over to the Windows environment. However, screen-readers for the UNIX environment have been conspicuous in their absence.

This means that most visually impaired computer users face the additional handicap of being OS-impaired -- a far more serious problem:-)

Emacspeak is an emacs subsystem that provides complete speech access. Emacspeak will always have the shortcoming that it will only work under Emacs. This said, there is very little that cannot be done inside Emacs, so it's not a real shortcoming!

Emacspeak does have a significant advantage: since it runs inside Emacs, a structure-sensitive, fully customizable editor, Emacspeak has more context-specific information about what it is speaking than its commercial counterparts. In this sense, Emacspeak is not a "screenreader", it is a subsystem that produces speech output. A traditional screen-reader speaks the content of the screen, leaving it to the user to interpret the visually laid-out information. Emacspeak, on the other hand, treats speech as a first-class output modality; it speaks the information in a manner that is easy to comprehend when listening.

The basic concepts used by Emacspeak are simple; all interactive Emacs commands have been adapted to provide speech feedback. Hence, a user can just use Emacs as she normally would; Emacspeak works behind the scene to give audio feedback in addition to updating the screen.

Emacspeak consists of a core speech system that provides speech and audio services to the rest of the Emacspeak desktop; application-specific extensions provide context-specific spoken feedback

using these services. Emacspeak currently comes with speech extensions for several popular Emacs subsystems and editing modes. I would like to thank their respective authors for their wonderful work which makes Emacs more than a text editor(1).

Installation Instructions

This chapter gives brief and detailed installation instructions. for configuring, installing and starting Emacspeak.

Obtaining Emacspeak

Emacspeak is available on the Internet at:

WWW
http://cs.cornell.edu/home/raman/emacspeak/
FTP
ftp://ftp.cs.cornell.edu/pub/raman/emacspeak
Mail List
emacspeak@cs.vassar.edu
List Request
emacspeak-request@cs.vassar.edu

The Emacspeak mailing list is maintained by Greg E. Priest-Dorman. If you are using Emacspeak, you can join the list by sending mail to the request address.

Quick Installation

Here are the quick installation instructions. See the next section for detailed installation instructions.

Configuring and Installing Emacspeak

Note: You need GNU Emacs 20.2 or later for using newer versions of Emacspeak.

The speech server for the Dectalk is written in TclX. (For example, see the source file `dtk-exp').

Configure the source files by typing `make config'. At this point you can check that the speech server is correctly configured by typing

tcl dtk-exp

(assuming you are using the Dectalk Express). You should hear the Dectalk speak and get a TCL prompt if everything is okay.

If you're feeling paranoid, you can perform a couple of additional tests at this point. Execute the following commands in the running tcl session you just started above. (Most users will not need to do this; it is a sanity check and is useful in tracking problems, especially if you find emacspeak beginning to talk and then immediately fall silent.)

Quit this TCL session by typing control-D.

Next, compile the elisp files by typing

make emacspeak

Finally, install the documentation and executable files by typing

make PREFIX=<prefix> install 

The speech server program and/or output port can also be specified at run time by setting the shell environment variables DTK_PROGRAM and DTK_PORT. Examples: If using csh or tcsh

setenv DTK_PROGRAM "dtk-exp"

if using sh or bash

DTK_PROGRAM=dtk-exp
export DTK_PROGRAM

Similarly,

DTK_PORT=/dev/ttyS0

You can always set these variables from a running Emacs session by executing the Emacs setenv command.

Basic Usage.

This chapter gives an overview of how to use Emacspeak. Note: This documentation should be used in conjunction with the online Emacs info pages that extensively document Emacs itself. These sections briefly describe the speech-enabling extensions. However, they should not be considered a substitute for reading the Emacs manual. How successfully you use Emacspeak will depend on how well you learn your Emacs.

All Emacs navigation and editing commands have been speech enabled. Thus, moving to the next or previous word, line or paragraph results in the text around point being spoken. Exactly how much text is spoken is determined by the amount by which you moved.

In addition, Emacspeak provides basic reading functions that can be invoked to listen to chunks of text without moving.

Overview of Emacspeak

Emacspeak provides a small number of core services around which the remainder of the audio interface is constructed. These essential features of the software are briefly outlined in the following paragraphs; the commands by which they can be controlled will be described later in the manual.

Apart from providing a fluent spoken interface to all of Emacs' basic editing functions, Emacspeak also includes software modules which add speech feedback to a range of applications that can be run from within Emacs. In this sense, Emacspeak amounts to much more than a talking text editor; indeed, it can more aptly be characterized as a true "audio desktop", in which speech is treated as a first-class output modality.

Emacspeak implements a special minor mode, known as "voice lock mode" (see section Voice Lock Mode) which uses distinct speech characteristics to provide aural highlighting of specific textual constructs, such as comments in program code, quoted strings and reserved words. This facility is further extended when Emacspeak is used with the W3 World Wide Web browser, to enable the semantic and structural distinctions captured by the HTML markup to be communicated efficiently.

It is often desirable to exercise control over the pronunciation of a word (E.G. a technical term or a reserved word in a programming language) within specific contexts. Emacspeak maintains pronunciation dictionaries for this purpose, which may be customized by the user. Moreover, individual dictionaries can be activated selectively, depending for example on the current major mode or the name of the file which is being visited.

In addition to spoken feedback, Emacspeak can generate "auditory icons"---short sound cues which alert the user to significant events, for example the opening or deletion of a file, the completion of an action, the arrival of an electronic mail message or the creation of a completion buffer. Sound cues act as a supplement to the spoken interface, and are especially valuable to the experienced user in facilitating rapid interaction. Note that in order to support auditory icons, the computer must be equipped with sound hardware for which the operating system has been correctly configured.

Working In Emacs Buffers.

While typing in an Emacs buffer, hitting space speaks the recently typed word. I use completion all the time; so Emacspeak will speak the completion just inserted as well as the next possible completion. In Emacs, use load-library ret completion ret for loading the completion package.

The standard Emacs prompting functions have also been speech-enabled. Emacs prompts with available lists of completions in response to partial input wherever appropriate --all forms of completion provide speech feedback.

In addition, Emacspeak provides a number of commands for reading portions of the current buffer, getting status information, and modifying Emacspeak's state.

All of the commands are documented in the subsequent sections. They can be classified into types:

Emacs has extensive online help; so does emacspeak. Please use it.

This info manual is only to get you started. You can get a summary of Emacspeak's features by pressing Control-h Control-e

Reading Without Moving The Cursor.

Emacspeak speaks information as you move around within a buffer. How much text is spoken depends on how you move, thus, when you move by words, you hear the current word; when you move by paragraphs, you hear the current paragraph spoken. In addition, the following commands allow you to listen to information without moving point (point is emacs terminology for the editing cursor).

Reading without moving point:

@kindex control e c
control e c
emacspeak-speak-char Speak character under point. Pronounces character phonetically unless called with a PREFIX arg. @kindex control e w
control e w
emacspeak-speak-word Speak current word. With prefix ARG, speaks the rest of the word from point. Negative prefix arg speaks from start of word to point. If executed on the same buffer position a second time, the word is spelt instead of being spoken. @kindex control e l
control e l
emacspeak-speak-line Speaks current line. With prefix ARG, speaks the rest of the line from point. Negative prefix optional arg speaks from start of line to point. Voicifies if option `voice-lock-mode' is on. Indicates indentation with a tone if audio indentation is in use. Indicates position of point with an aural highlight if option `emacspeak-show-point' is turned on --see command `emacspeak-show-point' bound to M-x emacspeak-show-point. Lines that start hidden blocks of text, e.g. outline header lines, or header lines of blocks created by command `emacspeak-hide-or-expose-block' are indicated with auditory icon ellipses. @kindex control e up
control e up
emacspeak-read-previous-line Read previous line, specified by an offset, without moving. Default is to read the previous line. @kindex control e down
control e down
emacspeak-read-next-line Read next line, specified by an offset, without moving. Default is to read the next line. @kindex control e {
control e {
emacspeak-speak-paragraph Speak paragraph. With prefix arg, speaks rest of current paragraph. Negative prefix arg will read from start of current paragraph to point. If voice-lock-mode is on, then it will use any defined personality. @kindex control e r
control e r
emacspeak-speak-region Speak current region delimited by point and mark. When called from a program, argument START and END specify region to speak. @kindex control e cap R
control e cap R
emacspeak-speak-rectangle Speak a rectangle of text. Rectangle is delimited by point and mark. When call from a program, arguments specify the START and END of the rectangle. @kindex control e b
control e b
emacspeak-speak-buffer Speak current buffer contents. With prefix ARG, speaks the rest of the buffer from point. Negative prefix arg speaks from start of buffer to point. If voice lock mode is on, the paragraphs in the buffer are voice annotated first, see command `emacspeak-speak-voice-annotate-paragraphs'. @kindex control e n
control e n
emacspeak-speak-rest-of-buffer Speak remainder of the buffer starting at point @kindex control e /
control e /
emacspeak-speak-this-buffer-other-window-display Speak this buffer as displayed in a different frame. Emacs allows you to display the same buffer in multiple windows or frames. These different windows can display different portions of the buffer. This is equivalent to leaving a book open at places at once. This command allows you to listen to the places where you have left the book open. The number used to invoke this command specifies which of the displays you wish to speak. Typically you will have two or at most three such displays open. The current display is 0, the next is 1, and so on. Optional argument ARG specifies the display to speak. @kindex control e left
control e left
emacspeak-speak-this-buffer-previous-display Speak this buffer as displayed in a `previous' window. See documentation for command `emacspeak-speak-this-buffer-other-window-display' for the meaning of `previous'. @kindex control e right
control e right
emacspeak-speak-this-buffer-next-display Speak this buffer as displayed in a `previous' window. See documentation for command `emacspeak-speak-this-buffer-other-window-display' for the meaning of `previous'. @kindex control e 9 control e 8 control e 7 control e 6 control e 5 control e 4 control e 3 control e 2 control e 1 control e 0 @kindex control e [
control e [
emacspeak-speak-page Speak a page. With prefix ARG, speaks rest of current page. Negative prefix arg will read from start of current page to point. If option `voice-lock-mode' is on, then it will use any defined personality.
control e 9 control e 8 control e 7 control e 6 control e 5 control e 4 control e 3 control e 2 control e 1 control e 0
emacspeak-speak-predefined-window Speak one of the first 10 windows on the screen. In general, you'll never have Emacs split the screen into more than two or three. Argument ARG determines the 'other' window to speak. Speaks entire window irrespective of point. Semantics of `other' is the same as for the builtin Emacs command `other-window'. @kindex control e control n
control e control n
emacspeak-speak-next-window Speak the next window. @kindex control e control p
control e control p
emacspeak-speak-previous-window Speak the previous window. @kindex control e control o
control e control o
emacspeak-speak-other-window Speak contents of `other' window. Speaks entire window irrespective of point. Semantics of `other' is the same as for the builtin Emacs command `other-window'. Optional argument ARG specifies `other' window to speak. @kindex ESCAPE up
ESCAPE up
emacspeak-owindow-previous-line Move to the next line in the other window and speak it. Numeric prefix arg COUNT specifies number of lines to move. @kindex ESCAPE down
ESCAPE down
emacspeak-owindow-next-line Move to the next line in the other window and speak it. Numeric prefix arg COUNT can specify number of lines to move. @kindex ESCAPE next
ESCAPE next
emacspeak-owindow-scroll-up Scroll up the window that command `other-window' would move to. Speak the window contents after scrolling. @kindex ESCAPE prior
ESCAPE prior
emacspeak-owindow-scroll-down Scroll down the window that command `other-window' would move to. Speak the window contents after scrolling. @kindex control e '
control e '
emacspeak-speak-sexp Speak current sexp. With prefix ARG, speaks the rest of the sexp from point. Negative prefix arg speaks from start of sexp to point. If option `voice-lock-mode' is on, then uses the personality. @kindex control e meta control
control e meta control
emacspeak-speak-spaces-at-point Speak the white space at point.

Speech System Commands

This section documents Emacspeak's various user commands for controlling the text to speech (TTS) system.

Character, Word And Line Echo.

By default, Emacspeak speaks characters as they are typed --this is called character echo; Words are spoken as they are completed --this is called word echo. Emacspeak can also optionally speak each line as it is typed --this is called line echo.

Character, word and line echo can be toggled --either in the current buffer-- or for all buffers (globally). To toggle the specific echo functionality for all buffers, precede the specific command with C-u. Note that in the documentation below, this use of C-u is indicated using the common Emacs terminology of prefix arg or interactive prefix arg.

@kindex control e d k
control e d k
emacspeak-toggle-character-echo Toggle state of Emacspeak character echo. Interactive PREFIX arg means toggle the global default value, and then set the current local value to the result. @kindex control e d w
control e d w
emacspeak-toggle-word-echo Toggle state of Emacspeak word echo. Interactive PREFIX arg means toggle the global default value, and then set the current local value to the result. @kindex control e d l
control e d l
emacspeak-toggle-line-echo Toggle state of Emacspeak line echo. Interactive PREFIX arg means toggle the global default value, and then set the current local value to the result.

Setting Various Characteristics Of Speech Output.

Emacspeak user commands can set different characteristics of the speech output such as speech rate and punctuations mode.

Emacspeak provides a number of settings that affect how attributes of the text such as capitalization are conveyed. These include settings that produce a short tone for each upper case letter, as well as a smart mode for speaking mixed case words which is especially useful when programming. These settings can be made locally in a given buffer or be applied to all buffers by preceding these commands with C-u.

@kindex control e d r
control e d r
dtk-set-rate Set speaking RATE for the tts. Interactive PREFIX arg means set the global default value, and then set the current local value to the result. @kindex control e d f
control e d f
dtk-set-character-scale Set scale FACTOR for speech rate. Speech rate is scaled by this factor when speaking characters. Interactive PREFIX arg means set the global default value, and then set the current local value to the result. This function is advised. Before-advice `emacspeak-auto': Automatically defined advice to speak interactive prompts. @kindex control e d 9 control e d 8 control e d 7 control e d 6 control e d 5 control e d 4 control e d 3 control e d 2 control e d 1 control e d 0
control e d 9 control e d 8 control e d 7 control e d 6 control e d 5 control e d 4 control e d 3 control e d 2 control e d 1 control e d 0
dtk-set-predefined-speech-rate Set speech rate to one of nine predefined levels. Interactive PREFIX arg says to set the rate globally. @kindex control e d p
control e d p
dtk-set-punctuations Set punctuation mode to MODE. Possible values are `some', `all', or `none'. Interactive PREFIX arg means set the global default value, and then set the current local value to the result. @kindex control e d m
control e d m
dtk-set-pronunciation-mode Set pronunciation MODE. This command is valid only for newer Dectalks, e.g. the Dectalk Express. Possible values are `math, name, europe, spell', all of which can be turned on or off. Argument STATE specifies new state. @kindex control e d s
control e d s
dtk-toggle-split-caps Toggle split caps mode. Split caps mode is useful when reading Hungarian notation in program source code. Interactive PREFIX arg means toggle the global default value, and then set the current local value to the result. @kindex control e d c
control e d c
dtk-toggle-capitalization Toggle capitalization. when set, capitalization is indicated by a short beep. Interactive PREFIX arg means toggle the global default value, and then set the current local value to the result. @kindex control e d cap C
control e d cap C
dtk-toggle-allcaps-beep Toggle allcaps-beep. when set, allcaps words are indicated by a short beep. Interactive PREFIX arg means toggle the global default value, and then set the current local value to the result. Note that allcaps-beep is a very useful thing when programming. However it is irritating to have it on when reading documents.

In addition, Emacspeak can convey the indentation of lines as they are spoken-- this is relevant when programming and is the default when working with program source.

@kindex control e d i
control e d i
emacspeak-toggle-audio-indentation Toggle state of Emacspeak audio indentation. Interactive PREFIX arg means toggle the global default value, and then set the current local value to the result. Specifying the method of indentation as `tones' results in the Dectalk producing a tone whose length is a function of the line's indentation. Specifying `speak' results in the number of initial spaces being spoken. Indentation feedback style is set by option emacspeak-audio-indentation-method The default value is "speak" See variable `emacspeak-audio-indentation-methods' for possible values. Automatically becomes local in any buffer where it is set.

Miscellaneous Speech Commands

Speech can be stopped using command dtk-stop --though in normal use, the action of moving the cursor will stop ongoing speech. Speech can also be paused and resumed. The speech server can be stopped and restarted for cases where the user wants to switch to a different server --or in teh rare case to nuke a runaway speech server.

@kindex pause control e s
Control e s
dtk-stop Stop speech now. @kindex control e p
control e p
dtk-pause Pause ongoing speech. The speech can be resumed with command `dtk-resume' normally bound to C-e SPC. Pausing speech is useful when one needs to perform a few actions before continuing to read a large document. Emacspeak gives you speech feedback as usual once speech has been paused. `dtk-resume' continues the interrupted speech irrespective of the buffer in which it is executed. Optional PREFIX arg flushes any previously paused speech. @kindex control e SPACE
control e SPACE
dtk-resume Resume paused speech. This command resumes speech that has been suspended by executing command `dtk-pause' bound to C-e p. If speech has not been paused, and variable `dtk-resume-should-toggle' is t then this command will pause ongoing speech. @kindex control e d q
control e d q
dtk-toggle-quiet Toggle state of the speech device between being quiet and talkative. Useful if you want to continue using an Emacs session that has emacspeak loaded but wish to make the speech shut up. Optional argument PREFIX specifies whether speech is turned off in the current buffer or in all buffers. @kindex control e control s
control e control s
dtk-emergency-restart Use this to nuke the currently running dtk server and restart it. Useful if you want to switch to another synthesizer while emacspeak is running. Also useful for emergency stopping of speech.

Finally, here are the remaining commands available via the TTS related keymap C-e d.

@kindex control e d a
control e d a
dtk-add-cleanup-pattern Add this pattern to the list of repeating patterns that are cleaned up. Optional interactive prefix arg DELETEs this pattern if previously added. Cleaning up repeated patterns results in emacspeak speaking the pattern followed by a repeat count instead of speaking all the characters making up the pattern. Thus, by adding the repeating pattern `.' (this is already added by default) emacspeak will say "aw fifteen dot" when speaking the string "..............." instead of "period period period period ". @kindex control e d d
control e d d
dtk-select-server Select a speech server interactively. This will be the server that is used when you next call either M-x dtk-initialize or C-e C-s. Argument PROGRAM specifies the speech server program. @kindex control e d SPACE
control e d SPACE
dtk-toggle-splitting-on-white-space Toggle splitting of speech on white space. This affects the internal state of emacspeak that decides if we split text purely by clause boundaries, or also include whitespace. By default, emacspeak sends a clause at a time to the speech device. This produces fluent speech for normal use. However in modes such as `shell-mode' and some programming language modes, clause markers appear infrequently, and this can result in large amounts of text being sent to the speech device at once, making the system unresponsive when asked to stop talking. Splitting on white space makes emacspeak's stop command responsive. However, when splitting on white space, the speech sounds choppy since the synthesizer is getting a word at a time. @kindex control e d RETURN
control e d RETURN
dtk-set-chunk-separator-syntax Interactively set how text is split in chunks. See the Emacs documentation on syntax tables for details on how characters are classified into various syntactic classes. Argument S specifies the syntax class. @kindex control e d t
control e d t
emacspeak-dial-dtk Prompt for and dial a phone NUMBER with the Dectalk. @kindex control e d cap V
control e d cap V
emacspeak-dtk-speak-version Use this to find out which version of the TTS firmware you are running. @kindex control e d z
control e d z
emacspeak-zap-dtk Send this command to the TTS engine directly.

Voice Lock Mode

The status of voice lock mode can be toggled on and off by issuing the command C-e d v (M-x voice-lock-mode). With a prefix arg, this function applies globally; otherwise, it is local to the current buffer. To have voice lock mode activated automatically when Emacspeak starts, include the following code in your `.emacs' file:

(add-hook 'emacs-lisp-mode-hook
'turn-on-voice-lock)

Alternatively, Emacspeak can be set to enable voice lock automatically in all of the major modes that support it. To do so, insert the following statement into your Emacs initialization file:

(global-voice-lock-mode t)

Note that the list of major modes in which global-voice-lock-mode will provide automatic activation is specified in the variable voice-lock-global-modes.

The characteristics of the different voice personalities deployed by voice lock mode vary according to the capabilities of the speech synthesizer. The definitions applicable to the Dectalk family of synthesizers are contained in `dtk-voices.el', which is supplied as part of the Emacspeak distribution.

Using voice lock mode, Emacspeak also supports many of the aural style properties defined in level 2 of the World Wide Web Consortium's Cascading Style Sheet specification (see http://www.w3.org/TR/REC-CSS2/. Thus, when Emacspeak is running in conjunction with a cooperating user agent, such as William Perry's Emacspeak/W3 web browser, the rendering of HTML documents can be regulated by style sheets. Examples of style rules which employ the CSS audio properties can be found in the default style sheet which is supplied in the Emacs/W3 distribution.

Commands For Speaking Status Information.

The following commands provide miscellaneous information.

@kindex control e a
control e a
emacspeak-speak-message-again Speak the last message from Emacs once again. @kindex control e m
control e m
emacspeak-speak-mode-line Speak the mode-line. @kindex control e cap M
control e cap M
emacspeak-speak-minor-mode-line Speak the minor mode-information. @kindex control e control w
control e control w
emacspeak-speak-window-information Speaks information about current windows. @kindex control e t
control e t
emacspeak-speak-time Speak the time. @kindex control e v
control e v
emacspeak-speak-version Announce version information for running emacspeak. @kindex control e f
control e f
emacspeak-speak-buffer-filename Speak name of file being visited in current buffer. Speak default directory if invoked in a dired buffer, or when the buffer is not visiting any file. @kindex control e h
control e h
emacspeak-speak-help Speak help buffer if one present. With prefix arg, speaks the rest of the buffer from point. Negative prefix arg speaks from start of buffer to point. @kindex control e k
control e k
emacspeak-speak-current-kill Speak the current kill entry. This is the text that will be yanked in by the next C-y. Prefix numeric arg, COUNT, specifies that the text that will be yanked as a result of a C-y followed by count-1 M-y be spoken. The kill number that is spoken says what numeric prefix arg to give to command yank. @kindex control e x
control e x
emacspeak-view-register Display the contents of a register, and then speak it. @kindex control e control
control e control
emacspeak-speak-current-mark Speak the line containing the mark. With no argument, speaks the line containing the mark--this is where `exchange-point-and-mark' C-x C-x would jump. Numeric prefix arg 'COUNT' speaks line containing mark 'n' where 'n' is one less than the number of times one has to jump using `set-mark-command' to get to this marked position. The location of the mark is indicated by an aural highlight achieved by a change in voice personality. @kindex control e control l
control e control l
emacspeak-speak-line-number Speak the line number of the current line. @kindex control e =
control e =
emacspeak-speak-current-column Speak the current column. @kindex control e %
control e %
emacspeak-speak-current-percentage Announce the percentage into the current buffer.

The Emacspeak Audio Desktop.

This chapter describes the Emacspeak audio desktop and gives tips and tricks for making use of many of Emacs' powerful features.

The desktop is the work area where you organize the tools of your trade and the information objects relevant to your current activities. In the conventional world of visual GUI-based computing, these tools and information objects manifest themselves as a collection of icons organized in a two-dimensional work-area --this organization is designed to place frequently used objects within easy reach.

Notice that organizing one's work area in terms of visual icons arranged in a two-dimensional area where such an organization is optimized for the available "conversational gestures" of pointing and clicking is an artifact of visual interaction.

In the spirit of a truly speech-enabled application, Emacspeak does not simply provide you spoken access to a particular presentation of your work environment that was initially designed with the "sign language" of visual interaction in mind. Instead, Emacspeak enables you to work with documents and other information objects in a manner that is optimized to aural, eyes-free interaction. A necessary consequence of this setup is that users accustomed to the purely visual manifestation of today's electronic desktop do not immediately perceive the Emacspeak environment as an electronic desktop. This section of the manual hopes to introduce you to a work-style that encourages a different perspective on how one interacts with the computer in performing day-to-day computing tasks.

The end result in my case has been a marked increase in personal productivity.

@section Objects Making Up The Emacspeak Desktop

A "buffer" is the basic building block of the Emacs and hence the Emacspeak desktop. Any information presented by Emacs is placed in a "buffer". For example, when perusing this manual within Emacs, the "file" containing the documentation is presented in a "buffer". All information objects such as WWW pages, email messages, output from user interaction with command-line shells etc., are presented by Emacs in individual "buffers".

Buffers provide a base level of user interaction; Emacs derives its power by allowing applications to specialize buffers to enable specific types of user-interaction that is optimized for a specific class of information.

@section An Object-Oriented Desktop

The basic "buffer object" can be specialized by Emacs applications to provide optimal interaction. This kind of specialization makes the Emacs environment an object-oriented environment; thus, the basic conversational gesture of "move to the next statement" can be assigned behavior that is appropriate to the content that the user is currently navigating. As an example of such specialization, Emacs provides "specialized modes" for working with English text, programming languages, markup source e.g. HTML or LaTeX documents and so on.

@section Emacspeak Specializes Aural Interaction

The content-specific user interaction described above is a very powerful feature of Emacs, and this is where Emacspeak derives its power. Traditionally, the ability to create buffers specialized for working with specific content-types has been used by the Emacs community to develop versatile programming environments, messaging applications such as mail and news readers, and authoring environments. The clean design present in all of these Emacs extensions in terms of separating application functionality from the user-interface, combined with the availability of the entire source code making up these packages under the open-source model has laid the ground-work for developing Emacspeak as a versatile aural counterpart to the product of years of software engineering that has been invested by the Emacs community. In short, Emacspeak would not exist in its present shape or form without this prior effort.

Audio Formatted Output

Emacspeak takes advantage of the content-specific knowledge available within specialized buffers to produce "audio formatted" output designed to optimize user interaction. A basic consequence of the above is "voice locking" in specialized modes; a more interesting consequence is the implementation of Aural Cascading Style Sheets (ACSS) in conjunction with the Emacs W3 browser.

@subsection Structured Navigation:

Emacspeak also exploits content-specific knowledge to provide structured navigation of different types of electronic content. In many cases, such structured navigation is an extension of what Emacs provides by default; in other cases, Emacspeak implements the necessary extensions to provide the level of structural navigation needed to work efficiently in an eyes-free environment.

Notable among such structured navigation is Emacs' powerful outline feature. Notice for example, that the Emacspeak FAQ (reached via command emacspeak-view-emacspeak-faq bound to C-e F) takes advantage of Emacs' outline mode to allow you to easily move through the various sections. An example of content-sensitive navigation is provided by the imenu package which dynamically creates a "table of contents" based on the content that is being displayed in a given buffer.

Navigating The Desktop

In addition to navigating individual information objects, the Emacspeak environment provides speech-enabled navigation of the various buffers that are currently open on the Emacspeak desktop via Emacs' built-in list-buffers feature. Emacs' dired --directory editor-- for browsing the file system, along with the new speedbar package that combines features from dired and imenu round off the suite of navigational tools.

Everything Is Searchable:

Emacs derives one final advantage from using buffers as the basic building block for the entire desktop. Every Emacs buffer is searchable via a uniform and powerful search interface. Emacs' incremental search works efficiently and consistently to enable you locate "objects" of interest either within a given document or to locate a given object from amongst the various objects that are currently open on the Emacspeak desktop. This is very powerful --where a GUI user is typically limited to quickly locating an object from a relatively small collection --the size of the collection being a direct function of available display real-estate-- the Emacspeak user can typically work with a far larger collection of objects. This is well-suited to the eyes-free environment, where display real-estate has no meaning; so bringing up a list of currently open buffers and performing an incremental search to locate a specific buffer is just as efficient independent of whether you have a few dozen or a few hundred buffers open.

To illustrate the above, my typical working Emacs session lasts between two and three weeks-- over that time I typically accumulate several hundred open buffers holding a large variety of content ranging from program source code to email messages and WWW pages.

Ubiquitous search in the eyes-free environment is critical-- as a comparison, when using a conventional, purely visual WWW browser, users have no means of easily "searching" for say the "submit" button on a WWW page. This inability is a minor annoyance in visual interaction, and the typical mouse-enabled user never uses the find dialog to find a submit button-- it is simply more efficient to point at the submit button given the eye's ability to quickly scan the two-dimensional display. This luxury is absent in an eyes-free environment; as a consequence, blind users confronted by the combination of a visual interface and screen-reader are typically limited to either tabbing through all the controls on a WWW page, or using the sub-optimal find dialog.

Using Online Help With Emacspeak.

Emacs provides an extensive online help system for helping you learn about various aspects of using Emacs. Emacspeak provides online help for its various extensions using this same help system. This chapter explains how to use the online help facilities in order to empower you in discovering powerful and versatile working techniques that will make you more and more productive in your day to day computing.

The online help options are accessed via the C-h prefix key, which must be followed by an additional letter or control character to designate the kind of help desired. For example, C-h t help-with-tutorial visits the Emacs tutorial in a new buffer; C-h i info enters the Info documentation system, from which you can read Texinfo manuals that have been installed on your system, including the Emacs and Emacspeak documentation; and C-h k describe-key provides a description of the Emacs function which is bound to the next key that you type. For learning about the various options that are available via the C-h mechanism described above, view the online help for command help-for-help bound to C-h C-h --using what has been described so far, you would achieve this by pressing C-h k followed by C-h C-h.

Emacspeak users should note that online help is typically displayed in a separate Emacs window. Where it makes sense to do so, Emacspeak will automatically speak the displayed help. Once you've asked for help, you can have the displayed documentation as many times as you wish using Emacspeak command emacspeak-speak-help bound to C-e h. If you want to move through the displayed help a line at a time, switch to the buffer where the help is displayed --the buffer is called *Help*.

Often, in adding an auditory interface to an Emacs extension, such as a web browser or mail reader, Emacspeak defines additional commands and key bindings which enhance the functionality of the spoken feedback provided by the application. This manual does not purport to document all such commands. It is important, therefore, when learning to use the various Emacs extensions which comprise the `audio desktop' (see section The Emacspeak Audio Desktop.) that you take advantage of online help to obtain details of any context-specific features provided by Emacspeak. The following two commands are of particular importance in this regard:

The importance of these help functions can be illustrated by the Emacs/W3 web browser. When point is positioned inside a table, certain key bindings are established with which you can access Emacspeak commands that make it possible to read the rows and columns of the table and explore its structure efficiently. To get a description of these key bindings, you can use W3 to visit the sample HTML file supplied as part of the Emacspeak distribution, and, after having moved point onto the first row of the table, issue the command C-h m describe-mode to create a help buffer containing an explanation of the commands offered by W3 mode.

Emacspeak supplements the online help facilities available within Emacs by defining several commands of its own, as follows:

Emacs Packages.

Emacs -- The extensible, self-documenting editor, derives its functionality from its powerful extension mechnaism. This extension mechanism is used to implement many user-level applications such as mail readers, WWW browsers, software development environments and so on. This chapter gives directions on how to locate the right Emacs package for addressing specific tasks. The chapter is organized into logical sections that each pertain to a specific class of tasks; in dividual subsections within a section give a brief overview of particular Emacs packages that have been speech-enabled.

Document Authoring

The Emacspeak environment provides a rich collection of structured document authoring tools. These are well-suited for working in an eyes-free environment --you clearly dont want to use a What You See Is What You Get (WYSIWYG) authoring tool if you cannot see what you're getting. Structure-based authoring tools allow you to focus on the act of content creation, leaving the minutii of visual layout to the computer.

Creating Well-formatted Documents

Before authoring a document, decide its primary audience if the document contains relatively simple content e.g., no mathematical equations etc. and is primarily targetted at the WWW, you are probably better off using HTML. You can create well-structured HTML documents with the help of package html-helper-mode available from ftp://ftp.reed.edu/pub/src/html-helper-mode.tar.gz. Package html-helper-mode is speech-enabled by Emacspeak to provide auditory icons, structured navigation and outlines, as well as voice locking for audio formatted feedback as you work.

If the document being authored is more complex, you are usually better off creating it in LaTeX. Note that LaTeX documents can be converted to HTML either via package tth or package latex2html --both available on the WWW.

The TeX family of typesetting languages is suitable for producing well-formatted documents in an eyes-free environment. Unlike WYSIWYG environments, the author of a TeX or LaTeX document works with the content of the document, leaving it to the formatting system (TeX) to format the document for good visual presentation.

The auctex package is an Emacs extension that facilitates authoring and maintaining structured documents in TeX and LaTeX. Package bibtex facilitates maintainance and use of bibtex bibliography databases. The Texinfo package allows creation of software documentation that is suitable for both printing as well as online viewing as hypertext. Emacspeak speech-enables packages auctex, bibtex and texinfo to provide convenient spoken feedback as you create and compile documents. For details on using these packages, see their accompanying online info documentation.

The most recent version of package auctex is always available by ftp at ftp://ftp.iesd.auc.dk/pub/emacs-lisp/auctex.tar.gz. Packages bibtex and texinfo are part of the standard Emacs distribution.

As the document preparation system of choice, Emacspeak supports a fluent speech-enabled interface to editing and formatting LaTeX documents. This interface is provided by speech-enabling auctex mode.

Mode auctex provides efficient keyboard shortcuts for inserting and maintaining LaTeX markup as a document is being authored. All of these editing commands provide succinct auditory feedback when used with Emacspeak. The syntax coloring provided by this mode is extended to provide voice locking --- consequently, Emacspeak uses different voices to speak the embedded markup to set it apart from the content.

Mode auctex can be used to create empty document templates and to insert document content at the appropriate places in the template. The mode also enables structured navigation of the document as it is being edited. Emacspeak speech-enables these template creation and structured navigation commands to produce auditory icons and succinct spoken feedback. For example, while editing, the user can quickly browse through the sections of the document and have each section title spoken. Document elements such as paragraphs and bulleted lists can be manipulated as logical units. These features are especially relevant in an eyes-free environment where the user needs to select logical parts of the document without having to point at portions of a visual display.

Finally, Emacs supports creating and maintaining SGML and XML documents. Emacs comes with a fairly simple sgml-mode --in addition, package psgml provides sophisticated parsing and validation facilities for working with SGML and XML documents. Package psgml can be downloaded from http://w4.lns.cornell.edu/public/COMP/info/psgml/psgml_toc.html.

Searching, Replacing, And Spell Checking

Incremental search, a process by which the system prompts the user for a search string and moves the selection to the next available match while allowing the user to add more characters to the search string, is the search technique of choice amongst most Emacs users. As the system successively finds each match and provides the user the option of continuing the search. Incremental search is a more complex instance of traditional search interaction because in addition to either stopping or continuing the search, the user can modify the current search in a number of ways including specifying a longer (or shorter) search string.

All of the user commands available during incremental search are documented in the online Emacs info manual. These are speech-enabled by Emacspeak to provide spoken prompts as the dialogue begins; auditory icons indicate a search hit or search miss as the search progresses. Along with auditory icons search-hit and search-miss the user also hears the current line spoken, and in the case of a search hit, the matching text is aurally highlighted by using the standard audio formatting technique of changing voice characteristic. This feedback proves extremely effective when the search pattern appears several times on a single line; the user is unambiguously cued to the current match.

Search and replace actions are an extension to the basic conversational gestures of a search dialogue. In addition to specifying a search string, the user also specifies a replacement string. On the Emacspeak desktop, this functionality is provided by command query-replace. The speech-enabled version of this interaction prompts the user for the search and replacement texts. The auditory feedback during the interactive search and replacement process parallels that described in the case of incremental search. Audio formatting to indicate the occurrence that is about to be replaced proves an effective means of avoiding erroneous modifications to the text being edited. As an example, consider using command query-replace to locate and replace the second occurrence of foo with bar in the text `Do not change this fool, but change this food.' When the search matches the first occurrence of foo in word fool, the aural highlighting helps the user in answering "no" in response to question "should this occurrence be replaced". In addition to allowing the user to supply a simple "yes or no" answer for each match, command query-replace also allows the user to specify a number of other valid answers as described in the online Emacs documentation.

Spell Checking

A more complex instance of conversational gesture "search and replace" is exhibited by standard spell checking dialogues. Spell checking differs from the search and replace dialogue described above in that the search and replacement text is guessed by the system based on an available dictionary. Words that are not found in the dictionary are flagged as potential spelling errors, and the system offers an interactive search and replace dialogue for each of these possible errors. During this dialogue, the system successively selects each occurrence of the possibly erroneous word and offers a set of possible replacements. Unlike in the case of simple search and replace, more than one possible replacement string is offered, since a potential spelling error can be corrected by more than one word appearing in the dictionary.

In the visual interface, such spell checking dialogues are realized by displaying the available choices in a pop-up window and allowing the user to pick a correction Once a correction is selected, the user is offered the choice of interactively replacing the erroneous word with the correction.

The spell checking interface on the Emacspeak desktop is speech-enabled to provide fluent auditory feedback. The visual interface parallels that described above and is provided by package ispell which is part of the standard Emacs distribution. Emacspeak provides a spoken prompt that is composed of the line containing the possibly erroneous word (which is aurally highlighted to set it apart from the rest of the text on that line) and the available corrections. Each correction is prefixed with a number that the user can use to select it. Once a correction is selected, the interaction continues with the query and replace interaction described earlier. The speech interface to the spell checker is as fluent as the visual interface. Notice that Emacspeak users do not need to concern themselves with the details of the visual display such as "the corrections are displayed in a window at the top of the screen".

In addition to the standard spell checker described above, newer versions of Emacs include an "on-the-fly" spell checker that flags erroneous words as they are typed. Emacspeak speech-enables package flyspell so that such erroneous words are aurally highlighted.

Structured Editing And Templates

Editing documents based on the inherent structure present in the electronic encoding can be very efficient when using spoken interaction. We described mode auctex -- a specialized interface to authoring LaTeX documents as a special instance of such structured editing in see section Document Authoring.

The Emacspeak desktop allows the user to efficiently author and maintain an electronic document based either on the structure present in the markup (as in the case of mode auctex) or on special outlining constructs that allow the user to impose a desired logical structure on the document. This section describes the effect of speech-enabling such editing tools and points out the advantages in using these in a speech oriented interface.

Template-based authoring -- a technique that allows the user to create a document by inserting contents into appropriate positions in a predefined template-- goes hand in hand with such structured editing. Finally, structured editing can vastly simplify the creation and maintenance of structured data, for example, the data present in a UNIX password file. Such data files are in fact nothing more than a collection of database records, where each record (or line) consists of a set of fields delimited by a special character. Maintaining such files without exploiting the underlying structure often tends to be error prone. We describe editing modes that can exploit such record structure to provide a fluent editing interface. Finally, we outline a speech-enabled interface to a spreadsheet application as a complex instance of such structured data editing.

Outline Editing

All of the various outline editing interfaces on the Emacs desktop allow the user to hide or show the contents at the different levels of a possibly nested tree structure. Components of this tree structure can be manipulated as a unit, e.g., entire subtrees can be deleted or copied. Outline editing thus provides an efficient means of obtaining quick overviews of a document.

The visual interface displays such hidden content as a series of ellipses following the visible outline heading. Emacspeak produces auditory icon ellipses when speaking such outline headings.

The basic outline mode allows the user to specify the syntax and level of outline header lines as a regular expression. This simple technique can be used to advantage in the structured navigation of large electronic texts such as those available on the Internet from online book projects such as project Gutenberg and the Internet Wiretap. For example, when this feature is activated while reading the electronic text of a Shakespearean play, the different acts can be recognized as separate nodes in the logical structure of the document. The user can then hide the document body with a single keystroke, navigate the outline headings to find a particular act, and have that portion rendered either visually or aurally. Hiding an outline level produces auditory icon close-object; exposing a hidden level produces auditory icon open-object. For details on using mode outline, see the relevant section of the online Emacs info manual.

The basic outline facility described above is applicable to all content being edited or browsed on the Emacspeak desktop. In addition, Emacspeak has other specialized outline editing modes such as folding mode that provide extended outlining facilities. In mode folding, the user can create (possibly nested) folds -- logical containers of content that are delimited by a special fold mark. The fold mark is typically a text string that is chosen based on the type of content that is being manipulated. Thus, when folding a C~program source file, fold marks are created from C~comments. The user can open or close any or all folds in a document, and these actions are accompanied by auditory icons open-object and close-object. By entering a fold, all editing actions are restricted to the contents of that fold; this proves a simple yet convenient way of constraining editing actions such as search and replace to specific portions of large documents. Folds can be manipulated as a unit and can be deleted, copied or moved.

Mode folding proves especially effective in maintaining large software modules. The technique can be used to advantage by creating folds for different sections in a module and by further placing each function appearing in a particular % section in a fold of its own. Complex functions can themselves be folded into sections where each section reflects a different stage in the algorithm implemented by that function. Thus, the technique of folding can be used as an effective aid in literate programming. I typically write software modules by first creating an outline structure using folds that reflect the various components of that module. Next, I populate each fold with the function signatures and documentation for the functions in each section. When I am satisfied with the overall architecture of the module, I fill in the function skeletons with actual program code. This technique is used extensively in maintaining the Emacspeak code base.

Template-based Authoring

Emacspeak supports two powerful template-based authoring subsystems that enable the user to quickly create and fill in templates. Dmacro (short for "dynamic macros") allows the user to define and invoke template-based macros that are specialized for creating different types of content. For example, when programming in C, the user can invoke dynamic macros that insert skeletons of standard C constructs with a few keystrokes. This form of editing has numerous advantages in creating consistently structured code when developing large software modules. Emacspeak speech-enables mode dmacro to provide succinct spoken feedback as templates are created and filled. The user invokes dmacro via command insert dmacro, which is typically bound to a single key. This results in a dialogue where the user is prompted to pick one of the dynamic macros available in the current context. If the users choice can be uniquely completed, that completion is spoken; otherwise, the list of possible completions based on the available partial input is spoken, accompanied by auditory icon help.

An alternative template-editing facility is provided by mode tempo This mode is designed to be used in creating template-based editing tools for specific markup languages; a good example is mode html-helper, a mode for creating and updating HTML documents for publishing on the WWW (see see section Document Authoring).

Maintaining Structured Data

Consider the following entry from file /etc/passwd on my laptop.

`aster:KlZVoUxwQQBT2:501:100:Aster Labrador:/home/aster:/bin/bash'

File /etc/passwd is a simple instance of a text file that stores structured data records as a series of fields delimited by a special character. Each item in the file acquires meaning from the position in which it occurs for example, the fifth field contains the user name, Aster Labrador. More generally, structured data where each field in a record has meaning is found throughout the desktop in applications ranging from entries in a rolodex to rows in a spreadsheet.

Typically, users do not directly edit the stored representation of the data. Instead, application front-ends provide a more human-centric (and hopefully less error prone) user interface for modifying and maintaining the data. Thus, spreadsheet applications present the data as a two dimensional table that is automatically updated to reflect changes in the underlying data. The two dimensional table is perhaps the most commonly found visual front-end to structured data tables with row and column headers prove a succinct way of implicitly displaying the meaning along with the value of the fields making up each data record.

Browsing Structured Information

This section describes packages that allow you to browse structured information --these are distinct from the tools described in See section Structured Editing And Templates, in that they are typically used for working with content that is read-only e.g., online documentation.

Electronic Messaging Applications

Working with messaging applications involves both authoring and browsing content. Emacspeak provides a rich set of speech-enabled messaging tools. Further, all of the tools described in the previous sections integrate smoothly with the messaging applications described here; this means that you do not need to re-learn a new set of work habits when dealing with content in your messaging application.

Editting Program Source Code

Files containing program source code form a very specific class of structured documents. Unlike documents meant for human consumption that are often only loosely structured, program source (as a concession to the computer's intolerance of lack of structure) are per force well-structured and adhere to a fairly stringent syntax.

The Emacs environment provides editting modes that are specific to creating and maintaining software written in most popular programming languages. Many of these editting modes are speech-enabled by Emacspeak. Speech-enabling these modes includes providing a rich set of navigational commands that allow you to move through the source efficiently. In addition, Emacspeak's core voice-lock facilities are used to produce audio formatted output --this helps you spot errors quickly.

Software Development Environment

In addition to providing specialized editting modes for creating and maintaining program source, Emacs provides a rich set of software development tools that can be combined to create powerful Integrated Development Environments (IDE). These IDEs are speech-enabled by Emacspeak to provide a versatile and powerful environment for eyes-free software development.

Desktop Management

Emacs provides an integrated environment for performing all of ones day-to-day computing tasks ranging from electronic messaging to software development. The environment derives its power from the fact that this integration allows for content to be handled across different tasks in a seamless manner. In order to work effectively with large Emacs sessions with many documents and applications open at the same time, the Emacspeak desktop provides a powerful collection of desktop management tools designed to help the user easily locate objects that pertain to a given task.

Personal Information Management

This section describes speech-enabled tools designed to aid in personal information management such as maintaining a daily calendar.

Desktop Applications

subsection Spread Sheets

Spreadsheet applications present a two dimensional view of structured data where the field values are (possibly) mutually dependent. On the Emacspeak desktop, a speech-enabled spreadsheet application can be used to manipulate such data-driven documents% ranging from simple cheque books and expense reports to complex investment portfolios. Where the traditional visual interface to spreadsheets is typically independent of the semantics of the data stored in the spreadsheet, the speech-enabled interface is derived from the meaning of the various fields making up the data. When presenting such information on a visual display, implicit visual layout can be used to cue the user to the meaning of different data fields. On the other hand, in the case of an actively scrolling auditory display, the spoken output needs to explicitly convey both the value and interpretation of the different data items. In addition, the interface needs to enable an active dialogue between user and application where the user is able to query the system about the possible meaning of a particular item of data. Finally, the aural interface needs to enable multiple views of the display. In the visual interface, such multiple views are automatically enabled by the two dimensional layout combined with the eye's ability to move rapidly around the layout structure. Thus, while viewing any particular row of a portfolio, one can immediately see the current total value as well as the net gain or loss. The Emacs spread-sheet package dismal can be retrieved from ftp://cs.nyu.edu/pub/local/fox/dismal.

subsection Forms Mode

Forms mode an Emacs mode designed to edit structured data records like the line shown from file /etc/passwd presents a user-friendly visual interface that displays the field name along with the field value. The user can edit the field value and save the file, at which point the data is written out using the underlying : delimited representation. Mode forms provides a flexible interface to associating meaning to the fields of such structured data files. For details on it use, see the forms-mode section of the online Emacs info documentation.

Running Terminal Based Applications

You can use the terminal emulator mode to run arbitrary terminal-based programs from within Emacs. You open a terminal emulator buffer using M-x term, with an extra carriage return to accept the default shell (such as bash). (Incidently, don't confuse this command with M-x terminal-emulator, which starts an older terminal emulator mode not supported by Emacspeak.)

Three kinds of commands are used within the terminal emulator. Normal term commands use a prefix of C-c. The emacspeak commands for eterm mode use a prefix of C-t. Anything else is a normal shell command.

There are two sub-modes of term mode: char sub-mode and line sub-mode. In char sub-mode, emacspeak will only speak the final chunk of output --typically the last line displayed. Each character typed (except `term-escape-char`) is sent immediately. Use char sub-mode for screen oriented programs like vi or pine.

In line sub-mode, program output is spoken if user option eterm-autospeak is turned on. When you type a return at the end of the buffer, that line is sent as input, while return not at end copies the rest of the line to the end and sends it. When using terminal line mode with option eterm-autospeak turned on, speech feedback is similar to that obtained in regular shell-mode buffers.

The default is char sub-mode. You can switch to line sub-mode with C-c C-j (recall that control J is a linefeed), and back to char sub-mode with C-c C-k (think of character spelled with a K).

Note: Use char-mode with the terminal emulator for running screen-oriented programs like Lynx or Pine. For regular shell interaction just use M-x shell instead of using the terminal emulator.

Char Sub-mode of Term Mode

In char sub-mode of term, each character you type is sent directly to the inferior process without intervention from emacs, except for the escape character (usually C-c).

Here are some of the useful commands for the char sub-mode. Note that the usual commands for killing a buffer or switching buffers do not work in this mode, so new key bindings are supplied. The first five commands are different ways of leaving this mode.

`C-c C-j'
`M-x term-line-mode'
Switch to line sub-mode of term mode.
`C-c o'
`M-x other-window'
Select the next window on this frame. All windows on current frame are arranged in a cyclic order. This command selects the next window in that order. If there are no other windows, this command does nothing.
`C-c C-f'
`M-x find-file'
Switch to a buffer visiting a file, creating one if none already exists.
`C-c 0'
`M-x delete-window'
Remove current window from the display.
`C-c k'
`M-x kill-buffer'
Kill the current buffer.
`C-c C-x C-c'
`M-x save-buffers-kill-emacs'
Offer to save each buffer, then kill this Emacs process.
`C-c C-d'
`M-x list-directory'
Display a list of files in or matching DIRNAME, a la `ls'. DIRNAME is globbed by the shell if necessary. Prefix arg (C-u) means supply -l switch to `ls'. The list appears in a second window.
`C-c 1'
`M-x delete-other-windows'
Delete all other windows in the frame, making the current window fill its frame.
`C-c C-c'
`M-x term-send-raw'
Send the last character typed through the terminal-emulator without any interpretation.
`C-c ('
`M-x start-kbd-macro'
Record subsequent keyboard input, defining a keyboard macro. The commands are recorded even as they are executed. Use C-c ) to finish recording and make the macro available. Use M-x name-last-kbd-macro to give it a permanent name. Prefix arg (C-u) means append to last macro defined; This begins by re-executing that macro as if you had typed it again.
`C-c )'
`M-x end-kbd-macro'
Finish defining a keyboard macro. The definition was started by C-c (. The macro is now available for use via C-c e, or it can be given a name with M-x name-last-kbd-macro and then invoked under that name.
`C-c e'
`M-x call-last-kbd-macro'
Call the last keyboard macro that you defined with C-c (. A prefix argument serves as a repeat count. Zero means repeat until error.

You can get a list of all the key sequences with a C-c prefix by typing C-c C-h while in this sub-mode. Some of those commands are only available in the char sub-mode, while others are generally available.

Line Sub-mode of Term Mode

In line sub-mode of term mode, emacs editing commands work normally, until you type RET which sends the current line to the inferior process.

Here are some of the useful commands for the line sub-mode of the term mode. In addition, the usual commands for handling a buffer work in this mode (C-x o to switch windows, C-x k to kill a buffer, C-x f to find a file, and so forth).

`C-c C-k'
`M-x term-char-mode'
Switch to char sub-mode of term mode.
`C-c C-z'
`M-x term-stop-subjob'
Stop the current subjob. Resume the subjob in the foreground with the ordinary command fg, or run it in the background with bg. WARNING: if there is no current subjob, you can end up suspending the top-level process running in the buffer. If you accidentally do this, use M-x term-continue-subjob to resume the process. (This is not a problem with with most shells, including bash, since they ignore this signal.)
`C-c C-\'
`M-x term-quit-subjob'
Send quit signal to the current subjob.
`C-c C-c'
`M-x term-interrupt-subjob'
Interrupt the current subjob.
`C-c C-w'
`M-x backward-kill-word'
Kill characters backward until encountering the end of a word.
`C-c C-u'
`M-x term-kill-input'
Kill all text from last stuff output by interpreter to point.
`C-c C-a'
`M-x term-bol'
Goes to the beginning of line, then skips past the prompt, if any. If a prefix argument is given (C-u), then no prompt skip -- go straight to column 0.
`C-c C-d'
`M-x term-send-eof'
Send an end of file character (EOF) to the current buffer's process.

You can get a list of all the key sequences with a C-c prefix by typing C-c C-h while in this sub-mode. Some of those commands are only available in the line sub-mode, while others are generally available.

Eterm Mode Commands

The eterm mode maintains a pointer, which is not necessarily the same as the terminal's cursor. It is intended to be used in eterm's char submode. In char submode, C-t , (that's control-t followed by comma) will tell you where the eterm pointer is. C-t C-i will tell you where the terminal's cursor is. The top left corner of the window is "row 0 column 0".

The eterm pointer can be moved with C-t < (to the top of the screen), C-t > (to the bottom of the screen), C-t n (to the next line), C-t p (to the previous line), and C-t . (to the cursor). Each of these also speaks the line the pointer moves to. You can also search forward with C-t s.

These commands speak without moving the pointer: C-t l (current line), C-t w (current word), C-t c (current character), and C-t [space] (from eterm pointer to cursor).

You may enter review mode with C-t q. In review mode, you can search the buffer and speak its contents, without disturbing the terminal. Commands for moving the pointer are similar to normal editing commands, but without a control key: n and p for next and previous line, f and b for forward and back by characters, < and > for the beginning or end of the buffer. c, w, and l speak the current character, word, and line. s searches forward (not incrementally). A comma speaks the pointer location. A period moves the pointer to the terminal cursor. Return to normal term mode by typing q.

Acknowledgements.

Thanks.

Concept Index

Jump to: c - l - s - t - w

c

  • character echo
  • l

  • line echo
  • s

  • speech settings
  • speech system
  • t

  • tts
  • w

  • word echo
  • Key Index

    Jump to: c

    c

  • C-c (
  • C-c )
  • C-c 0
  • C-c 1
  • C-c C-\
  • C-c C-a
  • C-c C-c, C-c C-c
  • C-c C-d, C-c C-d
  • C-c C-f
  • C-c C-j
  • C-c C-k
  • C-c C-u
  • C-c C-w
  • C-c C-x C-c
  • C-c C-z
  • C-c e
  • C-c k
  • C-c o

  • Footnotes

    (1)

    I currently use Emacspeak under Linux and Solaris as the only source of speech feedback.

    (2)

    Control e is mnemonic for Emacspeak.

    (3)

    d is mnemonic for Dectalk.


    This document was generated on 27 December 1999 using texi2html 1.56k.