Skip to content

Instantly share code, notes, and snippets.

@leavesofgrass
Last active February 3, 2022 17:42
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leavesofgrass/fbad2634de851f85b3acb1fa4efb27a2 to your computer and use it in GitHub Desktop.
Save leavesofgrass/fbad2634de851f85b3acb1fa4efb27a2 to your computer and use it in GitHub Desktop.

Building Emacspeak: Making GNU Emacs Accessible

In 2015, I started diving deeper into GNU Emacs because I saw its potential as an assistive technology. Not only as a way of providing better access to books and code for my students and clients, many of whom are blind, but also as a tool for creating more accessible content. Regular expressions and modes like Org, Markdown, and AucTex are extremely useful in the production of alternate formats.

Although I had used Emacs as a vanilla text editor off and on since the 90's, I didn't learn anything about the underlying Emacs Lisp (elisp) programming language until the end of 2015, when I got a hardcopy Emacs manual, quit my day job, and grew the requisite "LISP" beard.

Emacs and Emacspeak have since become everyday tools for me. From editing documents and drafting email, to reading feeds and posting to social media, I do all of it from within the accessible Emacs interface that is created with Emacspeak and my own custom elisp.

How I build the latest GNU Emacs with Emacspeak in Ubuntu 18.04

  1. Make source code repositories available to apt by uncommenting

sudo sed -i 's/# deb-src/deb-src/g' /etc/apt/sources.list

  1. Update sources list

sudo apt update

  1. Upgrade any packages that are out-of-date

sudo apt upgrade -y

  1. Install some dependencies

sudo apt install git tclx8.4-dev -y && sudo apt-get build-dep emacs25 emacspeak -y

  1. Fetch GNU Emacs source code with git

cd ~

git clone -b master https://git.savannah.gnu.org/git/emacs.git

  1. Fetch Emacspeak source code with git

cd ~

git clone https://github.com/tvraman/emacspeak

  1. Build and install GNU Emacs

cd ~/emacs

./autogen.sh && ./configure && make && sudo make install

  1. Build Emacspeak and install site-lisp

cd ~/emacspeak make && sudo make install

  1. Build optional speech server (I use IBM ViaVoice Outloud which gets installed before this)

cd ~/emacspeak

make outloud && sudo make install

  1. Add an environment variable to your shell config file for the speech synthesizer you want to use (change espeak to outloud if you want to use outloud)

sed -e "\$aexport DTK_PROGRAM" ~/.bashrc

sed -e "\$aDTK_PROGRAM=espeak" ~/.bashrc

  1. Source the config file so the shell recognizes the changes (or logout and login again)

source ~/.bashrc

  1. Add emacspeak setup to your Emacs init file

sed -e "\$a(load-file "~/emacspeak/lisp/emacspeak-setup.el")" ~/.emacs

  1. Run Emacs

emacs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment