Getting Around in Doom Emacs

The following post is part of my new Emacs Writing Setup. You can find the complete setup here on GitHub:

A big part of writing is putting the notes I’ve made into some sort of order. I spend a lot of time joining notes together to make scenes and then rearranging those scenes. Scrivener is good at the rearranging part (I’ve written about this here.) Where Scrivener falls down is the flexibility of search. Emacs allows me to home in on a scene, an idea or a sentence almost instantly.

I copied some of my writing process from Scrivener’s model, even going as far as writing a simple Emacs Scrivener mode. Doom Emacs has rendered that unnecessary. Tools like ripgrep and consult make it far quicker to find what I’m looking for. If you’re unfamliar with the following commands, try them out. You’ll be pleased that you did.

One last thing. Doom Emacs calls different commands depending on which completion engine you’re using. This means the search syntax may vary. I use the default (vertico at the time of writing) which means that searching for apples oranges will return lines containing apples and oranges. In other words: when searching, type one word for an initial selection, then a second to narrow it down.

10.0.1 Searching in Projects

  • SPC SPC find file in project
  • SPC s p search project for text
  • SPC s P search another project for text
  • SPC s d search files in directory for text

10.0.2 Searching in Buffers

  • SPC s s helper function search for text in current buffer. Matches are displayed in another window.
  • SPC s j helper function that goes to entry in evil’s jump list
  • SPC m . Jump to org heading (uses consult-org-heading)

And don’t forget

  • C-c C-j org-goto

10.0.3 Useful Tips

  • SPC s o Search online. t will search online dictionary, T thesaurus
  • Find an unmatched quote using this regex ^[^"]*"[^"]*$

10.0.4 M-x consult-ripgrep

For a more flexible search try consult-ripgrep. It’s worth reading the documentation, but here’s a taste:

  • #alpha beta Search for alpha and beta in any order.
  • #alpha.*beta Search for alpha before beta.
  • #\(alpha\|beta\) Search for alpha or beta (Note Emacs syntax!)
  • #word -- -C3 Search for word, include 3 lines as context
  • #first#second Search for first, quick filter for second.

Adventure Game 8: Making a Playable Game

Now we have a working game engine, we need to make the game more interesting.

We can do this in a number of ways.

  1. Think of an interesting setting: in a castle, on a spaceship, in a school for witches and wizards…
  2. What quest are we setting the player? To find the gold? Escape from the space station before it explodes? To find the spy?
  3. How about adding some characters: dragons, vampires, aliens, zombies?
  4. What sort of objects could we use? Magic wands, rayguns, teleporters?
  5. What sort of puzzles and riddles could we add?


  1. Think of the setting for your game. What does the player have to do (what’s their quest?)
  2. Draw a map for your game (see lesson 1 for an example) Don’t add too many locations – 16 is more then enough.
  3. Think of the objects the player will have to use and add them to the map.
  4. Make a note of the game play. What will the player have to do to complete the game.
  5. Now modify the code of the game engine to write your own game.
  6. Get your partner to play the game and feedback.
  7. Make any improvements to the game.

Why does the UK Government say I have to buy a Microsoft System?

In the UK, you need a DBS certificate for certain jobs or voluntary work, e.g. working with children or in healthcare.  Most people don’t think of it as another tax , but it is, and one that disproportionately affects the low paid.  It wasn’t until I tried to renew this certificate for a friend on my open source Linux system that I realised there was another tax.  Apparently you also need to buy a Microsoft License:DBS
I’m looking forward to the time when you have to use Apple Pay, that way I can subsidise two US corporations at the same time.