Next Previous Contents

5. Stage 4. Emacspeak under Linux

The Slackware setup script for Emacspeak should create the needed environment variables and install a script emacspeak that starts emacs with emacspeak. This is your fourth option for learning Emacs. This is the first time you will be able to actually use Emacspeak. A short tutorial appears below. Within Emacs, you may type C-h C-e to get a list of the commands. To search for a command, use C-h a. To get an explanation for a key sequence, use C-h k. There is also an info file which is part of the Emacspeak distribution. Within emacs, you may type C-h i to open the directory to the info pages. Search for the emacspeak menu item by typing C-s emacspeak, then two carriage returns (one to terminate the search, and a second one to go to the info page. If you have the standalone info program installed, you can consult the info file with the command info Emacspeak.

5.1 Emacspeak Introduction - Speech Enabled Normal Commands

All of the normal Emacs movement commands will speak the relevant information after moving. Here are some of the cursor movement functions that have been speech enabled. Note that this list only enumerates a few of these speech enabled commands; the purpose of emacspeak is to speech-enable all of emacs and provide you spoken feedback as you work. Thus, this list is here only as a representative example of the kind of speech-enabling extensions Emacspeak provides.

`C-n' or `M-x next-line' or `down'

Moves the cursor to the next line and speaks it.

`C-p' or `M-x previous-line' or `up'

Moves the cursor to the previous line and speaks it.

`M-f' or `M-x forward-word' or

Moves the cursor to the next word and speaks it. Places point on the first character of the next work, rather than on the space preceding it (This is my personal preference).

`M-b' or `M-x backward-word'

Moves the cursor to the previous word and speaks it.

`M-C-b' or `M-x backward-sexp'

Moves the cursor to the previous sexp and speaks it. If the sexp spans more than a line, only the first line is spoken.

`M-<' or `M-x beginning-of-buffer'

Speaks line moved to.

`M->' or `M-x end-of-buffer'

Speaks line moved to.

`M-m' or `M-x back-to-indentation'

Speaks entire current line. A useful way of hearing the current line.

5.2 Emacspeak Introduction - New Commands

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:

The first group of commands are for listening to chunks of information. The names of these commands all start with the common prefix `emacspeak-'. All Emacspeak commands are bound to the keymap EMACSPEAK-KEYMAP and are accessed with the key `Control e'. Thus, the Emacspeak command "emacspeak-speak-line" is bound to `l' in keymap EMACSPEAK-KEYMAP and can be accessed with the keystroke `Control-e l'.

Here are some of the commands for reading text:

`C-e c' or `M-x emacspeak-speak-char'

Speak current character, using the phonetic alphabet.

`C-e w' or `M-x emacspeak-speak-word'

Speak current word.

`C-e l' or `M-x emacspeak-speak-line'

Speak current line. With prefix `C-u', speaks the rest of the line from point. With negative prefix `C-u -', speaks from start of line to point. Voicifies if 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 `M-x emacspeak-show-point'.

`C-e .' or `M-x emacspeak-speak-sentence'

Speak the current sentence.

The second category of commands provided by Emacspeak report status of various kinds.

`C-e k' or `M-x emacspeak-speak-current-kill'

Speak the current kill entry (which would be yanked by the next C-y).

`C-e =' or `M-x emacspeak-speak-current-column'

State the column where point is.

`C-e C-l' or `M-x emacspeak-speak-line-number'

State the line where point is.

`C-e m' or `M-x emacspeak-speak-line-number'

Speak the mode-line: the name of the buffer, how far point is into the current buffer as a percentage, and the major mode.

`C-e M' or `M-x emacspeak-speak-minor-mode-line'

Speak the minor modes that are in effect.

`C-e v' or `M-x emacspeak-speak-version'

Announce the emacspeak version.

The third category of commands provided by Emacspeak manipulate the state of the speech device. The names of these commands start with the common prefix `dtk-'. Many of these commands take the prefix `Control-e d'. Thus, the command "dtk-set-rate" is bound to `r' in keymap EMACSPEAK-DTK-SUBMAP and can be executed by pressing `Control e d r'.

`C-e s' or `M-x dtk-stop'

Stop speech now. In addition, any command that causes speech output will discard anything in the speech buffer.

`C-e d V' or `M-x emacspeak-dtk-speak-version'

Use this to find out which version of the Dectalk firmware you have.

`C-e d I' or `M-x dtk-toggle-stop-immediately-while-typing'

Toggle state of variable dtk-stop-immediately-while-typing. As the name implies, if true then speech flushes immediately as you type.

`C-e d i' or `M-x emacspeak-toggle-audio-indentation'

Toggle state of Emacspeak audio indentation. Specifying the method of indentation as `tone' 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.

`C-e d k' or `M-x emacspeak-toggle-character-echo'

Toggle state of Emacspeak character echo (that is, whether typed characters are echoed).

`C-e d w' or `M-x emacspeak-toggle-word-echo'

Toggle state of Emacspeak word echo (initially on).

`C-e d l' or `M-x emacspeak-toggle-line-echo'

Toggle state of Emacspeak line echo (that is, whether typed text is echoed after typing enter).

`C-e d p' or `M-x dtk-set-punctuations'

Set punctuation state. Possible values are `some', `all', or `none'.

`C-e d q' or `M-x 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.

`C-e d R' or `M-x dtk-reset-state'

Restore sanity to the Dectalk. Typically used after the Dectalk has been power cycled.

`C-e d SPC' or `M-x dtk-toggle-splitting-on-white-space'

Toggle state of emacspeak that decides if we split text purely by clause boundaries, or also include whitespace.

`C-e d r' or `M-x dtk-set-rate'

Set speaking rate for the dectalk.

`C-e d s' or `M-x dtk-toggle-split-caps'

Toggle split caps mode. In split caps mode, a transition from lower case to upper case is treated like the beginning of a new word. This is useful when reading Hungarian notation in program source code.

`C-e d v' or `M-x voice-lock-mode'

Toggle Voice Lock mode (initially off). When Voice Lock mode is enabled, text is voiceified as you type it, as follows:

5.3 Emacspeak Introduction - Using the Help System

When you press C-h to get the help index, the screen will appear, but Emacspeak will not speak the window. The only thing spoken is "Type one of the options listed or Space to scroll:".

Here is the menu that Emacspeak is not speaking:

-- begin quote

You have typed C-h, the help character.  Type a Help option:
(Use SPC or DEL to scroll through this text.  Type q to exit the Help
command.)

a  command-apropos.  Give a substring, and see a list of commands
        (functions interactively callable) that contain
        that substring.  See also the  apropos  command.
b  describe-bindings.  Display table of all key bindings.
c  describe-key-briefly.  Type a command key sequence;
        it prints the function name that sequence runs.
f  describe-function.  Type a function name and get documentation of
it.
C-f Info-goto-emacs-command-node.  Type a function name;
        it takes you to the Info node for that command.
F  view-emacs-FAQ.  Shows emacs frequently asked questions file.
i  info. The  info  documentation reader.
k  describe-key.  Type a command key sequence;
        it displays the full documentation.
C-k Info-goto-emacs-key-command-node.  Type a command key sequence;
        it takes you to the Info node for the command bound to that
key.
l  view-lossage.  Shows last 100 characters you typed.
m  describe-mode.  Print documentation of current major mode,
        which describes the commands peculiar to it.
n  view-emacs-news.  Shows emacs news file.
p  finder-by-keyword. Find packages matching a given topic keyword.
s  describe-syntax.  Display contents of syntax table, plus
explanations
t  help-with-tutorial.  Select the Emacs learn-by-doing tutorial.
v  describe-variable.  Type name of a variable;
        it displays the variable's documentation and value.
w  where-is.  Type command name; it prints which keystrokes
        invoke that command.
C-c print Emacs copying permission (General Public License).
C-d print Emacs ordering information.
C-n print news of recent Emacs changes.
C-p print information about the GNU project.
C-w print information on absence of warranty for GNU Emacs.
-- end quote

Suppose you type "a", for command-apropos.

The next spoken prompt is "Apropos command (regexp):"

Now you type some word you think is part of an emacs command, like "visit".

The help system will display the first section of the help, but will leave the cursor in the other window. The spoken text is "Type C-x 1 to remove help window. M-C-v to scroll the help." At this point, I think it's more helpful to move point to the other window with C-x o, then you can use regular navigation commands to speak the help text. You can delete the help window with C-x 0, which will also put point back where it was.

The complete menu displayed by help-for-help is also visible if you do a describe function on help-for-help. In a future version of Emacspeak, Raman plans to add a message to that effect when the user presses C-h ?


Next Previous Contents