Skip to main content

Sysadmin, interested in new technologies, communications, multimedia, accessibility, better Linux than Windows, better Android than IOS and similar.

pvagner

pvdeejay

mastodon.sk/@pvagner

Peter Vágner

Emacs A11y Tip #1: Introduction and how to install

6 min read

Emacs is a powerfull software. There are a few access solutions that enable blind or visually disabled people to make some good use of it.
Unfortunatelly getting used to it requires a bit more than launching, testing and using it.

I don't think I can write better documentation than Emacs tourEmacs documentation either available online or built into emacs it-self. However I'll try to post a few so called getting my-self and hopefully someone else ready to make the most of it.

Why emacs?

Because it's more than a text editor. It can run on almost anything, it's keyboard driven since its start, it's still being maintained, there is a huge community of emacs users.

What access solution?

I've chosen Speechd-el for now because it concentrates on what it has been designed for and is known for overriding as little emacs built-in stuff as possible. Hopefully I'll be able to borrow from other general and community provided tips later on as I discover them. Here's a discussion thread that inspired me. And the F123E initiative made me to start writing this series of posts.

Where and how to install it?

I've chosen Arch linux as my operating system of choice a few years ago because of its philosophy, its rolling release cycle so there is no need for a reinstall every so often and awesome but easily embraced packaging system that encourages creating own packages almost every time while installing something new avoiding dependency issues or other conflicts and any other kind of possible mess in general.

Installing is just a breeze. Emacs it-self can be installed from the Arch community repository by typing
sudo pacman -S emacs
Originally I've opted for nox package variant so I can run it on the text only console and I can be assured I won't turn into issues with graphics. I am now reconsidering that because it appears it would be nice to able to copy and paste between emacs and Firefox for example in the future.

Speechd-el has some hard dependencies. It's developed to speak by using speech-dispatcher. Except of speech-dispatcher, I need to install speech-dispatcher supported TTS engine. I'm using eSpeak with other screen reading apps so I'll just make sure both speech-dispatcher and eSpeak are installed at this point.
sudo pacman -S speech-dispatcher espeak
If you are already running orca on linux you should skip installation of these two as it's sure you do already have them working.
You can test if speech-dispatcher is working by typing in
spd-say hello

Speechd-el can be installed from the AUR.
cd /tmp
wget https://aur.archlinux.org/cgit/aur.git/snapshot/emacs-speechd-el-git.tar.gz
tar xvzf emacs-speechd-el-git.tar.gz
cd emacs-speechd-el-git
makepkg -s
sudo pacman -U emacs-speechd-el-git-*-any.pkg.tar.zst
All the above commands should be typed one at a time exactly as written except of the last one. In that last one you will have to find out the proper filename of the package you've just built.

How to activate it?

There is a file called .emacs you can put into your home directory to instruct emacs to do something while it's starting.
For now I won't be looking at if this is the proper emacs way of doing things because I am just at the beginning. My immediate goal is getting my current tools of choice working. So here are a few lines I have saved into my ~/.emacs file:
(setq speechd-out-active-drivers '(ssip ))
(autoload 'speechd-speak
"speechd-speak" nil t)
(speechd-speak)

What to do on the first run?

Now you can run
emacs
and it should start talking.

 

Emacs will display some introductory text in the default buffer. Buffer is kind of technical term however in the Emacs terminology it means a document open in the editor or otherwise generated content forming a document we can interact with.

To describe some commands we can use at this point we have to know that Emacs has implemented a lot of keyboard shortcuts and keyboard shortcuts configuration is layered. There are single key shortcuts multiple keys shortcuts or even shortcuts that consist of multiple keypresses one after the other.

When describing keyboard shortcuts a lot of keypresses are ordinary keys such as letters combined with either control / ctrl refferred to as C or meta / alt often reffered to as M . Other Emacs keynames include previous and next for page up / page down respectivelly, spc for space and esc for escape. Ofcourse there may be more.

Here are some command keys you can use to navigate over the text at this point:

  • C-f - next character
  • C-b - previous character
  • M-f - next word or next item
  • M-b - previous word or previous item
  • C-p - previous line (in read only buffers it's often enough to press p alone)
  • C-n - next line (in read only buffers it's often enough to press n alone)
  • C-a - start of a line
  • C-e C-e - end of a line - yes this is overridden from a standard emacs install by Speechd-el. Emacspeak does the same thing as far as I know.
  • M-a - previous sentence
  • M-e - next sentence
  • M-less than symbol - begining of a buffer
  • M-greater than symbol - end of a buffer
  • F10 - menu bar
  • M-` (meta and back tick) - another way of showing the menu bar
  • C-H t - Emacs tutorial
  • C-x k - kill / close a buffer
  • C-e d l lang - change speech-dispatcher language within speechd-el. lang is abbreviation of your language code such as en, sk, cs, ru, de, fr, pt and similar.
  • C-x C-c - exit emacs

Summary

 

If you haven't managed to get Emacs with Speechd-el running go through this post, try out the commands and follow the Emacs tutorial.

 

What if I am using Emacspeak?

 

Please see this excelent guide by Alex Midence as an addition to this.

Peter Vágner

I'm just wondering can we also tag posts using ?

Peter Vágner

I've just found out @Google AOSP edition does not cope well with recicler views. I need to move to the updated but closed source

Peter Vágner

Does anyone know if it might be possible to plug support to ?

Peter Vágner

Yeah! Have managed to rescue 129 GB c:\Users folder for someone. faulty HDD, broken partition table

Peter Vágner

Oooops, unfortunatelly I've also just came accross malware infected ubnt Air OS based device tonight.

Peter Vágner

If you happened to upgrade your Seafile server from 5.1 to 6.0 beta, you should read this https://forum.seafile.com/t/failed-to-get-libraries-information-on-6-0-1-6-0-2/436/15 upgrading to 6.2+ is fine

Peter Vágner

tinyupload.com appears to be simple and working site for occassional uploads up to 50 MB per file.

Peter Vágner

Please stop hammering server I manage aka I do need to improve the firewall rules.

Peter Vágner

is yet another @Firefox fork that is claiming better efficiency but also removes all goodness in the process.