Copyright © 2002 T. V. Raman
This work is being made available under the same copyright as that used by the Linux Documentation Project see LDP Copyright Notice .
This document is a collection of productivity tips for using the Emacspeak audio desktop. Make sure you listen to this document with punctuation mode set to all to ensure that you do not miss important concepts. Note that this document is to be used in concert with the built-in online help facilities. Toward this end, the first section gives help on using Emacs online help; subsequent sections are intentionally brief since the interested user is expected to lookup the details of a command using these facilities. See How To Ask Questions The Smart Way for how you can improve your own productivity while contributing to continuously improving the tools you rely on for your work.
The latest copy of this document is always available via CVS from the Emacspeak CVS repository ---thanks to the --- SourceForge project and on the Emacspeak WWW site.
Tips on using Emacs online help facilities.
Online documentation is accessed using commands available on key C-h. The type of help obtained is determined by the keypress following C-h.
Online hypertext help.
Invoke the online hypertext help system (info) by pressing C-h i. Press h when using Info to obtain a primer for first time users.
Opening info page that documents a given key.
Press C-h C-k followed by the key whose documentation you wish to locate.
Opening info page that documents a given command.
Press C-h C-f and specify the command name when prompted.
Picking from available choices.
Hitting tab causes Emacs to complete the currently typed input as far as possible. If there is more than one choice available, Emacspeak plays auditory icon help and speaks the available choices. At this point, you can input more characters to unambiguously specify the choice. Alternatively, you can browse the completion list which is typically displayed in another window in a buffer called *Completions*.
Minibuffer prompting and completion.
Emacs uses the minibuffer when prompting for user input. When using completion in the minibuffer by hitting tab, you can switch to the *Completions* buffer by pressing command C-o.
Customizing Emacs And Emacspeak
Emacspeak can now be customized using custom and this is the recommended way for users new to Emacs to customize Emacs and Emacspeak. Command emacspeak-customize invokes Emacs' customize interface for customizing Emacspeak. Use custom to customize Emacs packages that support this feature. Note that not all Emacs packages are fully customizable via custom.
Browsing UNIX Man Pages
Use Emacs command man to view UNIX manual pages using a speech-enabled interface. This interface provides structured browsing which is something missing when viewing UNIX man pages inside a traditional pager program.
Browsing Linux HOWTO Documentation.
Use command emacspeak-speak-browse-linux-howto to browse Linux HOWTO documentation installed on your system. The command opens the specified HOWTO file and sets things up so you can use Emacs' outline facilities to browse the document.
This section contains tips on working efficiently with files and folders, both local and remote.
Working on files and folders.
Use command dired (directory editor) normally bound to C-x d to operate on files and folders.
Working with remote directories.
Built-in Emacs package ange-ftp provides seamless access to remote files and folders by using UNIX ftp behind the scenes. To open a remote directory, specify the directory location as /username@host:/path when prompted by command dired. Note that in the above, username defaults to anonymous.
Use locate and locate-with-filter to find files and folders on your hard drive. Matching files and folders are displayed using the same interface as provided by command dired. These commands use the locate database that is typically rebuilt nightly on standard Linux systems.
Using UNIX find from within Emacs.
Use commands find-name-dired, find-grep-dired and find-dired to use UNIX find to locate files and folders on your hard drive.
Searching all files in a directory hierarchy.
Install and use Emacs package igrep ---an extended Emacs interface to UNIX grep to search all files in a directory. For simpler tasks use command grep-dired and command find-grep-dired.
Search and replace across a collection of files.
When working on a project consisting of many files, build a tags table using UNIX command etags and use it to advantage from within Emacs with commands such as
This section contains tips for efficiently working with large amounts of content using speech output.
Hiding and exposing text blocks.
You can hide blocks of text when skimming a file. A block of text is defined as a sequence of contiguous lines starting with a common prefix e.g., cited lines in an email message or blocks of comments in programming languages. See commands
to use these features.
Skipping across blank lines
to move across contiguous blank lines.
Browsing structured text using Emacs outline mode
Emacs outline facility provides a powerful tool for browsing textual material based on its implicit structure. By default, command outline-minor-mode sets up Emacs to recognize lines beginning with *** as header lines. This can be changed on a per buffer basis by setting up Emacs variable outline-regexp to a regular expression that matches header lines. When using Emacs view-mode to read text, this feature is especially useful when combined with Emacspeak built-in feature that loads a directory specific file to customize Emacspeak on a per-directory basis. Thus, one can organize electronic texts by placing files for a given book in a specific directory, and then creating a file called .espeak.el in that directory that sets up things like Emacs variable outline-regexp.
Everything is searchable.
Everything is searchable in Emacs. Use this to advantage when working with all forms of content, since it is often more efficient to use Emacs commands C-s and C-r to perform forward or backward incremental search to locate relevant information than to listen to the content.
Saving positions in a file.
Use Emacs mark to save temporary positions in a file. Use built-in Emacs bookmark to save the position across Emacs sessions. Use built-in Emacs package desktop to have Emacs automatically recreate the state of the audio desktop on restart.
Working with different portions of a file at the same time.
Display the file in different Emacs windows or frames; Emacs allows you to display different portions of the file in each window or frame. Use Emacspeak commands
to listen to a given portion of a file whilst working on a different portion of the same file.
Accumulating Annotations While Reading
It is often useful to be able to jot down comments or notes while reading a large document. Rather than switching back and forth between the document you are reading and the document where the comments are being joted down, you can use Emacspeak utility emacspeak-annotate-add-annotation --see that command's online documentation for details on its use.
This section contains tips on querying and updating the status of the Emacspeak audio desktop. See section status commands in the Emacspeak online manual for additional details.
Hearing The Current Context
Emacs buffers are the building bloks of the Emacspeak audio desktop. Current context is thus determined by the current buffer ---i.e., the buffer with which the user is presently interacting. The state of the current buffer is continuously updated visually by Emacs on the modeline (see the Emacs online tutorial for details on the visual display)--- the status is spoken by Emacspeak whenever there is a context change. You can explicitly request this context information using command emacspeak-speak-mode-line; additional details are provided by command emacspeak-speak-minor-mode-line.
Information conveyed by command emacspeak-speak-mode-line
Command emacspeak-speak-mode-line is optimized to convey the most relevant information first. Different user options control additional status information that may be spoken by this command. When possible, this command uses tones, midi icons and auditory icons to make the spoken feedback more succinct. Here is a brief summary listing the various items of status information conveyed by command emacspeak-speak-mode-line:
Finally, note that the feedback is designed using the principle no news is good news, thus, in many cases the absence of a cue is itself a cue. As an example, Emacspeak produces an auditory tone only if a buffer is read-only --the absence of the tone indicates the buffer can be editted which is usually the case. Similarly, no tone is produced when a buffer does not need saving.
Information conveyed by command emacspeak-speak-minor-mode-line
Command emacspeak-speak-minor-mode-line typically conveys additional information including:
This section contains tips on using the various multimedia features of the Emacspeak audio desktop.
Setting State Of The Auditory Display
The state of the auditory display can be set and updated using command emacspeak-aumix. The available settings depend on the sound card in use. Note that command emacspeak-aumix is a convenient means to using the underlying aumix utility. To set and save the auditory display settings, invoke command emacspeak-aumix-edit by pressing e after invoking command emacspeak-aumix.
Playing audio CDs
Emacspeak built-in command cd-tool uses the command-line tools provided by RPM package cdp. This is convenient for playing tracks from a CD. Use cdcd from within an Emacs shell for more complex tasks such as querying a CDDB database.
Playing MP3 using mpg123
mpg123 is a command-line MP3 player. Emacs package mpg123.el provides an Emacs front-end that is speech-enabled by Emacspeak. This front-end is most convenient for playing tracks out of a given directory.
Playing MP3 files with freeamp
MP3 player freeamp provides a pluggable look and feel with many popular front-ends for playing music. There are different front -ends to freeamp, including an Emacs front-end provided by Emacspeak via module emacspeak-freeamp.el. The freeamp is more convenient for setting up music playlists. The emacspeak interface allows controlling the MP3 player from anywhere on the audio desktop without the need to explicitly switch context from the current task.
Setting up music playlists
Application freeamp can play music listed in a playlist file --typically such files are given the extension .m3u. A playlist file contains names of MP3 files, one per line. To create a playlist file for use with freeamp, you might execute the following command from within a shell buffer:
cd $HOME/music find . -name '*.mp3' > playlist.m3u
Playing Realaudio Streams
Install real player --this is Real Networks' Real Media player. Next, install command-line interface trplayer. Once you have this installed and configured, you can use Emacspeak's built-in RealMedia front-end provided by module emacspeak-realaudio.el to conveniently play streaming media from anywhere on the audio desktop --see command emacspeak-realaudio. Note that when playing a stream, you can use all the single-keystroke navigation commands provided by trplayer by prefixing them with C-e ; from anywhere on the audio desktop; alternatively, you can use C-e ;; to switch to a special Emacs buffer that contains trplayer and then execute trplayer commands directly.
Playing MS Windows Media Files
To play Windows media files, first install the media player mplayer for Linux. Once this player is installed and working, emacspeak command emacspeak-m-player can be used to conveniently play Windows Media streams.
Streaming media presets
Streaming media on the WWW is often well-hidden behind several mouse clicks. Emacspeak allows you to configure your favorite streams as an organized hierarchy. The Emacspeak distribution comes with such a collection of streams I listen to on a frequent basis. You can access these by using standard Emacs completion when prompted for a RealAudio Resource by command emacspeak-realaudio.
The ImageMagick package provides a powerful set of image manipulation tools --for an excellent overview see the online article command-line graphics
This section contains tips on authoring structured documents for online and print publishing. See the relevant section of the online Emacspeak manual for further details on document authoring on the Emacspeak desktop.
This section contains tips about electronic messaging on the Emacspeak desktop. For further details, see the relevant section of the online Emacspeak manual on electronic messaging.
What Web Browsers Can I Use?
There are a number of available options, none of which are completely satisfactory. Here is a summary of what is available.
This section contains tips on managing your system.
This section gives tips on using some of the built-in productivity tools bundled with Emacspeak. Most of these are implemented in module emacspeak-wizards.
Launch a root shell.
Never run Emacspeak as the root user. Instead use Emacspeak command emacspeak-root to create a root shell after starting Emacspeak.
Setting shell's working directory to buffer's current directory
You often find yourself switching to the shell buffer and then executing cd to switch to the directory containing the file you were working on. Emacspeak wizard emacspeak-wizards-shell-toggle switches to a running shell buffer and automatically executes command cd so you are in the right working directory.
Emacspeak provides a clipboard facility to enabling cut and paste across different emacspeak sessions, see commands
Copying current file.
Emacspeak command emacspeak-copy-current-file lets you copy the file being visited to a different location ---this is a convenient way of publishing to a WWW server.
Personal telephone directory.
Emacspeak command emacspeak-speak-telephone-directory lets you maintain a telephone directory as a simple text file.
Tabbulating shell command output.
Many UNIX commands produce tabulated output, e.g., command df for displaying a disk usage summary. You can use Emacspeak command emacspeak-speak-run-shell-command to run such commands and have the tabular output available for browsing using Emacspeak's table browsing facilities.
Filtering specific columns of all lines.
This is most useful when working with log files. Command emacspeak-speak-line-set-column-filter enables you to filter out uninteresting columns of each line as it is spoken. Note that columns are filtered out by making them inaudible ---in order for this to take effect, voice-lock needs to be active in the current buffer. You can invert the sense of the filter by invoking command emacspeak-toggle-speak-line-invert-filter.