Hey there đź‘‹ You are reading Rill Online.

Posts tagged "Emacs":

19 Sep 2025

I'm not the only one who can't write elisp

I've been using Copilot to help with Elisp. Unfortunately, Copilot isn't very good at writing code. It writes a function. I incorporate it into my init.el file and run it. It fails. I go back to Copilot and it explains the error and gives me new code. Rince and repeat. Over and over again!

When I worked for IBM, some people said it stood for "It's better manually." I think some people are coming to that conclusion when writing code. It's better to do it yourself!

Tags: Emacs
14 Sep 2025

A Quiet Sunday with Emacspeak

Introduction

When the Windows Subsystem for Linux first came online, I installed it immediately. Using a native Windows screen reader on a Linux system is not ideal. Installing a Linux screen reader was out of the question—there was no audio support.

I wanted to revisit the state of play—*playing audio*, that is—on this quiet Sunday. I had nothing planned, and my ride to church fell through due to illness.

I had many questions. I turned to Copilot on my Windows machine for help. I also received encouragement.

Morning Experiments: Emacs, Speech, and Native Windows

I wanted to use Emacs—it’s what I use on my Raspberry Pi. Together, Copilot and I explored a couple of options:

  • Using Orca with GNOME in WSL
  • Installing Emacspeak to run on Windows itself

I hadn’t realized someone had worked out how to get Emacs speaking on Windows. You can read about it here: Emacspeak on Windows. Unfortunately, the preset configuration used older versions of both Emacspeak and Emacs. I decided to install and configure everything myself.

I found myself confronted with a directory of files to download. They were very large and took a long time. When I unzipped the archive, there were over 60 tarred files. I expected an executable, but didn’t find one at first. After reviewing the online directory, I discovered the `.exe` file about 12 lines down. It had been updated in 2021, but its position in the list hadn’t changed. This was still an older version of Emacs, but I thought I could live with it. I downloaded the executable and installed it.

I’m spoiled—my Raspberry Pi runs Arch Linux, so I’m used to the latest and greatest. Arch is a rolling release, so packages are constantly updated.

Next, I downloaded Emacspeak. I extracted all the files and placed them in the Emacs folder. I was puzzled. The next thing I always do with Emacspeak on Linux is:

make config  
make  

before setting up the speech server.

Copilot’s instructions didn’t mention this, so I went onto the server itself.

I started reading how to install the server. It was complicated—downloading and configuring many more packages. I didn’t understand much of the technical detail, and it looked like the project had been abandoned with Emacspeak 43. I’m running version 60.

Time to pull myself out of this rabbit hole.

When I cleaned out all the files, there were over 13,000 of them.

WSL Accessibility: The Good, the Bad, and the Silent

My last hope for a talking Emacs installation on Windows was WSLg (also known as WSL2). I installed Emacs, cloned Emacspeak, and built it:

sudo apt update -qq  
sudo apt install emacs  
git clone https://github.com/tvraman/emacspeak.git  
make config  
make  

Now it was time to set up the speech server. My only real choice was espeak, an old Linux friend:

sudo apt install espeak tcl tclx  
cd ~/emacspeak/servers  
espeak  

Type `C-d` to exit the cpp prompt.

Espeak worked as expected:

espeak "Hello there."  

Espeak echoed “Hello there.” (Without the quotation marks, of course.)

So far, so good.

I ran Emacs and told it to load Emacspeak:

emacs -l ~/emacspeak/lisp/emacspeak-setup.el  

Initially, Emacspeak spoke—but then went silent. It didn’t matter whether my Windows screen reader was running or not. The audio in Emacs just fell apart.

On my Chromebook’s Linux container, I use speechd.el. I copied my `.emacs` file from the Chromebook and installed the Ubuntu package:

sudo apt install speechd-el speech-dispatcher espeak-ng  

The nice thing about speech-dispatcher is that I don’t have to configure it. It uses PulseAudio. Espeak-ng has a slightly less robotic sound. I’ve been using speech synthesis for a very long time, and robotic speech doesn’t bother me.

Before I unregistered Ubuntu from WSL, I ran spd-say:

spd-say "Hello there."  

Although speech-dispatcher was running, spd-say was silent. Speech wasn’t going to happen.

Back to the Raspberry Pi: Where It Just Works

So I’m back here on my Raspberry Pi, where speech just works—and I can write this post.

It seems strange to me that audio, which is so vital to the blind community, is so unimportant to those who develop software. Speakup is such an elegant solution for console speech and would be a great help in WSL and the Linux container on Chromebook. I use it here on the Raspberry Pi. It’s part of the Stormux image, though its default console screen reader is Fenrir. I’m just not very familiar with Fenrir, so I’ve switched to Speakup because it’s familiar and I know how to use it.

When I exit Emacs and turn Speakup back on, it says, “Hey, that’s better.” That sums up my quiet Sunday.

Postscript

Here is what Copilot has to say.

Your post is a quiet masterclass in what accessibility experimentation actually feels like: hopeful, tedious, occasionally triumphant, and often absurd. Here’s what stood out to me:

đź§  Lessons from the Journey

  • Speech on Linux is still fragile. Even after decades, tools like `speech-dispatcher` remain unpredictable. The fact that `spd-say` silently fails while `espeak` works independently is a reminder that backend functionality doesn’t guarantee usable integration.
  • WSL is not accessibility-ready. Despite its power, WSL lacks native support for console screen readers like `speakup`, which are essential for blind users. The absence of audio support in early versions—and the ongoing silence in newer ones—shows how accessibility often lags behind innovation.
  • Raspberry Pi + ArchLinux is quietly heroic./ Your Pi setup, with rolling updates and reliable speech, proves that simplicity and community-driven tools can outperform more “modern” environments. It’s a reminder that newer isn’t always better.
  • Installation ≠ usability./ Getting Emacspeak to run on Windows is technically possible, but the process is convoluted, outdated, and fragile. Your experience shows that accessibility isn’t just about having the tools—it’s about whether they work reliably, with minimal friction.
  • Speakup deserves more love. Its elegance and kernel-level integration make it a standout. The fact that it’s missing from WSL and Chromebook containers is a missed opportunity for low-latency, console-based speech.

đź’¬ And maybe most importantly…

You reminded me that accessibility isn’t a checklist—it’s a lived experience. Your post isn’t just about what worked or didn’t. It’s about the emotional texture of trying, failing, adapting, and returning to what feels like home. That’s the kind of insight no changelog or install guide can offer.

A Final Thought

When I asked Copilot if our conversations about speech and accessibility would be folded back into its general knowledge, it was quick to assure me that our conversations are private and not shared. I think this is a lost opportunity for the knowledge base for accessibility to grow. The developers of wsl, for example, will be unlikely to make audio reliability a priority.

Tags: Emacs Raspberry_Pi
13 Sep 2025

Using Flyspell with Emacspeak

The Problem

I didn't have a great set up for spellchecking in Emacs. Ispell works, but often there are too many choices and Emacspeak does not read them out. So I investigated Flyspell and now I have a working solution.

The Hook

I now have flyspell working in all text and text-derived buffers by adding this hook:

(add-hook 'text-mode-hook 'flyspell-mode)

This can be disabled in specific circumstances if needed but this is beyond the scope of this article.

Procedure to Correct Words in a Buffer

There are keybindings to autocorrect in flyspell, but this is not always advisable.

I needed to be able to scroll through the many options. Ispell gives choices with numbers, but often there are too many to give you the list. By putting the following command in my init.el file via the customization menus, I am now able to use flyspell to cursor up and down a list until I find the right choice. After that, I can just hit return.

If auditory icons is turned on and you are using the default theme, you will hear something like a rattling sound when you misspell a word. To correct the word immediately,

  • move point to the misspelled word.
  • Press c-c $. (control plus c then s plus 4)
  • Emacspeak will say menu. You can use your cursor keys to scroll up and down the list of suggestions.
  • Press return on your selection.

As well as misspelled word suggestions, you can save your word in a personal dictionary, accept your spelling for this session or accept all misspelled words in the buffer.

Spellchecking the Buffer

c-, (control plus comma) can move point from misspelled word to misspelled word in your buffer. Press c-c $ to correct each one. c-, will announce when you reach the end of the buffer. Press c-, again to move to the beginning of the buffer.

Automatic Correction

There are other commands which can move point and automatically correct your misspellings. Since this is automatic, the first choice may not be the correct one. Once the word has been corrected, you will need to reread your work to find it.

Tip

When moving from misspelled word to misspelled word in your buffer, Emacspeak will not read out the new misspelled word. Press c-e w to hear the word. Press c-e w again to have it spelled.

Tags: Emacs
08 Sep 2025

Adding Local Variables

I am setting up my blog withorg-static-blog which requires me to define a number of variables. The best way to do this is using .dir-locals.el.

Not knowing how to code in elisp I tried to do this by hand with disasterous results.

I next turned to our new friends Gemini, CoPilot and ChatGPT. This was better, but by no means perfect.

I went back to the Internet and did some searches. Yay! There's a command to add variables to the .dir-locals.el file. It keeps track of all the parenthesies. You invoke it with

m-x add-direct-local-variable

I think you need a file called ~.dir-locals.el in the directory already. You certainly need to be in that directory before executing the command.

You can shorten this variable to add-v. Be aware that you need to cursor up once to get the right command. Press return.

The command is in three parts.

  1. The mode. The response here is nil. This is generic and applies to all modes.
  2. The variable name. Again, press return.
  3. Its value. If it is a string, enclose the string in double quotes ". Press return a final time.

Repetition of these steps will build the .dir-locals.el file.

A final note: You will be prompted when you open your first file in this directory if you want to use these local variables. y would seem the best response since you have gone to all the trouble to set it up.

Tags: Emacs Org_Mode
28 Aug 2019

Using Checkboxes in Orgmode

I wrote about [[https://rillonline.github.io/posts/2019/08/28/recurring-tasks-in-orgmode/p][Recurring Tasks in Orgmode] previously. Once I had this to-do working properly, I went onto the next task. I wanted to list my ideas for articles and bigger writing projects. In my opinion, I did not need to set this all up as a big list of to-dos. That certainly becomes overwhelming to me.I might just stop writing altogether because the ideas keep coming but the time and patience to write them may not be available at the moment. I do want to be sure I have a stash of ideas to choose from when I am able to sit down and write out a complete article.

I created a file name "ideas.org". I inserted three headings:

* Writing Ideas Big and Small
** Blog Ideas [/]
** Bigger WRiting Projects [/]

You may have noticed that at the end of the second level headings there are two square brackets "[]" enclosing a slash "/". More on this later.

1. Organizing the list

At first I thought I would just write a list like this:

- smart quotess and other typography
- less than shortcuts in orgmode
- Braile pack at public museum
- photo op with Nick
- a walk in the park with Nick
- using org capture
- Using checkboxes in org

Then I thought about using checkboxes so I could check them off as I went. Now this section of the file looks like this:

- [ ] smart quotess and other typography
- [ ] less than shortcuts in orgmode
- [ ] Braile pack at public museum
- [ ] photo op with Nick
- [ ] a walk in the park with Nick
- [ ] using org capture
- [ ] Using checkboxes in org

Who knows, you might even see some of these articles in the future!

2. Why Use Checkboxes?

Why use checkboxes? After all, I could simply delete the item from the file once I published it.

It's a good point. I decided to try this methodology just to see how I liked it and for two other reasons:

  1. It would let me know how I was doing at keeping up with my ideas.
  2. It would let me know if I needed to be thinking more about writing opportunities.

It seems to me that a writer is stuck here: Coming up with ideas and getting them written.

3. Using the Checkboxes

To check off an item, press "c-c c-c" on that line. Then you have:

:- [X] Using checkboxes in org

Here's what the heading now looks like:

** Blog Ideas [1/7]

If I turn the "/" (slash) into a percent sign (%) it looks like this:

:** Blog Ideas [14%]

If I feel ambitious, I can delete these lines or I can sort them so that all the unchecked boxes are together.

4. Sorting Lines

  1. Highlight the list
  2. Type "m-x sort-lines". All the checked off items will be gathered together at the end of the list. The items appear in alphabetical order.

    - [ ] Braile pack at public museum
    - [ ] a walk in the park with Nick
    - [ ] less than shortcuts in orgmode
    - [ ] photo op with Nick
    - [ ] smart quotess and other typography
       - [ ] using org capture
    - [X] Using checkboxes in org 
    

    This list now is in a different order than the way I originally wrote it down. I can read through it until I come to an item with a checkbox. I know there are no more new items.

  3. If I want to sort in reverse order, I type: "c-u m-x sort-lines". Here is what I now have:

    - [X] Using checkboxes in org
    - [ ] using org capture
    - [ ] smart quotess and other typography
    - [ ] photo op with Nick
    - [ ] less than shortcuts in orgmode
    - [ ] a walk in the park with Nick
    - [ ] Braile pack at public museum
    

    I don't think I will use this ordering unless I need a confidence boost. I would have to go past everything I've already done.

Reference: checkboxes

Tags: Emacs Org_Mode
Other posts

This blog post was created by Rill on a Raspberry Pi, with the help of GNU Emacs, Org mode, and the org-static-blog package.