@c $Id$
@node Emacs Packages
@chapter Emacs Packages.

@cindex Emacs Packages

Emacs @MDash{} The extensible, self-documenting editor, derives its
functionality from its powerful extension mechanism.  This extension
mechanism is used to implement many user-level applications such as mail
readers, web 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 individual
subsections within a section give a brief overview of particular Emacs
packages that have been speech-enabled.

For a categorized list of speech-enabled applications on theEmacspeak
desktop, see @url{http://emacspeak.sf.net/applications.html}.  In
Emacs 24 and later, you can use Emacs' builtin package manager to
install and update packages.

@menu
* Document Authoring::
* Structured Editing::
* Browsing Structure::
* Web Browsing::
* Messaging::
* Editing Code::
* Development Environment::
* Desktop Management::
* Personal Information Management::
* Desktop Applications::
@end menu

@node Document Authoring
@section Document Authoring

@cindex Document Authoring

@include documents.texi
@node Structured Editing
@section Structured Editing And Templates

@include structure.texi
@node Browsing Structure
@section Browsing Structure


@cindex Browsing Structure

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

@node Web Browsing
@section Web Browsing
@cindex Web Browsing

@include web-browsing.texi

@node Messaging
@section Messaging

@cindex Messaging

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.

@node Editing Code
@section Editing Code

@cindex Programming

Files containing program source code form a very specific class of
@b{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 editing modes that are specific to
creating and maintaining software written in most popular programming
languages.  Many of these editing 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 @b{voice-lock} facilities
are used to produce audio formatted output @MDash{} this helps you
spot errors quickly.

@node Development Environment
@section Development Environment

@cindex Software Development

In addition to providing specialized editing 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 (@acronym{IDE}).  These @acronym{IDE}s are
speech-enabled by Emacspeak to provide a versatile and powerful
environment for eyes-free software development.

@node Desktop Management
@section Desktop Management

@cindex Desktop

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.

@node Personal Information Management
@section Personal Information Management

@cindex Personal Information Management

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

@node Desktop Applications
@section Desktop Applications

@cindex 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 @emph{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 dialog 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 @emph{multiple} views of
the display.  In the visual interface, such @emph{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 @code{dismal} can be retrieved from
@url{ftp://cs.nyu.edu/pub/local/fox/dismal}.

@subsection Forms Mode

@emph{Forms} mode an Emacs mode designed to edit structured data
records like the line shown from file @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 @code{ :}
delimited representation.  Mode @emph{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.

@subsection @acronym{OCR} @MDash{} Reading Print Documents
Module @code{emacspeak-ocr} implements an @acronym{OCR, Optical
Character Recognition} front-end for the Emacspeak desktop.

Page image is acquired using tools from package @code{SANE} (Scanner
Access Now Easy).  The acquired image is run through the @acronym{OCR} engine if
one is available, and the results placed in a buffer that is suitable
for browsing the results.  This buffer is placed in mode
@code{emacspeak-ocr-mode} a specialized mode for reading and scanning
documents.

@subsubsection Emacspeak @acronym{OCR} Mode

Emacspeak @acronym{OCR} mode is a special major mode for document scanning and
@acronym{OCR}.

Pre-requisites:

@itemize @bullet
@item
A working scanner back-end like SANE on Linux.

@item
An @acronym{OCR} engine.
@end itemize

Make sure your scanner back-end works, and that you have the utilities
to scan a document and acquire an image as a tiff file.  Then set
variable @var{emacspeak-ocr-scan-image-program} to point at this
utility.  By default, this is set to `scanimage' which is the image
scanning utility provided by SANE.

By default, this front-end attempts to compress the acquired tiff
image; make sure you have a utility like @code{tiffcp}.  Variable
@var{emacspeak-ocr-compress-image} is set to `tiffcp' by default; if
you use something else, you should customize this variable.

Next, make sure you have an @acronym{OCR} engine installed and
working.  By default this front-end assumes that @acronym{OCR} is
available as @code{/usr/bin/ocr}.

Once you have ensured that acquiring an image and applying
@acronym{OCR} to it work independently of Emacs, you can use this
Emacspeak front-end to enable easy @acronym{OCR} access from within
Emacspeak.

The Emacspeak @acronym{OCR} front-end is launched by command
@dfn{emacspeak-ocr} bound to @kbd{C-e C-o}.

This command switches to a special buffer that has @acronym{OCR}
commands bounds to single keystrokes @MDash{} see the key-binding list
at the end of this description.  Use Emacs online help facility to
look up help on these commands.

Mode @dfn{emacspeak-ocr-mode} provides the necessary functionality to
scan, @acronym{OCR}, read and save documents.  By default, scanned
images and the resulting text are saved under directory @file{~/ocr};
see variable @var{emacspeak-ocr-working-directory}.  Invoking command
@dfn{emacspeak-ocr-open-working-directory} bound to @kbd{d} will open
this directory.

By default, the document being scanned is named `untitled'.  You can
name the document by using command @dfn{emacspeak-ocr-name-document}
bound to @kbd{n}.  The document name is used in constructing the name
of the image and text files.

Here is a list of all emacspeak @acronym{OCR} commands along with their
key-bindings and a brief description:

@table @kbd
@item digit
@dfn{emacspeak-ocr-page}
Jumps to specified page in the @acronym{OCR} output.

@item c
@dfn{emacspeak-ocr-set-compress-image-options}
Interactively update image compression options.  Prompts with current
setting in the minibuffer.  Setting persists for current Emacs
session.

@item i
@dfn{emacspeak-ocr-set-scan-image-options} Interactively update scan
image options.  Prompts with current setting in the minibuffer.
Setting persists for current Emacs session.

@item spc
@dfn{emacspeak-ocr-read-current-page}
Speaks current page.

@item s
@dfn{emacspeak-ocr-save-current-page}
Saves current page as a text file.

@item p
@dfn{emacspeak-ocr-page}
Prompts for a page number and moves to the specified page.

@item ]
@dfn{emacspeak-ocr-forward-page}
Move forward to the next page.

@item [
@dfn{emacspeak-ocr-backward-page}
Move back to the previous page.

@item d
@dfn{emacspeak-ocr-open-working-directory}
Open directory containing the results of @acronym{OCR}.

@item n
@dfn{emacspeak-ocr-name-document}
Name current document.

@item o
@dfn{emacspeak-ocr-recognize-image}
Launch @acronym{OCR} engine on a scanned image.

@item i
@dfn{emacspeak-ocr-scan-image}
Acquire an image using @code{scanimage}.

@item RET
@dfn{emacspeak-ocr-scan-and-recognize}
Scan and recognize a page.

@item w
@dfn{emacspeak-ocr-write-document}
Write all pages of current document to a text file.

@item q
@dfn{bury-buffer}
Bury the @acronym{OCR} buffer.

@item c
@dfn{emacspeak-ocr-customize}
Customize Emacspeak @acronym{OCR} settings.

@item ?
@dfn{describe-mode}
Describe @acronym{OCR} mode.
@end table
