Monday, September 21, 2015

Announcing Emacspeak-Muggles: Keyboard Conveniences For Emacspeak

Announcing Emacspeak-Muggles: Keyboard Conveniences For Emacspeak

1 Announcing Emacspeak-Muggles: Keyboard Conveniences For Emacspeak

1.1 Executive Summary:

new module emacspeak-muggles uses package hydra to provide keyboard conveniences.

1.2 Overview:

Package hydra allows convenient grouping of keyboard commands, see that package's description for details. It can be installed by executing

M-x package-install hydra

Module emacspeak-muggles implements a set of convenience hydras that make invoking groups of related commands easy. Here are the Muggles currently implemented:

Control laptop display brightness using xbacklight.
Access view-mode functionality without invoking view-mode explicitly.
Access Emacspeak Table UI functionality for org-mode tables.
And a lot more to come.

1.3 Blogger Note:

Going forward, these articles will be published via GitHub – rather than Blogspot — the new Blogspot API requires browser-based authentication that is beyond Emacs.

Date: <2015-07-13 Mon>

Author: raman

Created: 2015-07-13 Mon 09:17

Emacs (Org mode 8.2.10)


Emacspeak: An Overview Of Voice-Lock Over The Years

Emacspeak: An Overview Of Voice-Lock Over The Years

1 Executive Summary

Audio formatted output is provided via voice-lock in Emacspeak.
The feature was originally implemented in 1994 and significantly
overhauled in 2002 (with no change in functionality). Now, in 2015,
the implementation has been reworked to be once again simpler — but
with the same functionality.

2 1994: Original Implementation

Font-lock was a new feature in Emacs 19 — it was introduced right
around the time the Emacspeak project was started.
At the time, there were multiple font-lock packages in
Emacs. Emacspeak implemented voice-lock via a stand-alone module
that attached property personality to buffer contents. The
dtk-speak Text-To-Speech module treated strings annotated with
property personality as an aural display list when producing
spoken output.

In the winter of 1995, I implemented Aural CSS in emacspeak, and
this resulted in module acss.el — that module provides a clean
abstraction for defining values that can be assigned to property
personality. Next, the rest of emacspeak was overhauled to
express all voice-lock features via the ACSS abstraction.

3 2002 Overhaul

With feature font-lock now mature, Emacs itself converged on a
single font-lock module with jit-lock.el providing just-in-time font
locking. This meant that Emacspeak's voice-lock feature could now be
more easily implemented by attaching appropriate advice to lisp
functions put-text-property and friends — this led to the deletion
of module voice-lock.el and the creation of module

That module provided multiple options for how faces were mapped to

  • Cumulative where property personality was either appended or
    prepended to the list of personalities at any given position.
  • Simple: where the new personality directly replaced any previously
    applied personality property.
  • None: Where faces were not mapped to personalities.

4 2015 Overhaul

And now, in 2015, the code in module dtk-speak.el that implements
audio-formatting has been overhauled to directly map faces to
personalities. This implementation can be enabled by setting the
option emacspeak-personality-voiceify-faces provided in module
emacspeak-personality.el to All. This means that the new
implementation can co-exist (at least for a while) with the earlier
advice-based implementation from module emacspeak-personality.el.

once deemed to be stable, the new implementation will become the
default — by changing the default value of
emacspeak-personality-voiceify-faces to none.

5 Summary

From an end-user's perspective, nothing has changed in 21 years. From
the perspective of implementing voice-lock for Emacs modules, nothing
has changed — all that an Emacspeak extension for a specific package
needs to do to enable voice-lock is to set up a face->personality
mapping as before via function voice-setup-add-map. Note that
property personality will continue to have higher precedence than
property face with respect to the audio formatting that gets applied
i.e. Emacspeak first consults value of property personality, and if
that is not set, but there is a face property set, then that
face->personality mapping (if defined) is used as the aural style.

Date: <2015-08-18 Tue>

Author: T.V Raman

Created: 2015-08-21 Fri 10:18


Emacspeak:Setting up StumpWM as a speech-enabled Window Manager.

Emacspeak support for StumpWM

1 Summary:

Describes my Linux X-Windowing setup using lightdm to initialize the desktop and StumpWM configured as a talking Window Manager.
These files can be found under emacspeak/stumpwm in your Emacspeak installation, or in the source code cloned from

2 Overview

File stumpwmrc is my StumpWM init file that I use to set up
StumpWM as a talking window manager. With this setup, I run Emacs in
one window and Chrome+ChromeVox in another window.

File xsession is my .xsession file — it launches StumpWM once lightdm has finished authentication.
You can find my lightdm setup files in directory emacspeak/tvr/lightdm.

3 Contents

Interface to Emacspeak TTS servers.
Code to insert into personal =.stumpwmr
My= .xsession= file.
A light-weight screen-lock script.

4 Resulting Functionality

To set this up, You should only need to edit the value of
*emacspeak-dir* in the stumpwmrc file for setup.

  1. All Keybindings match my usual screen setup, including the window-manager prefix-key.
  2. C-\ is the window-manager key.
  3. Switching windows speaks the title of the new window.
  4. Stumpwm command for displaying window list C-\w also speaks the output.
  5. The init file provides a simple lock-screen command bound to C-\d.
  6. The above lock command invokes shell script xlock — that script takes care of playing an auditory icon when the desktop is locked or unlocked.
  7. Window manager messages speak automatically; this can be toggled with C-\t.
  8. If there is a lot of activity in a window that is not focused,
    you can turn off automatic speaking of messages using C-\t to
    avoid distraction.
  9. StumpWM is set up to deny raise-focus requests — this is so that activity in a window doesn't automatically grab focus.
    I typically run with only one window displayed at a time.

Date: <2015-09-07 Mon>

Author: raman

Created: 2015-09-07 Mon 14:44


Setting Up An X Environment For Using With Emacspeak, ChromeVox and StumpWM

Setting Up An X Environment For Using With Emacspeak, ChromeVox and StumpWM

1 Executive Summary

This is a follow-up to the article on my Window Manager set-up
and details the setup of my X environment. This setup is specifically geared around the following use-cases:

  1. Emacspeak running in a window to provide a local audio desktop.
  2. ChromeVox running in a second window to provide access to JS-powered WebApps. Note that for the content-oriented Web, I use Emacs' built-in EWW browser.
  3. SSH running in an XTerm to my remote Linux desktop in a third window. The remote desktop runs Emacspeak and produces auditory feedback through a local speech server.

The setup described below is implemented via my personal .XResources
file — that file along with my .xsession file that loads it are
both checked into the GitHub repo under emacspeak/stumpwm along with any needed helper files.

The remaining sections give a brief descriptive overview of the
.XResources and .xsession files as they exist at the time of

2 Resulting Functionality: What This Gives Us

  1. You can cut-and-paste between the local Chrome and local Emacspeak using standard clipboard copy/paste commands. Make sure Emacs is set up to use the clipboard, and not the primary X selection.
  2. Output displayed in the Xterm, e.g., by the remote Emacspeak session, can be brought into the local Emacspeak session by hitting PrintEverything bound to Ctrl-Return in the XTerm window.
  3. Contents of the local clipboard, i.e. Chrome, Emacspeak etc., can be pasted into the remote Emacspeak running in the XTerm using key Ctrl-Shift-Space.

3 Initializing X Session Via File .xsession

#Caps Lock is Control
setxkbmap -option ctrl:nocaps       
#load in XResources to customize X environment 
xrdb -merge $HOME/.Xresources &
#Display locks after  30 minutes of inactivity
xautolock -detectsleep -time 30  -locker  "$HOME/bin/xlock" & 
# Launch Emacs 
emacs  -title Emacs &
# XTerm for SSH to remote desktop
xterm  -title Retriever &
# StumpWM Setup: Use SBCL 
export LISP=sbcl
# Export our  X auth environment 
${HOME}/bin/export_x_info &
# Launch StumpWM
exec  /usr/local/bin/stumpwm

4 Customizing X Environment Via File .XResources

! Setup Emacs Visual Look And Feel
Emacs*font:     -adobe-Utopia-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1
Emacs.FontBackend:      xft,x
Emacs.menuBar:  off
Emacs.toolBar:  off
Emacs.verticalScrollBars:       off

:! Setup XTerm Look And Feel:

XTerm*Background:       black
XTerm*Foreground:       white
! Setup XTerm key-bindings to match Emacspeak
XTerm*VT100.translations:       #override \n\
Ctrl <Key>semicolon: string(0x18) string("@h") \n\
Ctrl <Key>comma: string(0x18) string("@a") \n\
Ctrl <Key>period: string(0x18) string("@s") \n\
Ctrl <Key>apostrophe: string(0x18) string("@s") \n\
Shift <Key>Return: string(0x18) string("@s") string(0x0d)\n\
Ctrl <Key>Return: print-everything()\n\
Ctrl Shift <Key>space:    insert-selection(CLIPBOARD) 

:! Configure rest of XTerm

XTerm*eightBitInput:    false
XTerm*faceName: xft:Inconsolata:pixelsize=14
XTerm*metaSendsEscape:  true

! is under emacspeak/etc in the Emacspeak Git Repository
! This helps us view XTerm output in a buffer in the locally running Emacspeak

XTerm.*.printerCommand:     /usr/local/bin/
XTerm.*.printAttributes: 0

!X Font environment
Xft*antialias:  true
Xft*dpi:        96
Xft*hinting:    true
Xft*hintstyle:  hintfull
Xft*rgba:       rgb

Date: <2015-09-21 Mon>

Author: raman

Created: 2015-09-21 Mon 09:14