Emacs APAC: Announcing Emacs Asia-Pacific (APAC) virtual meetup, Saturday, November 28, 2026

This month’s Emacs Asia-Pacific (APAC) virtual meetup is scheduled for Saturday, November 28, 2026 with BigBlueButton and #emacs on Libera Chat IRC. The timing will be 1400 to 1500 IST.

The meetup might get extended by 30 minutes if there is any talk, this page will be updated accordingly.

If you would like to give a demo or talk (maximum 20 minutes) on GNU Emacs or any variant, please contact bhavin192 on Libera Chat with your talk details:

-1:-- Announcing Emacs Asia-Pacific (APAC) virtual meetup, Saturday, November 28, 2026 (Post Emacs APAC)--L0--C0--2026-11-27T17:31:37.000Z

Sacha Chua: Emacs by Voice meetup

Emacs, speech recognition, dictation, voice commands, speech synthesis

Download the unedited transcript

  • 0:00 Introduction
  • 0:32 Human-Computer Interaction (HCI) research into dictation challenges, voice repair
  • 3:42 The window manager
  • 4:28 Earwig
  • 5:49 An overview of related research papers
  • 8:04 Composability
  • 8:20 Discoverability
  • 9:37 Using large language models for voice repair
  • 14:11 A hybrid model combining dictation and typing
  • 15:43 Independent changes, and sharing ideas
  • 17:08 Hammerspoon
  • 22:00 Learning how to communicate with the computer via voice is like learning to type
  • 22:40 More attempts
  • 23:10 We need a which-key
  • 23:22 More attempts
  • 24:52 Emacs, Hammerspoon, and the browser
  • 25:56 More dictation challenges
  • 27:38 Command mode and dictation mode
  • 28:40 Mispronunciations and dictionaries
  • 31:35 Complex commands
  • 47:50 Muscle memory
  • 49:13 Personalization and collaboration
  • 52:33 Composing sequences of commands
  • 53:48 Transcription in the background
  • 54:50 Talking when there are other people around
  • 56:02 Emacslisten and Emacspeak
  • 57:02 Recording on the go
  • 59:25 Predicting the next token in phony
  • 1:00:32 Interactive completion interface for phony commands
  • 1:01:39 Working with other applications
  • 1:02:19 Voice repair with LLMs
  • 1:03:23 String distance
  • 1:04:11 Prioritizing more literal matches
  • 1:05:09 Approximate match on invisible text
  • 1:06:13 Constrained grammars and Talon Voice
  • 1:08:02 Multilingual
  • 1:10:46 Editing text
  • 1:14:44 Large language models and context
  • 1:17:26 Using Emacs to talk to websites
  • 1:18:16 Communicating with terminals from Emacs
  • 1:19:18 OBS and other programs with sockets
  • 1:19:59 Youtube and org mode
  • 1:21:35 Customizing emacs for your needs
  • 1:23:13 Little microphones
  • 1:26:23 Maybe a monthly meetup
  • 1:27:14 Back to talking about inexpensive little microphones
  • 1:28:58 What's next
  • 1:30:58 Figuring out a smoother on ramp
  • 1:33:50 Monitoring multiple audio devices
  • 1:36:10 Directing speech recognition results into etherpad
  • 1:37:33 Questions and answers from irc
  • 1:38:35 Transcription in the background
  • 1:40:36 Mostly constrained by imagination
  • 1:41:30 Putting it to work
  • 1:42:43 Sharing common components
  • 1:46:40 Modifying how phony parses things
  • 1:49:18 Regular expressions
  • 1:59:32 Figuring out words in context
  • 2:01:33 More about voice repair in large language models
  • 2:02:17 Regular expressions, and grammar portability
  • 2:03:47 Talon voice

Transcript (unedited)

0:00 Introduction

other: You can see my screen now, right? Yes, we can. You're welcome. okay.

me: Oh, I had to click on the go live button. Thank you for letting me know. I had not set it up to to go live, so I'm so glad you told me. One time I had a I had a stream and I forgot to hit the go live button like until twenty minutes into the thing.

other: YouTube is really weird anyway, so I know.

me: So this is good. We're making progress.

other: I know.

me: All right, yes.

other: So, um

0:32 Human-Computer Interaction (HCI) research into dictation challenges, voice repair

other: I read some papers, and there's a lot about transcription, but I think that the kind of work that we're trying to integrate everything. It's not really heavily uh explored in literature. One of the things I was reflecting is that we really are trying to solve four pro uh four problems at the same time. So we have the problem of transcription, and as I said, I think that that's relatively um uh solved. And then we have the problem of editing. Whether it's text that we already have. or is text that we are uh transcribing. And uh The technical term I just discovered is called voice repair. And uh, so I think that is actually valuable in terms of searching for uh those concepts. And I think that, um, Editing is is is quite interesting because the problems of editing transcription are different than the problems of Just Perhaps. Editing text that we already have. um input via the keyboard or anything like that that is relatively correct. And then we have the problem of the commands. And this is actually where I'm the most interested on these days. How do we execute commands? In a way that it is kind of universal. And uh, but managing risk, because I think that's the fundamental problem with with voice, that we have ambiguity. We don't, we uh, we are never sure whether the computer is going to interpret what we want to say in the way that we want. So I don't want it to destroy my computer because it understood a different command than the one I wanted. And I think that um commands are relatively solved with the infrastructure that you have um uh developed, Sacha, because Um As long as we don't have parameters. As long as we don't have parameters. So if we can create a command that doesn't take parameters, we can get. The computer to execute it. And so, but one of the things that fascinates me is that Emacs has the ability to run any command by name. And not only that, but it has it is very, very smart in a way that it separates any function. From an interactive function. And how it creates a language of description of the interactivity with the user. Whether it's a string, a file, a function, a number, et cetera. So I started to wonder. Why is that we don't take advantage of that? Why is that we are basically just trying to call the commands and then deal with whatever comes next? In a different way. Why is that we don't create infrastructure that we can just say? Just call this command and it has whatever parameters that is defined with interactive, we're going to deal with them with voice. >> Yeah, that would be really cool. >> I think that that's kind of bringing it a little bit to our near next next layer. And um, and of course, there's also the issue of once you are outside Emacs. Then what do you do? Because as long as you're inside Emacs. Then everything is fine, but the moment that you want to actually interact with other applications, and and we have talked about this in the past, uh, you use Firefox, Spook uh, Spookfox. Um, I develop an extension to be able to actually talk to the browser within Emacs because you want to be able to control everything from just one single place, right?

3:42 The window manager

other: And but I think the window manager is kind of the other stage. So if you have a window manager that is extensible. Then you can essentially try to do the same. Whether with the same infrastructure as Emacs or through Emacs calling the window manager. And uh, but I think that um The window manager is another one of those natural places. where voice uh needs to live, no voice control needs to live. Mac OS has been doing it for a very, very long time, but it's a very simplistic way of essentially executing a command that you have predefined. And uh, so you have the same problem as we have with uh with funny that you have to define commands before you can call them. And they cannot take parameters and things like that. And...

4:28 Earwig

other: So then I started to experiment with earwig. And um I don't know if you have tried. And uh so uh Let me actually move this. >> I >> So Whoever this T H and >> I only just came across E rig last week, so yeah, I haven't tried it yet. >> Yeah, whoever this is T H N D R Burr. Is He essentially has implemented the basic infrastructure that you have created in a way that people can just download as a module and then use it. Uh, before I discover it, um I was trying to reproduce, like many others, your environment. And then you get into the issues that you have already dealt with, like timing, uh, utterances, uh, the spacing between them. So there are problems that everybody who starts to go into that into this immediately understands, right? And uh, so then I I I developed an extension on top of um IRI called Onivaben. And I'll I'll actually demonstrate that. And uh, and then the last thing I actually did was. Let's try voice repair. As just a a something that The LLMs can actually do. I think the little lips are are excellent to do that. And tap. So so that's kind of. The different things I was actually uh exploring. Um

5:49 An overview of related research papers

image from video 00:05:50.000other: The four papers I think that they're interesting, but the one I really want you to think about is the following. This is the paper. Uh so

image from video 00:06:09.233other: These people, what they did was extremely simple. This is a guy paper. What they did is to have two people transcribing. One person transcribing the other. And it's such a simple idea, and it really highlights the challenges of transcription. And they handled in two different uh environments. And one of them was A person is able to see the screen. Think of it like pair programming, where the other person is transcribing, but it's not able to touch the keyboard. Yeah. And the other person And the other uh environment is where Up uh, the person is not able to see the screen. It's only transcribing. It's like in the other side of the computer. And you realize that there are a lot of very interesting um commands that a person actually utters. That they're not really what we are trying to do some when we are thinking about Emacs, because the way that we think about Emacs. So, so think about this. Think about actually asking asking, for example, your daughter to dictate you something. And then see what happens and then how she actually edits that text as she's trying to tell you what it is. And for example, next paragraph, or go back to two words or two lines, or things like that, which some of those we have already solved with some of some of the some of the commands they have created. But it actually brings another way in which we tend to interact. with dictation as we are correcting it on the fly. okay, so that this is actually, um, I can actually um I'll I'll share with you the citations. They're already here. Uh, so this is uh sorry, uh. Uh Alpist. Excuse me. >> I'm looking forward to reading that. I mean, amusingly, my daughter actually does dictate her homework to me. So Familiar with the scenario. >> okay, so you understand, you understand these problems then already. And uh, but anyway, so this was actually a very, very interesting experiment, in my opinion. And uh, and then there are other papers that basically do a little bit of of the um Of the the the Basically, break down the different challenges.

8:04 Composability

other: One thing that I found very interesting is this idea of composability. So combine dictation, editing, and application control at the same time, which is essentially what we're trying to do. That's what the the voice people call uh essentially what we're trying to create in Emacs.

8:20 Discoverability

other: And there's also very interesting aspects that I think that we tend to forget, which is one of them is discover discoverability. Because once you start speaking, it's like Oh, what were the commands that I can say? How do I remember what are the different things? So I think that there's actually a lot of issues that the people in HCI have actually dealt with. And um, so I think that there is a lot for us to learn um in that sense. okay, so >> I love this. I love the the research background you're bringing to it. >> Yeah, of course. So you know, you know, uh, that's my job. So I bring that. So here's an example of voice repair, okay? And tab. So This is essentially something that I dictated. And I'm actually just reformatting it. >> I'm going to tell you right, like right. Do you know about M-q and you can use that to fill the paragraph? >> Yes, but I I actually I didn't want to specify the width because if I do it, it will actually do it like. >> okay. >> Way beyond. Oh, I I should use visual mode. Visual mode, that's the one. >> All right. okay. okay. >> And Yeah. >> Here we are. >> And that has been one of the things that I learned in the last six months to use visual mode more frequently. Especially because a lot of applications are expecting markdown in just one single line. And that So

9:37 Using large language models for voice repair

other: So this is imagine, so this is actually um. One of those dictations. That I have completed and now I need to repair. So the way that that we tend to do it is by going back and doing one thing at a time. This is the area where DLMs are actually great at helping us. okay. So I create a small function and Uh, voice uh repair. Region. So if you read this, um Oh. For example, the number one, number two, number three. Uh Then there is delay the last two sentences. Replace globally Sacha for great Sacha. And so I'm going to send that to the lem. And we'll see what it returns. >> Yeah, formatting. >> And then it does it does the formatting. >> Yeah. >> Now. I ask it to. To rub between brackets. Anything that DLM was not totally sure about. Um. Uh, visual. Line mode. And so the idea essentially is that I get a little bit of information about where to look for potential errors. Now, one of the aspects of LM editing text. Is that It's very hard to see diffs. You need to read everything again. >> I have something for that. >> It's it's like reading papers. Once the student finishes, you have to actually go and read everything from the beginning. So that creates a little bit of a challenge. So is it worth to actually ask for a full repair or do you prefer to repair it? I think it depends on the balance of how much you have to do. versus um um how quick you can you uh uh sorry how much you have to do versus how quickly you can actually do it. And that's essentially what the user defines. But I really like actually the fact that with a relatively simple prompt, 20 lines, I can actually get. to this level. Where it fixes a lot of the problems. You probably have noticed they would once once you start speaking, if you stop for a little bit, then it Thinks that they are two sentences, that should be together. >> That w that's yeah. Yeah. >> And those are the kind of jobs where the LLM is actually very good at doing that, right? Um With Mm-hmm. Yeah. >> I I would be very interested in seeing your prompt. Um, and the second thing that I want to say is for the purposes of comparing, uh, if you use gptel rewrite, then you can get a diff. Uh, but you can also modify it so that like you can write some code or have your LM generate some code to use a W diff instead, which is a word-based diff. So one of the interfaces that I've been playing around with, uh, the idea is to show the word-based diff so that the the the additions uh or changes jump out at you because it's fontified differently and then be able to use voice or mouse or keyboard to accept or or modify certain changes. And I haven't nailed down the interface yet, but the Dul D diff might be an interesting approach. >> So we we think alike, uh, because I already implemented it with GPT write uh rewrite. And uh, but it is very difficult to actually see depths of of text that you're editing. Because in this case, we're actually also breaking the lines. >> Yeah, yeah. Yeah. >> And so it becomes a little bit complicated. So I'm not totally sure whether that's actually the best way to do it or not. >> For like for me, I like the the breaking of the lines doesn't matter so much because that's very easy to visually verify if it's all right. What I'm annoyed about right now is I can't, I can't quite get a prompt that will leave my wording alone. And so using W div ignores all the white space changes. It just focuses on the changes in words. So that's what, you know, that's that's what I'm trying. >> I think the great thing of trying to divide the problems is that different people will probably concentrate on different aspects and different people will experiment with different aspects. So once we know that we have to do um sentence repair and voice repair, then you can have all of these different uh styles using def or using just basically replacement. I was thinking that maybe the way to do it is to have Um, overlays. >> Yeah. >> actually highlight the areas where where things have been changed or where where the uh D L L M has uh Yeah. problems actually trying to do it, right? >> Yes. >> And um, so, but anyway, so that's kind of my very simple just a one hour. Not even an hour, just a few minutes try to. deal with the problem of voice uh repair. And uh, so I think that there's a lot of potential. Uh, on that. I really think that that will allow us to forget about having to do the edit every single item at a time, which is very tedious. And I think that perhaps for all for many of us, the ideal and I

14:11 A hybrid model combining dictation and typing

other: We can see it when in your videos is do a hybrid mode. Well, you have voice for. Quick. Typing. And then you go and then manually edit with a keyboard. Because it's much faster than using the uh voice to do the um The the uh finding text, locating, and et cetera. And uh, yeah, so so I don't know if you have any questions, you can interrupt me so or um. If Yeah. >> I just want to steal the prompt from your config. Is is that? That's already online as well. >> Uh, yes, I can show you, and um so um. >> Yeah, the um the >> Also ah, where's uh be ah Let's roll the file. Ooh. >> Application of LLMs to simple edits uh was also explored by Abinot Tushar in his uh ESI dictate. So I think it's it's definitely a a very flexible approach. I'm also really curious about picking up the editing commands that uh both Eric and um and th Thunderburr have explored, the kind of the editing grammar for more deterministic edits. >> Yes, exactly. Uh, this is this is the prompt, so um, it's Just two pages and uh >> It's a >> And then it has actually actually some examples. Uh, but again, so There's no evaluation of this. This is actually just like trying it and it kind of worked. >> Yeah, okay. >> And um, and I'm going to actually push this into my repository. Uh, the main start. I'm customizing a slightly earweek at this point. To be able to do what I want.

15:43 Independent changes, and sharing ideas

other: So we're going to have a lot of uh Um. independent changes because uh Is is we're moving too fast in this to actually be able to build on top of each so of each other. I think that's going to be a little bit of a challenge. I agree. Yeah. Yeah. >> And that's okay, because we're we're sharing ideas at the highest level also of what kind of what interface patterns make sense, you know, like and as soon as someone comes up with an idea, then it's very easy to re-implement that with the power of Lisp or even, you know, with LLM assistance to to fit into your particular system. So, like, for example, I've been really liking this idea of an independent voice cursor, which I borrowed from Abino, where you can you can leave the dictation moving. While your c your your typing cursor is off somewhere else, maybe even a completely different buffer. >> That's a great idea. And I already adopted it in other things I've been doing. Like, um, I basically just let Emacs do its job interacting with a website, and then whenever that website finishes, insert there, and then I don't have to be babysitting that buffer anymore. It can actually be hidden below, right? So I think that there's another advan a lot of advantage being able to do async operations where the pointer, uh, the point is already fixed. In a given location. And uh, so so that's that's about repair. Um, let me give you a little bit of a demo of of uh the two systems that I have. Um

17:08 Hammerspoon

other: I used to run Linux as my laptop, and uh, but since COVID, I moved to macOS. And one of the reasons is that um I'm using a tool called Hammerspoon. That allows me to essentially It's essentially a window manager. And uh, and uh, the window manager is moving from Lua, where it was programmed, and it's now JavaScript. Uh, we're moving to version two. Uh Probably in the next couple of weeks, we're going to have a major release. So I've been actually porting my code into that. So, um, when you were experimenting with uh with Emacs, I started experimenting with um With hammerspoon and So There's a the most simple one is just transcription. Uh, this is an example of transcription that is very similar to the one that Sacha has been creating for a long time. And so nothing special. And learning a lot from you in terms of being able to use um. spacing to be able to actually start uh The transcription at the same time that recording goes, because otherwise at the beginning, I have to wait a lot before anything will be transcribed. And the the longer that you speak, the longer that delay is going to be. So, but I'm really uh I'm really affected. By and I think. All of us are, by the way, that Emacs affects our brain. Um Think of it like the story of the arrival movie. The language affects the the way that we think. And our language is the language of Emacs. So it affects the way that we think about problems.

image from video 00:18:44.867other: And uh, so what I wanted was to have a M-x. For the window manager. So I created a layer to be able to have interactive commands. So essentially, not every command is interact uh is interactive because otherwise they you get too many. And then the challenge is. If the command requires parameters, I had to create infrastructure to be able to Grab the parameter. So what does that mean in this context? So let's assume that you want to maximize a window. If there's a window already. Um. Um active. It maximizes that one. Otherwise, it will ask you, which window do you want me to maximize? Which is kind of similar to what Emacs does for optional parameters. So that's kind of the idea. So that means that I can actually call um Let me, for example, use window right. Um Half, and then it will actually uh do that. So This was important because if I wanted to be able to have The ability to call any command via voice, I needed to have this feature. okay. So, um. This is my whisper menu. Uh, this is my Whisper menu. I'm using Whisper as the back end for this. Uh, so the one that we've shown is dictate. And I can also dictate to the clipboard. Uh, for example, if I move the the the window to another window. It automatically. Dictates to the clipboard. Because who knows where it's going to end. That's one of the things you start to discover that you just don't want any window to actually accept whatever you type. >> Mm. >> Some problems that don't exist with typing. >> That's an interesting approach. I've just I've been having it dictate straight in. >> Exist with both. And uh, I also define something called um Uh, filter, which is essentially, and I have seen this in many applications for Mac OS and Windows, that they allow you to filter the transcription through an LLM. And then I can define the the uh the prompt to be able to do that. I call that filter. So I can actually determine the filter. I can also define the language that I'm going to do the transmission. So essentially kind of kind of trying to bring the same power that we have in Emacs to the window manager. Uh, the one I want to show is the one I call to processor, okay? Window. Left. Right. Sorry. Uh Window half left. Window Left half. >> Yeah, it works. >> Let me show let me let me check the command. Oh, here it is. So it actually did it. Sorry, it's the problem that oh, I always forget actually the name of the commands. Um >> Define them both. >> Yep. Yeah, so uh that's essentially the problem I was uh talking about the discovery discoverability. And actually, that brings a very interesting problem, which is. Learning to type. Let me let me let me. We need a a different word because this is not typing by voice. Um.

22:00 Learning how to communicate with the computer via voice is like learning to type

other: Learning to communicate with the computer with via voice is probably similar to learning to type. It's going to be slow. It's going to be challenging at the beginning, but the better, the more that you do it, the better and the faster that you become. And you, you are a very good example of that, because you can actually now do things significantly fast because you have been trying it over and over and over again. And I think that's essentially what we all need to be able to become. So I think that people, one of the lessons that I think we should all have is that everybody. It's going to be slow and frustrated at the beginning. And as we as we move forward, then we're going to improve and just become more effective.

22:40 More attempts

other: Uh, with these tools. Uh, let me give you another example. Um, let's try another one. Uh. Apple music. Ah, let me let me first check check the commands on that because that would probably be easier than trying to. Apple music. Apple music focus, Apple Music Focus, so and uh

23:10 We need a which-key

other: >> So it's it's kinda like we need a witch key, right? >> Yeah. >> A which key equivalent for voice, where if you say something that's a partial, like just a prefix of other commands, it will display just that subset.

23:22 More attempts

other: >> Exactly. I have some Emacs. So let's say Emacs agenda. Let's try Emacs agenda. And because that's an interesting problem. >> Will you have any private information in your Emacs agenda that you might accidentally show? >> Up. Mm. >> okay. >> It will not pass, um. Emacs agenda. E Max Agenda. >> Ha ha, it's it's a dictionary problem. >> It's a dictionary problem. So I have not been able to actually so I have not dealt with the problem of having some synonyms. So, because Emacs is one of those that it just doesn't match. Änte. >> Oh yeah, the way that I do it is, um, is I I run my I re I run my like common edits replacements. As as part of my filter for all of the the commands, right? So if you're using I don't know if you're using Emacs to drive the the rest of it, but if you can use if you can use your speech uh output your speech input results from Emacs. Into whatever else you're using, then then that's where you can do the replacements also. Yeah, yeah. >> So this is done independently. So here I have a whisper server. And Hammerspoon is talking to that whisper server. >> okay. >> So this this was the beginning before I went, and then um Hammerspoon is able to execute Emacs commands. And um so that There's a lot of interaction between both of them. And uh, so let me let me. Yeah, go ahead.

24:52 Emacs, Hammerspoon, and the browser

other: >> Yeah, see, I wonder if it if it makes sense to do it the other way around, where Emacs is telling Hammerspoon, here's a string, here's the plain text, and then can you just execute it? >> And I will be able to do that because um I have the ability to code either one from each other. So I have the ability to call. From the browser Emacs, I have the ability to call from Emacs the browser and the same two direction. So the three main tools that I use are those. And I really believe that. Our Emacs way of thinking is like we need the tools that we use to be extensible. And I think the browser is very extensible by the ability of being able to inject JavaScript or to be able to have extensions that do whatever we want. So I totally agree. And that For example, one of the things that I'm very helpful thankful is Emacs everywhere. I had to create an ex an extension to be able to connect it to Hammerspoon, but I can use Emacs everywhere. Um, in macOS. So I can always edit fields with that, right?

25:56 More dictation challenges

other: Let me show you now only weapon and um So First, let me show you um. E week d dictate. This is an example of dictation. okay, help. I thought they will give me help, but they didn't. Oh, this is what another one of the problems, right, that we have. The moment that we get into dictate, it just keeps going. It just keeps going. It just keeps going. That's actually one of those things that I have to learn still to be able to do. And uh, because otherwise then I just get garbage or things that uh modify uh buffers that I shouldn't be modifying. Because of this, right? And uh, let me actually let me get the the the help, uh, earlier. Um Uh, help. And uh, these are the commands that it has. So, um. Scratch that, comment that, select, uh, format, replace, etc., etc., etc. Um, the ability to go to certain line. And I extend it with this. Front command. okay. >> Yeah. >> And um, so Let me actually try again and um Run. Bookmarks. Oh. >> Does it have to be run command bookmarks? >> okay. Run bookmarks. He caught the O. That's part of the utterance. And uh, let me stop it and try again. And uh,

27:38 Command mode and dictation mode

other: so the the the way to actually do it, I have to say, okay. >> okay. >> before it goes into command mode. So that's actually an interesting aspect. And the literature talks a lot about this. Are you dictating? >> Yeah, yeah. >> Or are you in command mode? >> Yeah, yeah. >> And the switch between them is expensive. So that's another challenge, right, that we have. okay. Ron. Bookmarks. So um, it gives me completion. So this actually, um, let me let me run the OB OB one, uh, sorry, the only. Uh, help and task so these are the commands I have. Um

image from video 00:28:22.500other: Let me open for E. So this mu4e is a command that doesn't have parameters. Um Oh, so I have doctors. okay. Run. Male.

28:40 Mispronunciations and dictionaries

other: >> Oh, because it became Ron. >> Run. Or it became wrong. So that's actually a problem that I have with my pronunciation. So that's another interesting aspect. Is it because I mispronounced the words? Or is because I shouldn't really create a dictionary? Because the problem of a dictionary is the moment that you commit to that word. You cannot say the other word. So >> Ah, uh, what I do sometimes is I define the the the substitution in terms of the phrase. But it might also be interesting to have a second dictionary that you can run only in the context of a command temporarily. >> Yeah. >> So I wonder, so like, since Erica's here, the >> I mean, I >> Good. >> Yeah, though, I think like the the core of the issue is that, uh, like, do I sound good? >> Yeah. >> Does it sound fine? >> Yeah. >> Yeah. I think the core of the issue is like because this approach takes like a um model like transcription model where you first dictate and it translates it into text and then you try to parse that. Uh, but Tallinn, for example, like, um You communicate with Talon and tell it what the actual grammar is. And then when it decodes, it can only decode into a legal utterance. So that increases the Like precision a lot. So for example, Sacha, you have talked about your start screaming problem. So if you told Talon that you were to start screaming, it would like understand that it is start screaming because it cannot decode into start screaming. >> Yeah. Uh, but on the I guess it it's great for for the controlled vocabulary so voice control, but if you also want to do a lot of free dictation, it would be amazing to be able to switch switch the modes or like, you know, bias the the recognition one way or the other. >> Well, I I think that's where. I personally end up finding myself when I'm messing with the voice command stuff right now and the dictation is. I am going into commands mode. Um, and just mostly having that in the background. And then if I need my actual transcription, I have your transcription buff buffer that you have set up, and I'm kind of doing it that way. Uh, so far, that's been most of my thing, though I think I will, you know, obviously use more dictation mode when I'm doing something like a blog post or whatever. Yeah. That's something that I've been. uh noticing as I've messed with this uh you know the past week or two. >> That's my default now too. Um, when it starts up, it's just in commands mode, and then I can switch it to dictation either vocally or with my with my uh uh my my keyboard shortcut. And now I'm tempted to make my space bar a push to talk that just switches into dictation mode for that. So kind of different things to play around with. >> Yeah, that's actually so that's that uh so with uh that's one of the reasons that I like to be here uh with external keyboard, because then I can actually use the numerical pad. to be able to issue commands. Uh Because that the the problem also with keys, right? And uh >> Yes.

31:35 Complex commands

other: >> So let me show you the complex commands. Let's hope that it actually works. So um okay, run DMG bus. Seven. okay, next. >> Oh yeah, so that you got interactive. >> And it opened in the other in the other in the in the other um. Uh Uh, in the other so it was in another uh Browser. Sorry, in another screen. So that's essentially how it works. So Run that command. Let me stop. Yeah. Boss, actually, let's look at the description, describe function, uh, DMG, uh, uh, sorry, describe function. Uh, DMG bus. Um, essentially an interactive function that detects a route. So what this is doing is so all I all I do, let me show you the definition. So um Uh Uh Voice transcription. So the way that I define it is the following. I don't want to define Another function just to be able to call it via voice. So what I do is that I use commands that I already have. And sorry, that's not where where is it? Here's the list. So these are the commands. All of these are regular commands. Interactive. And then this is a A potential synonym. that I have to be able to call it. So I can call it Org agenda or I can call it my agenda. And then I have an optional confirmation. Uh, let's try that now. So notice kill buffer here. Kill buffer doesn't have confirmations. As Neil. So that means by default it's true. So I need to confirm that. Oh, sorry. Um okay, Ron. Keel buffer. Uh. >> Uh, pronunciation challenge. >> My kill is not very good. And that Mm-hmm. okay. >> Maybe you can add an alias right now. >> Keel buffer. okay. Keel Buffer. It has to reset the mode before I can actually do the command. Uh, let me use the other alternative, which is actually directly into the command. So uh, earwick has two modes, dictate and command. Uh, let's hope that uh the ear wig actu um actually uh I already uh did it uh so only uh Execute command. Will this work? Uh oh no, this is actually uh. Uh Airwig command. Ron Keel Buffer. Yeah, it doesn't work with that. Let me actually try again with the other one. Ron. Kill buffer. Yeah, so again, so that's actually my pronunciation. Um, let's do another one. Um okay. >> Command modes, right? di >> Yeah. Uh >> Do you also have it running for all like all the interactive commands in general, or are you manually defining them? Because I have some code in my config. >> So I'm manified adding them because otherwise then it will become unmanageable. >> okay. Uh >> And um, so okay. >> I I will let you turn off your dictation thing first. >> Split window right. okay, split window right. >> It's not doing the uh like beginning of utterance thing. >> Ah, this is the problem with the with the timing. okay. >> Yeah, the way that I I have mine is it it splits my my silence. >> Split window right. >> Huh. >> okay, split window. >> Chris is a live demo. >> So it's struggling with that. And um Uh okay. Wiener und du So nothing is working now. Yeah. >> It's okay. It it it's one of those things. It's only when you're demonstrating it. >> Let me just try one last one. okay. Run mail. >> Oh yeah. >> okay. So that worked. So I think that what happens is I'm still uh struggling with the utterances. okay, run split window. It caught it caught the A. okay. >> I I was >> Run split window. Yeah. >> Yeah. >> So it's a little bit of of trying to actually get. Um, the word incorrect and but I want to run one that requires parameters. Um Uh, let's do the bookmark. Um Actually, where I should be doing this is earwig. uh help because then I can actually show you what the commands are. So, um Uh, no, this is a weak help. Uh, only uh help. okay, this these are the commands. So these are the commands, but this is actually the help. So in the probe, you can say okay next, and it will send you to the next field. It's the equivalent of doing a return in a parameter. okay cancel cancels the command. okay previous goes back to the previous question. So essentially, I have a function that sits on top of um. Um, call interactive. That gathers the parameters. And then once they're actually completed, it will call the function. So that way I can take advantage of the interactive description, but I'm not using interactive directly. Yeah. In things like consult, you can take advantage of um. trying to pick the specific number of of the selection. >> Huh. I should try that. >> okay, run bookmark. okay. Pick four. okay, next. That worked. okay. So what they did is actually call Org wrong node find. That requires a string, but it's also using consult. So it's aware of consult and allows me to use the consult um infrastructure to be able to actually jump to a given line. And so that's essentially, and the advantage is that I don't have to program any of that. All of that is done via this by simply defining that the function. It's callable. Via voice. >> That's wonderful. >> So that's essentially the experiment the experimentation I've been doing, to be able to simply add. The function. The ali uh an optional alias. And then Whether it's pre approved. If it's not pre approved, it will ask me, do you really want to run this? >> That's a great idea. Uh >> okay, kill current buffer. Yeah, it has problems with my kill. Let me stop it and turn again. okay. Kill buffer. Oh, I forget to say run. That's actually the problem. okay. Ron Keel Buffer. >> Mm, yeah. >> And here's what it asked me. I said, cancel. >> Yeah, yeah. >> So notice actually that it asked me and then I cancel it. So that's the idea behind their pre-approval. Obviously, there's a lot of experimentation for this because It's obvious that I'm actually saying too many words to run the commands. What I need is actually a way to. Uh, reduce that. And or basically, um, the different the problem of being in the interactive mode is that. I'm dictating at the same time that I'm actually. Um. doing uh commands on the co on on the mini buffer. Because the pr the the command might require text. And there are two ways to do that. One of them is If I say the command plus some text, it assumes that the first string is the first parameter. The the rest of the string is the first parameter. And then it might run it. Otherwise, then if it requires more, then it will actually put that into the mini buffer and wait for me to actually say something, go to the next field, et cetera. And uh, but anyway, so that's kind of the demo. So Hopefully that gives you an idea of This. vision that I have. of being able to use interactive. as a way to create commands. So we don't have to create one command for every um Um. So one non parameter command. And the main problem with that is the lack of being able to input. Parameters. It reduces a lot the flexibility of the language. And with this and with this some practice, then the ability to be able to say the parameters opens way more possibilities. I think. It's a matter of actually seeing whether that works or not. >> Eric, you've been working with this for far longer. Do you have a workaround for interactive functions with parameters, multiple parameters even? >> No, no, this is actually Eric. Yeah, so I mean, usually I just uh make the command in such a way that there are parts of it that are optional. And uh So whenever one of the arguments to my like then phony d fun. Uh, is nil, then I like ask for it interactively. >> But the idea of like reading the interactive spec from the function And then figuring out, okay, how do you prompt from that? I think that's that's very interesting, and I want to steal it. Hmm. That sounds cool. Uh >> Yeah, that's the that's the advantage that um we basically just take the description of the function. And the function already says what how many parameters it takes and what is the type. So it can, it can, it can narrow it to. So I have uh three methods now. One of them is numbers, another one is strings, and the third one is. uh files. So you can remove, for example, the last uh directory. From a path. Uh, quickly in the editing uh commands. And uh, but that requires experimentation, so. It's really more like we have no idea where we are going. With this. >> There's a lot of possibilities. >> Yeah. Yeah, I I think like possibly one of the potential risks with the using the interactive spec is that it is more Optimized for a keyboard interaction. Um. So you will probably get like an inferior experience compared to if you just defined like how this interactivity should work. >> And doesn't, um, like, doesn't dictation work for you in the mini buffer? 'Cause like Fruit. I For things. That rec that prompt for read string and and things like that, it might be possible to just dictate straight into it. It's mostly just things like >> Mm-hmm. >> Like uh, like read key that I'm like, hmm, do I need to use unread unread command events to stuff the keystroke back into this? I haven't looked into it in depth yet. But it's it's actually something I want to look into. >> I think if we're working. The advantages to be able to pass the first parameter. >> Oh yeah. >> To the function. >> Yeah. >> Because you can actually say all of that in the execution. And then that gets pre-filled. >> Um, and Bart does that. So when when you use Embark become, the it it provides the previous value as the argument, the first interactive argument. So I can steal code from that if you haven't looked at it yet. >> That that's right. So what I mean is that you can actually when you when you call the function via voice. >> Yeah, yeah. >> You already passed that parameter because you keep going. >> Yeah. Select f >> And then it calls the function with that first parameter. So for most functions with one parameter. Is sufficient. Uh, if there's completion. It matchily stopped there. And then wait for you to type return. Or in my case, I have okay return. But the reality, but the way I think is that um using the keyboard in this case is just faster. So you get this started with the function. And then you do everything else with the keyboard, like just moving arrows or return or control G. >> Yeah. >> It's probably faster. Now. >> And okay. >> One of the advantages I see with voice is that. In many cases, I might be doing something else. In the on the desk. And I just want to control the computer, right? Like move to the next page. Or go and check my email, read the uh, open the email, open this mailbox, et cetera, et cetera, right? And uh, and this essentially Makes it a little bit simpler in the sense that I don't have to program every single function. >> Yeah. >> Independently. >> I do have a like a a kind of a command function or a Uh, I I I think my my long phrase for it, which was just just for fun to demonstrate it, was uh, I command you two, and then the name of the function. And what it would do is it uses on red command events to stuff it directly into M-x, and it runs the first matching command. So all of the commands are available, even the ones I haven't programmed in. >> Yeah. Yeah, that's actually a good way to do it. And um And I think that the challenge is. Uh The selection, right? How do you still select? And uh via voice. >> Oh, oh yeah, yeah. Well, for this one, because I I just wanted it to run the first matching command sorted by length so that more exact matches come first and with orderless in place. I don't have to remember the words of it. Uh, then it does that. Um, but I was curious, since you have picking on on your your thing, what do you do to get the, you know, the list of candidates, uh, in the same way that the the completion is handling it. >> Well, so I'm not doing anything. I'm just calling the completion, right? I'm just, it's just calling consult. >> okay, so consult is is still taking answered. okay. >> And then >> All right. >> What I think that the the the the only thing I have done differently is that I have commands. Voice comments specifically for the mini buffer. >> Yeah, okay. >> That's the only difference. Everything else is just. Uh voice. >> Yeah. >> An interpretation of that. It's just that in the mini buffer, you have different problems that you have on a buffer. >> Yeah. All right. I >> Especially with consult. So consult allows you to select by by line, right? And uh, or if you actually Type some text, then you start to have. Let's say that you have two candidates. Um, and you want to select the current one. So then I have a select. um candidate um command. Because otherwise then, um Yeah.

47:50 Muscle memory

other: There's some things that our our fingers know better than us how to do in Emacs. >> Yes. >> I have to think sometimes about actually how this works before I can try to think about how to do it in voice. That's another problem, right? >> I think this hybrid workflow of using voice and typing together. Uh, is it's very promising 'cause he can use voice for the things that it's good at and then typing for the things that it's good at. >> Yeah, exactly. I have found with like a lot of tasks because I use my voice more than I use my keyboard for interaction. So for many things, I don't really even know how to do it with my hands. So I uh Like um, type in what I would say. To execute the different commands, and then I let the phony parse it. Yeah. So I have like the inverse issue. Where >> It's wonderful. >> Where like my Yeah, we're where uh yeah. I know better how to use my voice than to use my hands with Emacs. Because I mean, initially I also like the reason I switched to Emacs was because I needed an environment to be able to shape according to my workflow, right? So I never had like experience with Emacs before using it with voice. Basically. Well. All right. Yeah. okay. >> No, go ahead. >> Uh

49:13 Personalization and collaboration

other: Well, what I was going to say, to me, like that, I think is going to be the big question for like. Everybody that's exploring this area is. How do you, especially if they're doing it with Emacs, because you know, you can do your own thing, it's like, how do you set it up in a way that's going to work for you? Um, and make sense for you because with other, you know, a lot of programs, you're kind of limited on what you can do, but with Emacs and with defining your own commands and. You know. All that other options we have now, it's just It's going to be very much a filtering down of like what actually works for you and what doesn't. And I mean, I think the hybrid mode Sacha was talking about the other day is kind of the the mode I see myself in the most where I'm kind of, you know. I'm occasionally using voice commands, I'm occasionally using some dictation, and then I'm I'm also still using keyboard and stuff like that, and just finding that most efficient. you know, best way to work for you, maybe not even most efficient, this the best way to work for you. And I think that's going to be a little bit different for everybody. And I think that's that's going to be one of the challenges we see. As people start exploring this, you know, other people start exploring this. Yeah, I think that on one side, then we have the issue of the ideas and how they get implemented, and the other one is how to build on top of what others have been building. I totally agree. And um But I think that everybody has a different experience. I'm thinking, for example, from the point of view of somebody who might have motor uh problems and typing, that actually could help. Even if it's not the most efficient way to do it. >> I think there's a there's a bit of a ramp there too. You could start off by defining things in more natural language, but then as you find yourself wanting shorter ways to say the m your most frequent commands, you gradually move towards a like a tighter vocabulary like what Eric uses in Christopher Free. >> Yeah. I don't mean we do that. Sorry, sorry, go ahead. I was going to say we do that with keybinds too, because like for me, when I'm reaching to kill a buffer, I'm almost always wanting to kill the current buffer. So I just assign that to a keyboard shortcut and I have it there, but yeah, absolutely. I think it's the same thing with voice commands. Yeah, and I think that, um Sorry, I forgot what I was going to say and um Just got distracted. I can say. So But I but I think also like if we go like when we go like closer towards like obviously constructed languages that don't Sound anything like natural language in terms of like a grammar and the different terms that are used. Uh, I think it will also become even more difficult to use this. Um these recognizers that are were made for dictation because they Kind of try to fit what you're saying into natural English. And when I interact with my computer, it sounds nothing at all like natural Engl English. It's like Sounds like random made up words in a random order. Uh, so I think that's uh Models like Whisper will uh struggle more with that type of interaction as well.

52:33 Composing sequences of commands

other: I was going to say that one thing that we haven't even thought about is also how to compose com voice commands. Because we are issuing one command at a time. We haven't even thought about what does it mean to actually have like a sequence of voice commands. And um >> I was very amused by the examples in earwig, right? The uh uh very uh very nested descriptors. Ha ha. >> Yes. Yes. >> Oh, uh, which reminds me, Eric reminded me also, uh >> And that's actually that's that's a rescat. >> Dan, we've been chatting in a matrix in the Emacslisten matrix room. So I If you aren't on that yet, uh, if if you'd like to join us, we'd we'd be uh well, we'd be happy to discuss things there too throughout the week. Um, matrix. I'll I'll get the link while you all talk about stuff. >> But yeah, I think the risk is also an important factor. And um What is the risk of running on different buffers and um different commands, et cetera, right? And the risk, um. Um, is personal risk, the the the willingness to risk. It's different for every person.

53:48 Transcription in the background

other: But I I really like the demo uh from yesterday because um The trans the automatic transcription, that was great. having a buffer that just does the transcription while you're doing something else. Uh, looks magical. >> Oh, was at Michael's demo? At from Linux Saloon? >> Yeah. Yeah, so some of those things really feel like magic. >> I had I was very amused by the part where we were trying to stump it with with uh languages and accents. >> Yeah, I noticed that. So I I started using via voice in the nineties. So So that's what so the >> I was I was using dragon naturally speaking. So around yeah, that kind of thing. >> Exactly, at a similar time. And things have progressed a lot. The main challenge at that time was that. It was very difficult to train it to your voice, especially if you were not a native uh speaker. And uh, but I think that now, uh What I'm doing, uh, writing, um, um I tend to do Uh. Voice recognition. For anything that Takes more than one line.

54:50 Talking when there are other people around

other: And uh, but also depends of the people around. Uh, so here in the university where I am this month. So when there's other people around, then I don't want to actually uh bother them. So I don't use voice. So that's another challenge that we have. The difficulty of of not always been able to do it. Think in terms of doing it in a cafe. For example. That might look a little bit odd talking to your computer. Although the cafe is still okay, but let's say a library. A library is probably a better example. How do you do this in a library? Yeah. >> I think uh the court scenographers, uh well, the court voice voice, uh, voice reporters, they have a small like thing that they use to. He >> To be quiet, yeah. >> Talking to like this. Ha ha. >> Ah. >> But uh, but yeah. >> The other thing that I have also explored is the idea of recording thoughts. >> Yes. >> Uh, that's not Emacs related, but just going for a walk, record for half an hour, one hour. >> Yes. >> Uh, sometimes uh to do, sometimes ideas, and then come back and then just having that transcribed. That has been also extremely valuable. >> Yes. I I find that with a Go ahead.

56:02 Emacslisten and Emacspeak

other: >> I mean, one one thing that's good. That that I think would like be really cool. Like I have a This like a dream of being able to do it would be to like be able to combine Emacspeak and Emacslisten in a way that you don't even need a screen and a keyboard. So then you could just be out on a walk and hack on Emacs without. Like having to interact with what looks like a computer at all. No, that would be. Knife. >> Yeah, uh, I was >> Well, um, I do not know if you have you have tried uh ChatGPT in voice mode. >> Yes. >> And uh, but it really feels magical. And uh, to be able to have a voice talking to you in your in your head while you're walking, when you're shopping. And uh, in that case, it's not really about editing a document. And uh, but just being able to actually have a conversation. With the computer in that way. I think that we're we're close to be able to do it with almost any computer. Whether it's commercial or not. Mm-hmm.

57:02 Recording on the go

other: >> I've experimented using a lapel mic, which is great because then the audio quality is still pretty good as I'm, you know, as I'm recording my my brain dumb or whatever. And then I was ex I was playing around with using simple voice keywords to structure things, like start section, whatever, end section, um, sorry, stop section, because end is hard to recognize. stop section was work better. So using that to delineate Org mode headings, for example. And so it was very easy to process it afterwards. But my dream is also, like, like Eric, having this directly in Emacs on my Android phone so that I can actually look at the structure as I'm, as I'm developing it. Because my problem with just the phone recording brain dump is it would be hard to like keep, it would, it's, it was hard to keep the structure in mind as I was talking. I would, I would tend to drift. If I use Google Recorder, then it will do the transcription as I as I talk, which is nice. Uh, and I still have the recording afterwards, which is great for misrecognized words and and things like that. Uh, but the downside was that the Google recorder one required more clicks, more taps in order to export. to uh to a file whereas uh easy I I I think it was like like uh one of the the Easy Voice recorder one of those other recorder apps would just automatically save the recording to a folder and that I could synchronize to my computer for later processing. So if I can find something that does the auto transcription and does the uh, you know, the display as you're talking and does the the automatic synchronization with my laptop, I think that would be amazing. >> I would recommend you that you don't worry about that. I recommend you just record your audio. >> It could be Emacs. Hey. >> Without worrying about anything. And then ask the LLM to organize it. It's >> Yeah, probably. I've and I've done that in the past. Like I've I've either recorded a snippet and then uploaded it to Claude or Gemini and said, okay, here, um, you know, can you just Uh, sort this out into to bullet points or whatever. And I've also experimented a lot with using Claude for the uh for the conversation mode for practicing French, because then it can respond to me in French also. >> Yeah, I need to do that. Yes, I totally agree. I think that there are so many possibilities, but. Yeah. >> But the thing about that is I also like how good.

59:25 Predicting the next token in phony

other: >> Yeah, I think you you mentioned like having something like which key for >> Yeah. >> Like voice commands. Uh so I mean the the parser internal to phony, it has like a next token prediction. Uh so I mean perhaps. Something there could be used. You can probably also keep track of like which current rule is being parsed. So that you could say like, currently this is being parsed, and if you say this token, it will try to parse. Like these next rules and so on. So maybe something can be done there. >> Yeah, yeah, like if we give it a string so far, like if we're pausing in the middle of a command, right now my voice activity detector just cuts it. But what I want to do is I want to pass it through like a small local decision model that just does kind of end of turn detection. So if it detects that this is not yet the end of the sentence or the end of the utterance, then it will, you know, it'll do, you know, use that hesitation to show me a menu of the, you know, the the different parsing possibilities for this phrase. >> Mm-hmm. >> Uh, maybe as a starting point.

1:00:32 Interactive completion interface for phony commands

other: >> Yeah. So I mean I I used the next token prediction to when when I um Like input voice commands by my hands, then I use a completing read buffer so that it says uh Like gives me the possible next words that I can enter. Uh, so I mean >> What am I what would I look for in your like setup to borrow that idea? Is that in your public config already? >> I it it's in my private config, but I can uh share it in the chat later. Yeah. >> 'Cause that sounds really cool. And also because I I have this like uh Interest in stenography, which I haven't tested off yet, but it's uh, but the ty like typing in the natural language commands by uh by coding is also something that I've I've been curious about for a long time. >> Mm-hmm. >> okay. >> I'll have to remember to send you cheric quarter. Um Tasha, and let you see if that may be a better fit for what you're trying to do. >> Which one? >> Sure, quarter. >> Oh yeah. >> It is not a sonography keyboard, it's a different uh style keyboard. >> Cool. All right. Send us the send us the deeds.

1:01:39 Working with other applications

other: Yeah, so okay, so there's there's recording like on on your phone or other mobile device, and then there's dictating into Emacs. Um, and also you there's, you know, one of the other things you mentioned, Dan, was uh using em uh using this same idea to control other applications on your system. And we've talked a little bit about uh interfacing with the browser, which we do a lot of stuff in, right? So it makes sense to be able to voice control that, uh, which is part of the reason I was like, okay, Eric, Eric's got some uh uh some interesting uh voice targets for the The search bar and and things like that. And I was like, you know, if you if you use an extension for your browser, you can not have to use XD tool to copy things around.

1:02:19 Voice repair with LLMs

other: >> Yeah, and the voice repair that potentially the LLM can actually help you and do it voice repair on a large section of text. >> Yes. >> In a more efficient way. >> And it might also be interesting to like to pass anything that The that the Parser didn't recognize to an LLM that just, you know, it's kind of like a tool use sort of thing. Say, hey, did this, you know, is this actually supposed to be a command or is it regular dictation? >> Yeah, uh, we have to remember that we can ask the LLM that when in doubt to do something different. >> Yeah. >> So those have to be fully binary. So you can say, I don't understand this and mark it in a way that you go back and check it. And I think then also that the language model will have to be like very fast because you can't like wait for three seconds until it comes with its response. Because at that point it's better to just get a rejection than to just say it again, I found. >> So for first small recognition. >> It it depends on the length, right?

1:03:23 String distance

other: >> Yeah. For small recognition changes, it might be interesting to use the Levin Levenstein distance. Um, the string distance, right? >> Mm-hmm, let me thank. >> Since that's pretty fast to calculate. >> Yeah. >> And uh, and that that that already has a function in Emacs that is implemented in C, so it's fast, and you can just run your current utterance against your list of um your list of commands. The thing that It's only slightly complicated is if you're also using it to specify the parameter of something, then you have to test like prefixes against your command list. Um, and I I probably need to find some way to get a command list out of uh out of phony again. >> Um >> Like a list of like all the literals we're trying to match. As a prefix.

1:04:11 Prioritizing more literal matches

other: >> Yeah, so I mean the also the Like uh when when I do the parsing in phony, it uh keeps track for the different trees like the cost of um Like the particular parts if you have ambiguity, for example. And currently it is only used to like minimize the amount of free text. So say that you have Like a free uh dictation, but then you have some commands, then you want to Uh Like match the parts that is the command and not the free dictation. And I guess maybe like if you do some fancy uh things with that cost function to instead like compare the literals with the distance from uh Like the the actual token that you got, and then maybe you can. Uh, choose the path with the shortest distance. Do what you said. >> I was also thinking about Go ahead. >> I think that they're So sorry, go ahead.

1:05:09 Approximate match on invisible text

other: >> I was also thinking about using the string distance to to implement approxim approximate match on visible text so that our a voice repair stuff can do editing without having perfect matches on the on the recognized text. >> But I think that we have two problems. One is is macro repair and the other one is um Micro repair because the macro is like you have like maybe three, four paragraphs of text that you know is um that uh will be uh That you still have to reread completely. And the other one is you just have an utterance or two utterances that you might want to repair. And I think the promise are very different in both cases. But I think. >> So this is like when you're already in editing mode. >> Yes. Yeah. I think like uh repair sounds like Um It's probably the solution for uh like dictation errors, probably.

1:06:13 Constrained grammars and Talon Voice

other: But I think for like command errors, then you really like we really want to have a A model with a decoder where you can actually grammar constrain it so that. Like, uh, because all of these like fixing it up after the fact to try to make sure that it matches the grammar. Or like hacks on top of like uh An issue that Shouldn't be an issue. Right. >> How is that? How is Tallinn's? >> I I I totally agree, yeah. >> How is talents performance when you're, you know, kind of shifting between the things that you want to constrain things on and versus the things you want to say, just insert and then insert the text that you're dictating? >> Yeah, then they are as fast. Yep. So so, um Like uh, how how uh I think that it works if that like when it gets your um utterance. Uh it applies some acoustic model upon it that gives you the probability distribution of like what character you are saying at the different points. Um Of your speech. Uh, and then it it tries to uh Like maximize the probability. Of the decoding. Uh, but Constraint to what you're saying. So then if like one part of um Of your grammar is just a phrase with like free text. Then it just doesn't apply a filter upon what uh The acoustic. Or or yeah, in the sear in the search from the probability distribution of the acoustic model. So, I mean I it's not a noticeable difference between commands and uh free text. Dictation. >> Worth considering what

1:08:02 Multilingual

other: Uh so the one of the other things that I was kind of trying to figure out was whether you can handle multilingual text. Is it Is the recognition engine English only, or can you handle other languages? Yeah. >> It's English only. I think that there may have been one model for German as well, but uh, it's basically English only. Yeah. >> I think there was some to like the talent plus the the subscriber tier has access to other uh other um speech recognition models. Like I think they mentioned whisper as one of the options. Tchau. Yeah. >> Yeah, I I haven't looked into exactly how they solved that, but because the actual like dictation is a kind of Um, it's not the best in Talon, basically. So I think that. Perhaps they they then use like for when you're dictating the >> okay. >> They then pass it to Whisper instead to have a better dictation. >> So that's it. >> Because then it can make more use of like the structure of the English language. >> I wonder if our I wonder if our computers are probably like fast enough that we can run the dictation twice, right? Uh, run one run the dictation once using a more constrained grammar and run the dictation at the same time using auto key or whisper or some other free model. And then if it if if if it thinks it's it's likely to be a command, then parse it as a command. And if it's likely to be a dictation, then go ahead and And use the dictation results instead. The only fiddly part is I like to mix commands and dictation in the same. >> Yeah. >> Utterance, like the way that I say remind me too, etc. etcetera, etcetera. So I kind of like want the best of both. >> Yeah, I think if if >> But at least remind me too, it's actually fairly reliable. For me. >> I think if it is possible to like in your utterance when you're decoding it, if you could get like the time span for where you're actually dictating a phrase or a free word. Then maybe you could just cut out of that part and then send it to Whisper for to decode. Like just part of your utterance. Yeah, the timestamps can be useful. Whistle. >> Yeah, I don't get word level timing data yet from from Auto Keet. I only get utter like I don't I only get segment level timing data, but Whisper, uh, I think Whisper can do word level timestamps and the hosted, uh, hosted speech recognition services can do word timestamps and streaming. So it's probably going to come down the pipeline and and be available locally, uh, for for uh non-GPU eventually. >> But um, Emacs, um Like with Airwig, you can see the insertion of the text. So Emacs can actually timestamp that. So that might be possible. And uh, but I think that.

1:10:46 Editing text

other: It also brings the issue of where do you want to worry about the editing of the text? Do you want to do it at the same time as you're dictating? To have it correct at that moment, or are you willing to save the utterances for correcting it as part of the transcription? And then allow the computer to fix that later. Like in the example I show you first, where I have as part of the text. Delete the delete the last two sentences. Or replace this word for that word. So I think that LLMs are smart enough. To be able to say, oh, this is. Part of the text, and this is a command to the transcriber. Well, at least it appears like they are. >> And I think for my brain, it it has been helpful to separate the the like the raw input stage from the editing stage, because otherwise I'll get lost and I'll lose the train of my thoughts. >> And I think that happens also when we are typing. Uh, that when we try to actually fix the problems as we go, we tend to actually forget what we wanted to do because now our brain is concentrating on fixing. the spelling mistake that we had. That's one of the things that I see the advantage with speaking, because you don't worry about the spelling. And when you're typing, you think, how do you spell this? And you stop suddenly and your brain of thought actually uh stops at the same time. >> So it sounds like >> Well, in that >> Go ahead. >> Oh, that's what I was going to say. That's that's kind of one of the things I've been thinking about too, is like I've always done the first draft, you just You just type. You don't, you don't worry about errors, you don't worry about. you know, any of that, and then you go back and you, you know, fix it. But yeah, that is the struggle when it comes to a word you're not, you know, using as much, especially as the spelling. And And then if you spell it wrong, you you do have that in your head and you do kind of get distracted. So I That's, I think, is one of the big things about dictation that I want to. want to try using more, especially do try to get through things like blog posts where I feel like sitting down to type it. is different than talking through it. Yeah. That's what I thought that was very interesting, that idea of having dictating to another person. And being the person receiving the dictation versus being the person dictating to another person. Maybe there's something about that because in the bank where I used to work. Uh At certain level, all all the people were dictating to secretaries who were doing that. And they had their own. um shorthand to be able to actually keep up with it, with the dictation. >> Oh yeah, one of the >> So maybe there's something there too. >> One of the embedded uh dictation instructions models that I I came across was uh was uh, yeah, you dictate as normal, but you pr you m you direct your editing instructions to your your hypothetical secretary, right? So you give your secretary a name, and that makes it easier to separate the the instructions for editing from the rest of your text. >> Via voice did that because I remember that you were basically saying. Period. Coma. Semicolon. And things like that. And it will assume that you meant punctuation at the same time that you were typing. And that's one problem actually with the models that we use. They insert the punctuation according to what they think we're actually saying. So that's why we need to go and repair it later. >> okay. In in addition to using L L Ms for rewriting, I think in one of your other emails you also mentioned using L L Ms to like to do the whole MCP integration with Emacs and run sorts of things. Sorry, were you the one who was experimenting with that or have I gotten my wires crossed with other people? >> Well, so Mm.

1:14:44 Large language models and context

other: What I did was the following. So, um I value the context that ChatGPT has for. Um My Um with my conversations. Every time that I open a new chat, it already keeps a lot of context about who I am and the kind of expectations that I have. When we are doing it via an API, you lose that. So I have always missed the ability to talk to the LLM. Via the browser. And uh, so that's where I basically created the equivalent to a Spookfox. Who allows me to send commands to ChatGPT and get them back into Emacs immediately. >> Oh yeah, I have something similar. >> And um Yeah, so you have you have something similar, exactly. So uh, the advantage is that is that as long as you understand the JavaScript of the application, in this case, uh, Chat GPT. You can insert. So, for example, the uh, the They Um Poster style that I show of the paper. So that is actually done via Emacs, from Emacs completely. So what I do is um I use Org ref. From kitchen, who? has now become a missionary to Uh, visual code because he's no longer going to do Emacs. So we sent him as a missionary to that part of the world. And um, and then um It downloads, it downloads the PDF automatically if it can. And then I have a command to open a session with Chat GPT. uploads the PDF automatically so I don't have to do it. And it has the insertion of the prompt. And then Emacs just waits a sync. For the prompt to change in ChatGPT. The moment it changes, it downloads that PDF. that that uh png and puts it back into my directory. So that's the kind of interaction that I don't need an MCP. I basically talk to the browser directly. To well, to chat GPT via the browser. And what has also allowed me is that I have actually now a bookmap a tab manager inside Emacs. So anything that I want to do with the browser, I can actually do it via Emacs. And the LLM can actually talk to Emacs. And through Emacs talk to the browser. So if I want to do something via clot in code in the command line, I can say via Emacs, then talk to this tab, which is already opened and is the current one, and then it doesn't have to worry about authentication or anything like that. So, um

1:17:26 Using Emacs to talk to websites

other: For example, um To be able to talk to the website of the university, the one that we use for teaching, I can actually do it. Uh, via this interaction. So Emacs becomes kind of the bridge between everything in my computer. >> I've a >> It's kind of the the center. >> I forget. Does your browser GT let us to do that kind of JavaScript interaction with non foreground, like with not the current tab with the other tabs that are in the browser as well? >> Yes. >> okay. I should re I should revisit it. >> So the the chat GPT is like that. So I can send it to the the the the the the tab and it doesn't have to be the front tab. It already knows which tab it is and Emacs is talking to that tab uh irrespective of whether it's occluded or not. So there are a lot of advantages of being able to actually just connect the applications this way. >> I'll go look into that.

1:18:16 Communicating with terminals from Emacs

other: >> Same with a terminal. So the terminal I use is Kitty, because Kitty allows you to create a socket. And being able to send commands to Kitty. Uh, via this socket. And uh, so the moment that I run my email, I can actually have open automatically a socket. to my university to be able to SSH all my traffic through a app, sorry, uh send my my data all the way through an SSH port. And so Emacs already tells Kitty, go and open this SSH connection. In a tab. And uh, or if it's already open, then don't do it. So that's kind of interaction. So I think that the moment that we have tools that are kind of programmable, the moment that we just have full power. Over there. much more than when we have NCPs. MCPs seem to be more like a straitjacket. Because they are very constrained about what they can do. And here is more in terms of what does the JavaScript of the tab can do. What does the Elisp of Emacs can do? What does the JavaScript of Hammerspoon can do in macOS?

1:19:18 OBS and other programs with sockets

other: >> Yeah, I've been having a lot of fun with the WebSocket connection to OBS, as I've mentioned before. Also now, I've been looking into how uh subed works with MPV. And uh like I was resynchronizing audio and video sometime, and now I have voice commands for restarting the video at a certain point and uh and just, you know, just m. Adding being able to add voice commands to applications that have sockets and have have these protocols for running them is great. >> Exactly. Yeah. Yeah, so that essentially is what happens, right? Once you can do it in Emacs, Emacs can control whichever other application you have. As long as he has some API to be able to do that. And um

1:19:59 Youtube and org mode

other: And and then um similar with uh YouTube. So rather than YouTube is horrible to keep track of playlists. There's no way to know what you have played or not. And So that's that's another aspect where uh it has been actually very valuable to maintain in Org mode. At least uh basically a uh A URL to I can actually show you quickly if you want. And share your screen. And let me share my screen again. Uh, because while I was waiting for The session. So, um Ah, sorry. So this is this is another extension. Um, I haven't published it yet. So this is the the URL to the to the to the playlist. And I'm basically saying, I want From this playlist. Match the ones who have highlights in the title and only give me the last fifteen. >> Nice. >> And then I run this and it actually fills this. And the first two fields are for my own notes. That I keep track of. So I use it for reading Japanese, so to listen to Japanese, uh, for some uh podcast that actually like to keep uh Uh Oh, about that, for example. This is the C the CBC about that. So he. About that doesn't have a playlist specifically. There's only one CBC l uh playlist. So this allows me to just go and grab the last. >> Yeah. >> Ten videos that contain about that. >> Huh.

1:21:35 Customizing emacs for your needs

other: >> So that kind of things is what really makes us really crave Emacs. And and and um and I I've been using it since eighty seven, so has been a long relationship, so. >> Hey. >> okay. >> Wow. >> Yeah. So bring it actually, I think that that happens to all of us. You are a good example of that. And I think that we are very thankful for what you do in terms of the community because. All of us. Most of the Emacs users are about creating a workshop that adjusts to their needs. Rather than them adjusting to the to the workshop and then if each one of us finds uh their own way to actually do it. And then we share it with other people, right? okay. Um, the browser extension that I have to connect um to the browser, it's already in MELPA. It's browser GT. Um, I also extended bookmarks, so I have now bookmarks with a much Nicere, um interface and the ability to have tags. And uh, that's um also in MELPA. And uh Yeah, so it's kind of pain it forward, right? That's what we all do. >> It's great. I'm looking forward to uh to revisiting that. >> But I'm going to post this one. So this is actually the next one that I want to do. It's simple, but I think it's very powerful because then I can actually keep track of what I have watched. And uh, and and uh or just Give me the last videos and I don't have to waste time in YouTube trying to find out what I want to watch. >> And you can have a voice command that says, okay, you know, play play the next video from this queue.

1:23:13 Little microphones

other: >> Exactly. Yeah, especially when you're actually in the couch. Far from the computer, right? That's actually why I bought a little microphone. >> Ay, ay, ay. >> So uh, this is a tiny little microphone that I wear. So the moment I get out of bed, I put one on. And they were so connected to my desktop. >> Uh. >> Uh it it even survived survived awashing. >> Ha. >> Hmm. >> The challenges of small tech. >> Because I forgot to actually take it off. >> Yeah. >> Exactly. Yeah. >> Which one did you end up going with? >> And uh, so I agree. Uh, so this is uh, what's the name of this? Um, Holyland. It's a very cheap microphone, it's around thirty-five Canadian dollars. For a pair of two. Each one of them lasts me around five, six hours. So with two of them, I can last a day. And then I don't have to worry about my desktop doesn't have a microphone. So, and I can actually just be around and being able to control the computer if I want to. With the laptop, the the Mac laptops have very good microphones, so I don't have that problem. And uh, but uh, with my desktop, it just doesn't have one. >> I'm thinking of changing from my current lapel mic because it doesn't have a battery indicator. And so sometimes I've been like, oh, I accidentally ran out of of charge to something that that kind of indicates the power level. So I can at least look at it throughout the day. Um, and the like the DJ DJI minis also have some of them have onboard recording, so interesting. Um >> I use >> But I'm always I always have my phone anyway. >> I use a DJ I DJ I. >> Oh yeah? >> To record my thoughts when I walk. >> Yeah, yeah. >> And uh, because they have on board and I don't have to worry about uh a connection to a phone or anything like that. I have also used it to record meetings. >> Mm-hmm. >> And they work extremely well, even in a room with people. >> Hmm. >> I think that uh the voice recognition. doesn't require very high quality voice. And uh, it's just a matter of of recording it. So the DJI has all their advantages. I like this one because they're tiny. >> Yeah. >> They're very light. And they are very cheap. >> Yeah. And that one looks very discreet too, so you don't like look around. You don't walk around looking weird. Yeah. >> Yes, and sometimes actually do it, right? So and I sometimes forget and I just walk out of the house. I think I lost one of them because I walk out of the house and then I discovered I had the magnet inside my shirt and had no idea where I lost the other one. So >> If you can uh drop the uh >> Essentially, yeah. >> The um product details, I would be curious about that. I'll add that to my list. >> Oh yeah, yeah, I'll I'll I'll tell you about it. Yeah, especially these days that everything is on sale. >> So this is this is super helpful. Uh I I'm just checking time because Uh, technically, like. The kiddo is sleeping in, she's probably going to be absent again this morning. I am trying to not be stressed about it because she's still getting good grades. It does give you more time for meetups, which is great. So this has been super helpful because I'm like, okay, now I want voice commands in my mini buffer. I want voice commands in my window manager. And it's nice to hear about the high, like, you know, high, high uh value, low effort. voice commands that make a difference in people's workflows.

1:26:23 Maybe a monthly meetup

other: Uh, do we want to do this sort of thing on maybe a monthly basis? Uh, this sort is this sort of setup okay? Like, how do we want to connect with each other going forward? >> Yeah, I think that we can do something like um. Uh, what Org does and maybe have like a midly meeting and whoever is around then. Just be there, right? And sometimes just to demo, sometimes just to talk. And um I'm here in Japan until the end of the year, and uh, but usually I'm in Victoria time. So for me, now it's eleven PM. And uh ten ten thirty, so that's been actually the challenge with respect to timing. But once I'm in Victoria, then I think it's easier. And uh, but didn't work. >> We'll shift a bit later so that you're not waking up at like >> Yeah. >> Four morning. >> I I I'm putting in the chat the um >> Yes. Thank you.

1:27:14 Back to talking about inexpensive little microphones

other: >> The the name of the microphone I use. Uh, it's forty one dollars Canadian for. Two. Of them. >> Yeah, yeah. Two is good. >> And uh. That's actually one of them. There's another model. This is a more recent model than the one I have. And I think the one I have is no longer. Uh Been sold. And that button. Voice. It seems to be perfect. Cheap and um, and if I lose one, it's only twenty dollars because I still have the other. >> And uh having two means you can slap out battery wise, which is nice. Yeah. >> Exactly. The DJIs are significantly more expensive, and so that's always a problem. And uh But yeah, I don't think that really requires a very high quality. Even a lavalier. Uh White one is actually good enough. It's just the ability to be. Uh, disconnected, right? >> Yeah. Yeah, and if you have You know, if you have earbuds and you're listening to things, I er like as Mer as Eric mentioned, you know, the idea of being able to use Emacspeak to navigate through the text. Maybe with voice commands can be like next page or whatever, right? Could be cool. >> There's another advantage of not combining the headphones with the microphone of the headphones. In many headphones. The the moment that the microphone kicks in. The quality of the audio degrades. And um, so if you listen to music, it sounds way worse the moment that the microphone starts to work. And so that's another advantage of separating them. Uh, your headphones from Um The microphone.

1:28:58 What's next

other: >> What are people working on next in terms of uh their setups? What are they figuring? What are you all figuring out? >> I'm going to keep playing with audio and um With voice. Uh, I'm also post uh, so we are very close to Hammerspoon's version two. So we're working together to uh debug it and uh and then get our modules. They're called spoons. And um, so uh trying to. Mm-hmm. Get spoons at the same time with the new release. And so that's going to be a major one for us. And uh, because we are basically living behind Lua and moving completely to a different language. So everybody will have to uh Yes. So that has been kind of my big open source work for the last two weeks. Probably for the next two weeks, uh, again. And then um Uh, what I'm going to do is Tomorrow I'm going to post. My Repository for Onivaben. And my modifications to earwick in a in a branch repository. So you can see what I have. And uh, and then also my configuration, so where I configure my own commands and the transcription, the uh voice repair, so you can actually see what I'm doing. Uh, my configuration is just a mess. Um I never actually posted it, but I I I can actually extract that easily. >> That's okay. It cannot be more messy than my config, and somehow you all managed. >> Uh, well, that I think that's true. And uh, but I have to be honest, so um, I ask uh help um from Claude to be able to understand your config. >> Totally fair. >> Uh, so that has helped our hello and >> Although Michael, I think, has been uh doing it old school and actually like figuring it out. >> Yes. In parts of it, yeah, I still have a long way to go when it comes to Lisp, but I am I am working on that.

1:30:58 Figuring out a smoother on ramp

other: >> And I think, Eric, you've been interested in having kind of a smoother on ramp, especially since EmacsConf is coming up in two weeks, so we might get more people interested in uh >> Yeah. >> Invoice. >> Yeah, I mean it it would be nice if uh like the setup that you guys use if it uh was like easy to install. I haven't tried to do it, so I don't know how. Like, um How far it is from, you know, wanting to uh set it up to having it set up with phony. Yeah, how much work that is. So I mean, uh, optimally it would just be like you install phony and then you like M-x install blah, blah, blah, and then you are ready to go. Um I don't know if it's that. Simple. Oh uh >> So I guess then if you can get uh your uh Your your L L M to generate the uh instructions. >> Instructions. >> And if I uh, you can tell me like what I need to go back and and generalize to make it smoother, I guess. I should I should I should test it with a with a sample thing, a sample account so I can see what it's like when you're starting from scratch instead of cobbling everything together a little bit at a time with duct tape and string. >> I mean, because I mean today the probably the the probably most difficult part of like getting started with uh Emacs lesson, for example. If you know, just getting a talon. Running. Uh and It's not really possible for me to automate any part of the installation process because it is proprietary, so like it's not. Something that I am allowed to do according to the license. So Uh, that would also be a thing that would be very nice with these uh free models is that you could like have an even smoother on ramp experience than. If you are using Talon. If you can automate it all. >> That nerd dictation that I mentioned getting working with speech input takes a it it It mentioned taking a constrained vocabulary also, so it might be possible to use that. As a as a kind of just a constrained text out of it sort of dictation thing. >> Yeah, I'm thinking solid. I mean, there's a difference if you're having like a constrained vocabulary versus a constrained grammar. >> Yeah, it's true. Yeah. >> Because uh, you want still to be able to have free words and free phrases inside of your commands. Um Yeah, it's a language problem at the end. And then we have to learn it. >> Uh, okay. Actually, it it takes a Voss grammar file. I don't know what that means. >> Mm. >> But okay, maybe it's a grammar thing too. I don't know.

1:33:50 Monitoring multiple audio devices

other: Uh, for my part. But with EmacsConf coming up, I'm going to see if I can convert my ASR setup, which mo which monitors different audio devices and labels the input and then handles the events and and all that stuff so that I can monitor multiple audio streams. And I think it's doable because instead of just instead of starting the process directly from Emacs, what I can do is I can change my process to just tail a like a like a log file that all the other processes are appending to. So I can start one process per web conference room that I'm attending. And then if somebody says, help Sacha, I want it to like erase the, you know, raise the alert, flip the window, to change the thing in my Org dashboard so that it's like quantified red or whatever else. Uh, and I think it's doable because uh the way that they've set it up is it's it's JSON L, so it's one event per line. And I can just have all the different processes that are running ASR on different devices write the one log file appending to it and then have Emacs tail it to uh to keep reading the events. So it's going to be chaos, but it's going to possibly be interesting. >> Until everybody learns that. >> For the purposes of monitoring events. Mm-hmm. >> Until everybody learns that you're doing that and everybody starts saying, help Sacha, help Sacha, help Sacha. >> Well, and then and then I qu I spend like five minutes hacking a the equivalent of a slash ignore. So I could say, if it's from this, you know, this meeting room, then don't do it. Uh, and I I think, Michael, from the conversation in Linux saloon two two eight, it's something that pe uh people are interested in, you know, kind of monitoring a meeting in the background for keywords. >> Yes, uh, there was there were. >> So >> Discussion on that, uh >> It might actually be generally useful. >> I know Nate was saying he wanted to have it, uh, you know, just alert him when someone said his name. okay. >> And then you can imagine having an LLM, you know, kind of summarize the last three minutes of conversation, saying, okay, what am I responding to here? I wasn't paying attention. So that'd be cool. Uh oh. >> And uh, that's actually something that the literature mentions, uh, the issue of recall and precision. With many of these things, so. >> Yeah. >> You essentially have to balance both. Mm-hmm.

1:36:10 Directing speech recognition results into etherpad

other: >> Yeah. And the other thing that I want to experiment with speech recognition wise is directing the uh the um automatic speech recognition results into an etherpad so that we can get live live ish transcription of the the events, um, in a way that's editable by people. So in case you want to fix the misrecognized words in real time, it's possible. And I just came across Ethermax, which lets us edit. Etherpad like web based collaborative documents from uh from Emacs without any JavaScript client side. So, uh, so it should be straight straightforward, especially since it it does the right thing, even if you insert into the buffer. So I've tried just dictating to it using a regular dictation setup, and that worked. So all I have to do is is redirectly uh the transcript events um into that one so that they go out into this pad that everyone else can see from just their web browsers. >> And in theory, you could also do it with a Spookfox because you could send the text. Via that into The web page. Yeah. >> That was actually pretty complicated because I couldn't figure out how to, you know, how to wait what how do you how do I insert it so that it triggers all the right events? But yeah. >> okay. >> Ty typing you're trying to find the element and and how to trigger the events that cause it to be noticed in the right way. But since Ethermax has sorted all of that stuff out on the

1:37:33 Questions and answers from irc

other: Emacs side, I can do that. And then I can do the, you know, t monitor the IRC for questions that people ask and get that posted as well. And maybe have it read out to me also when somebody has a question in IRC, so I can then go look for the appropriate. >> Your computer is going to be busy. >> You know, place and and make sure it's in the queue for the speakers to answer. So this all this voice recognition stuff is coming at the right time. >> Your computer is going to be very busy. No. okay. >> That's I I have never tried running six different um recognition threads on it. Like the the auto key server that I use, I've already changed it with the help of LLM to be multi-threaded. So it can it can do multiple workers. So it's just, you know, can I make sense of multiple audio streams, multiple transcripts. >> Well. >> Uh, can I turn it into text, which is easier for me to process simultaneously, compared to trying to keep track of spatialized audio? Uh, also another technique that I'm trying this year.

1:38:35 Transcription in the background

other: >> Yeah, and that's why I think I really, really want to try uh what you and Michael have done, which is sending the audio, the transcription into a buffer. Even if that buffer is buried and just keep that updating. As long as the transcription is on. >> I used it recently. >> That seems to be very useful. Mm. >> Um, cause I so I have mine actually going to a VTT file, so it's timestamped against my my my recording from OBS. And I use it recently to clip or actually too to add chapter markers right away to my YouTube live stream afterwards because it was much easier for me to go back in. I didn't have to wait for the, you know, the Whisper X out. tr transcription after the entire thing, because it was transcribing it throughout, I could get approximate timestamps right away. >> Yeah, that seems very powerful. And I I I can I can see the use for me in terms of meetings, or even as you were saying, just notes that you want to keep as you're doing work. Just vocalizing some of the ideas that you have, and then you don't have to worry about that. Text have been messing the buffer that you're working on. >> Which allows us to stay in command mode more more often, and then just explicitly go into dictation mode when you want to insert. >> Yeah, and I and I can see even uh using an LM to summarize uh That and basically keep it as part of your diary, your log, whatever it is. So it has a lot of potential. You could actually just start at the beginning of the day. And if I always have the microphone with me. Then that can actually run forever. until the end of the day, and then I can actually ask for a summary of what I did or what my Plans to do are whatever it is. So I think that that information can be processed and then you can get some value out of that. The options are Lots of three side.

1:40:36 Mostly constrained by imagination

other: Maybe we're more constrained by By our imagination now than by the technology in many ways. >> And that's one of the interesting things about working with it in kind of Emacs framework because it >> Mm-hmm. No. >> Like Emacs has always felt like that for me, where it's it's not constrained by the technology, it's more constrained by imagination. So we have an opportunity to play around with some ideas that are much harder to implement with just the kind of the commercial or even the um even the open source, uh, the free and open source uh dictation focused options. I think Eric, you'd mentioned before that uh you found talent to be a little constrained in terms of extensibility. So The the things that we experiment with can uh can illuminate possibly uh some some options or ideas that are hard to explore elsewhere.

1:41:30 Putting it to work

other: >> And I think for my can my next steps on my configuration, it's really just kind of Figuring out. What? I actually need and then also start looking at ways I can incorporate this into my actual work machine. Um, right now this is all on my personal machine instead of my my uh Mac that I use for work. So I think that's probably. I think where this eventually goes, because I would like to use some of these ideas we've been talking about. You know, for my day job and not just for my Personal projects that I'm doing here on the side. So I think that's um That's why I'm kind of experimenting on my personal machine first and just figuring out like what works, what What do I need and what do I find useful? And then I'll. I'll be probably moving some of that configuration over to my work machine and kind of, you know, actually taking advantage of it. During the day job. And I think the uh Help Mike, Mike is a good idea. I have a um It's not a shotgun mic, it's a dialogue mic, so it's over my head. Uh Instead, but it's a little on the pricey side compared to uh the lapel mic. And I think the lapel mic will serve just as well for what we're trying to do. So probably looking at that.

1:42:43 Sharing common components

other: Uh, I think uh one thing that we should, like, in general, try to work towards is to not um Like to find. the common components of the things that we are doing so that we can like Uh, share. more of uh the work and to like reuse Like the efforts that we have. So that like whenever someone uh wants to start with speech recognition, they don't have to like start from scratch and define like, okay, what's the command for undo? What's the command for redo? What's the command for going for to line ten, etcetera? Uh, so that we don't Like uh, fall victims to the Lisp curse. Basically. >> Which is a there's an interesting tension there because on one hand it it helps to have uh kind of the the more natural vocabulary when you're starting out. It makes it a little less intimidating to be able to say things like, uh, delete this line. Whereas, uh, for actual, you know, expert use, you want the uh the the tighter vocabulary where you're saying as few things as possible, which might mean things that don't resemble normal English. >> Yeah. So I mean, um Phoney to some extent all already has like capability for exchanging the syntax for different commands or different um Like rules, how you uh refer to, say, a line or how you would undo and etcetera. So that is also like a thing that I've been thinking more about, like How one could make it easier to define syntax variations. Oh. And then you would be able to, for example, have like a simplified cursor free and then an advanced cursor free and Um I think that would also be nice to uh make it easier to customize like parts of the syntax that maybe is are difficult for you to say because. Like, um Uh, I found for example that the default Uh, alphabet of Talon had some words that were difficult to say for me because of my accent, so I had to change. Exchange them, for example. And I think that could probably be the case for syntax as well, that just some word orders are. Like more natural to say. For some people, but other people like think differently and want. Want it the other way. okay. >> Yeah, so that's why I was asking you, okay, how do I how can we define aliases for things? How can we undefine a rule in case we don't want this specific word because we use it for regular, you know, for for regular like for other things or there's a there's a rule that's matching, we don't want it to match. And like last night I was trying to figure out how to add French numbers, and I was trying phony put dictionary or dictionary put or whatever it was called. I'm not entirely sure I understand how to do that yet. >> Mm-hmm. >> I was trying to add it to the numbers. Um In order to get it recognized, but it's a I don't know how to do it. >> What would you say? How how did you try to accomplish it or? Uh You can. Yeah. >> You can talk first while I go figure out my w where I put my my test code. >> Yeah, so I was going to say, Eric, that uh you remind me something I read of a paper last year that they said that one of the challenges researchers have is lack of common infrastructure. That they can build on top. So they have to build a lot of um scaffolding before they can start experimenting. And I think in a way, I think that we're in a great advantage because we already have. a common layer from where we can start doing that. I'm certainly going to look into funny and how things get done there. to try to understand better how it works. Yeah, I I think that the Airwig has a branch where uh It builds upon phony, but it builds upon a fork of phony, so it's not like completely compatible with. Like other phonic grammars, but uh You can also look at that as well.

1:46:40 Modifying how phony parses things

other: >> okay, so it turns out sometimes Orukeet gives me hyphenated numbers. So if I say twenty one, I actually get twenty dash one, which I think >> Mm-hmm. Right. Mm-hmm. >> Uh, the phony number number parsing does not currently anticipate. So I was wondering how one deals with how how one adds that as a a As an option. >> okay, so I think that that the way you could do that now is that Uh, because number is a an interface rule. And the default like provider for that interface rule is called the Phoney studlib number. Uh so what you could do is that you uh say define a An open rule may be called the Sacha number. Where one of the alternatives are phone is Dudlib number. And then you contribute another rule which says that, okay, when I say twenty-one. That should produce the number twenty one. >> okay. >> And this should also be an alternative for Sacha number. >> All right. >> That wasn't. >> Um, but has I'm wait, I'm a little confused. How how do I get this? session number to plug into or the rest of your awesome Like crystal free phony commands that use numbers. >> So the the cursor free commands, uh, when they Uh, need a number, they match on the rule which is called number. >> okay. >> And Which actual rule it is, like because the number rule is an interface, then there is some resolution logic for which rule that should actually match. So by the default number resolves to phonisted lib number. But you can define your own rule. where like one of the possible matches are a phony studlib number, but where you provide your other alternatives. >> okay. okay. >> And then when you say colon provides number, then that will be used. >> All right. >> That's the definition of number. >> okay, that makes sense. So >> And then it will work everywhere that uh a number is used. >> okay, so I am replacing the thing that provides number. Bye. Uh, by my my my thing that uses alternatives. So it's not like So so I need to make sure that I include all the other behavior in it. Instead of just adding two. The list. okay, gotcha. I think. I will try it and I will report back. >> Yes, yeah. That that's that's how it how it has to be done, like uh currently. And I have thought a bit about how. One could make it easier to just like extend this rule in a more direct way, but that is how it has to be done today. >> okay. >> Yeah. >> Thank you so much.

1:49:18 Regular expressions

other: >> And do you have something equivalent to the regular expressions matching where you can say? A slow, uh, think in terms of E Lisp where you can define A regular is a Um Regular expression replacement. Where you say this part is the one that is variable, it's going to be replaced by that, but it has to appear within this context. Mm, I'm not exactly sure how you mean. So do you have like an example usage? So I think in terms of regular expression that has the parentheses. Uh, in between. So It matches the regular expression, but only the thing between parentheses is going to be replaced. And the thing outside the parentheses stays the same. >> Like keyword one, phrase that gets re you know, that that's the parameter, and then keyword two. Like A scene. Is it still? I do you have context before and after the stuff in the middle that you're trying to extract? And now she has uh That reminds me. >> Trying to find an example. >> Yeah, yeah. okay. Well, while Dan is queuing up an example, that reminds me, uh, I I do have some of the the commands that I use to define in regular expressions that I might port over to phony, and some of them have like phrase followed by keyword. And I think with your new Um, with a new cost sorting. It it can do that, right? Where where it will it will recognize the phrase as the variable part and then uh match the literals at the end. Is that correct, Eric? >> Yeah, so m if you have like a a prefix that they say defined literal and then a phrase as the suffix. Is that the situation? >> Uh no, I was thinking. >> Sure. >> okay, translate hello world in French, where the okay translate and the in French are both literals, and then the phrase is in the middle. >> Uh yeah, yeah, but >> Yay >> But I think that should have uh worked. Uh, before as well, unless in French was optional, maybe. So if in French was uh optional, then now it should uh always pick the in French and not uh just swallow it for the whole phrase, yeah. >> All right. >> Yeah. okay. >> I think that means I can move more of my, uh, more of my old regular expression based commands to to phony, which is so much nicer because regular expressions get really hairy after a while. >> Yeah. Yeah. And then the ability to have the replacement section. Um. uh embedded in the regular expression allows you to basically have a context sensitive grammar. That if the word appears in between these other words, replace it. Otherwise, don't do it. So so do you mean? >> I think that's that's kind of the use case that I was just talking about. >> Yeah. >> Like the the my for example, my particular use case is okay, okay, whatever, whatever in French. Where it only triggers if it's bounded by those two keywords. >> Yeah, and I mean if you also have uh special words for like splitting. So if say that you have a command which takes two phrases as the input and then you have a Like special word to differentiate between the first and the second phrase, then that should also work. For example. >> Oh yeah, how do I do like Is command chaining a thing that I that you can already do in phony? >> Yeah. >> It it feels like it should from a quick view of the the source code. How? >> Yeah, at home, like if you uh Use phony evaluate or phony evaluate as event. Uh, then you can just Like write out the Like a sequence of commands, and they will interpret that as a sequence of commands and not. That's just one. So say if you have a command that is Yeah, so so if you have a command where you say go up to go to the previous line. Then you can phony evaluate the go up, go up, and it will go up two lines. >> okay, so Dan's got an example in the text chat, which is a research forward and then this. Kind of like us up. Word by itself. Followed by stuff and then followed by end. >> And then gick on it. >> Although I think do you mean to actually keep the middle as Your parenthesized group that you're capturing? >> Uh The syntax of of Lisp of E Lisp is a little bit weird because then the replacement would be something like this. So let me explain you what that means. So it will. Uh, the chat is replacing backslashes anyway, but the idea here is that. The word this gets replaced with the uh A backslash one. It's still the same. So it just puts backslash one again. And ant is the backslash two. So that still gets replaced. So what so is it's the same. gets replaced is the one in the middle. So the text in the middle, the word in the middle gets replaced by the. So in this case, this whatever end will always be replaced by this, the end. It's just that the syntax is kind of weird. But look for a Replace rejects. And that's the function that does it. So replace rejects. Look at the documentation. Because that's the one that describes how this syntax actually works. Where you define what is remains the same and what remains variable. And it's just that the syntax is kind of weird. And uh, Python has Also a different syntax. Uh, Pearl has a different syntax. Everybody does it in a slightly different way. >> okay. Have you defined the phony rule that uses phrase before? >> Me? No, I have not. Have not used it. >> okay. Eric, do you want to share an example or should I pull up one? >> Um Uh um. Pull up one. >> okay. >> I uh, yeah. >> Hang on a second. Let me uh Ha. Let me figure out how I can do it. Oh, I take a I take presenter here. And I share. Uh, share my window. Which I should have a voice command for eventually. Uh do do. Any of these? Like, so all of my phrase commands at the moment, just use it at the end. But now that I know I can do it in the middle, that's okay too. >> okay. >> Uh, so here, for example, I'm looking for web search plane followed by any text, and that phrase is available as a string in the defunct. Is that sort of Similar to what you're looking for with the capturing groups? Yes. >> Uh, yeah, sim, yeah, it is. And uh, although the advantage of the regular expression syntax is that uh you can express the text as a regular expression instead of a string. So I do not know whether that's possible in here. That instead of web search plane, you can say W followed by something. Then followed by search plane. >> Yeah, so so I think w the question is, can we s can we match based on regular expressions and not just literals? >> Uh no, so the the unit of uh matching uh uh is the word. Um Så min phone är Uh, you still specify like a regular language, but it's a regular language of words and not of characters. >> okay. So the >> So if you have the plural, for example, you have to specify both. Yeah. okay. Because that would be an example, right? That you have, or maybe you have, yeah, so the plural, I think, is the example that the the S is optional. At the end. Mm. >> So I wonder if something like the way that PK syntax allows you to specify RX. Might be uh might be an inch like it it might be interesting eventually to add some kind of operator. Too phony. So that you could match on a regular expression. So I don't have to create alternate, you know, uh, al alternatives for the plurals. >> Oh, not even that. Oh. But hold on, just just before before you start thinking. Imagine that you can specify the type of work. Only do it for nouns, only do it for verbs. >> That one I think might. Might be handleable by a dictionary, but I'm not sure. >> Yeah. Yeah. Of course, the problem becomes also the cost of the transcription, because then it becomes more expensive to do the lookups. >> Well, I have a s side example in the, um The the thing that I just added in order to split my layout. Funny to to change my keyboard layout here. >> okay.

image from video 01:59:10.767other: >> So here, for example, I have uh I have this, and it only triggers if the word is one of my keyboard layouts. So either QWERTY, main, reset, Dvorak, or French. Uh, and it will only trigger if it's that word followed by the word layout.

1:59:32 Figuring out words in context

other: >> Now, uh, synonymous, sorry, uh, looking at the word without context is not sufficient to determine what type of word it is. Because we have nouns that they also verbs. >> Mm-hmm. >> We have words that they are everything. And so that that requires parsing of the text. >> And that that that is a like I is there a is there a specific use case for a voice command where you might find that. Like how would you distinguish that as a human? >> I think that that's more for voice repair because then if you actually have the text as a whole. Then it might make more sense to be able to do that type of analysis than as you're dictating, because as you're dictating, you might not have enough context to be able to make those decisions. Like think in terms of uh maybe there would there are cases where certain word when it appears at the beginning. Uh, you might want it replaced, but not when it's in the middle. Or you want it replaced if it's a noun, but not when it's a verb. >> I see. Uh, I in on the French learning side I've I can use spacey to tag words by their their type. Uh, and their their like gender and all these other things. So it is possible to use natural language programming libraries in order to identify these things. >> Just fine. >> Maybe? So if you wanted to say, you know, have a command that says uh upcase all the nouns. Or capitalize all the nouns, because in German it's like that, right? Then, um, then either an L L M can do that for you, or if you really wanted to do it deterministically, then maybe an L P. >> The LLM also gets. los loses context context well loses it track of what it's doing very easily. So if you ask it to do too many things at once. It will not do them. >> Which is one reason why. >> So that's another problem.

2:01:33 More about voice repair in large language models

other: >> I've been hesitant about LLM rewriting because I don't want to have to be, you know, be verifying, did it change, you know, did it change my wording, even if I explicitly told it not to do that. >> I think that was actually the advantage of being able to tell it to do voice repair because it has a different >> Oh yeah. >> Interpretation of doing that and trying to actually fix your With your wording, right? >> Yeah, yeah. >> Otherwise, you have to be very specific about actually not doing that. And uh, but I think that uh Again, so we have two problems, the problem of inputting the text as we are speaking it, and then the problem of fixing them later when. It's actually a more uh larger text.

2:02:17 Regular expressions, and grammar portability

other: So uh if we uh get back to the like uh having reg access. Like inside of a phony D fan. So I think that The reason that it would be difficult to implement is that Like it wouldn't be portable to talon. So when I exported the grammar to Talon. Uh, so Uh I think it would be pretty easy to implement like in the phony parsing side, but not um for exporting to a grammar constrained recognizer. Um So if I if we had that, then uh phony would. Not be like unified. anymore and then it would uh not be possible to share grammars with uh each other anymore. >> I am. And also because then your your uh rule might So, it messes with other parsing things. >> Yeah. But I think that's That shouldn't be uh Too big of a problem with how the parser is designed. I don't think. So it's more a question of uh being compatible with the different uh back ends. Så datt. Like all grammars work for uh all setups. So

2:03:47 Talon voice

other: I it's the first time I heard about Talon. So is is that better than? Things like whisper, or what would be the advantage or disadvantages of that? Maybe we can talk about that in another. Day, but I think that's also. Uh, I I got curious about actually what is capable of doing. And then I see that there's actually paid features also. But maybe that's for another day. I would say that for me the advantage is precisely that. Um Like the the decoder from your speech is designed in such a way that it will. Um It will only decode to a legal command, so you will never have problems with. uh just m misrecognitions to like random Like random misrecognitions. So it can only misrecognize into another like legal command that sounds close to what you tried to say. Otherwise it says it basically ignores it, or what does it do otherwise? I wonder if he got frozen. >> Oh, it does look like it. Uh, I will let him know in the chat. Mm-hmm. Oh, he's Um I think you're froze, Eric. You're frozen. You He will probably find out. I I actually haven't tried talent much myself. I tried it briefly. And then I decided to just go with with Orkey on account of the uh the multilingual. Stuff, but The constrained grammar recognition does sound very tempting. >> Yeah, I think that we might be able to actually talk about that later. And uh Yeah, I'm going to go too, so it's getting late here. >> Yeah, yeah. It's it's been two hours. >> And uh, but thank you very much for for doing this. It has been great. okay. >> Yeah, we'll see you next month maybe. Uh, or once I survive EmacsConf. All right. Thank you. >> Yes, yes, and thank you very much for doing that. Two. And uh >> All right. >> Always look forward to your newsletter every week. okay. >> Uh, catch you all on maybe the Matrix channel. And uh, looking forward to slapping more notes after I steal large large parts of your config and the packages that you're about to publish. >> okay, sounds good. >> All right. okay. Bye. >> Have a good day. Bye.

View Org source for this post

You can e-mail me at sacha@sachachua.com.

-1:-- Emacs by Voice meetup (Post Sacha Chua)--L0--C0--2026-11-27T16:29:51.000Z

Emacs Redux: Theme Families and theme-choose-variant

A while ago I wrote that multi-variant themes have become the norm - pretty much every popular theme these days is a family of a few dark variants and a light one. And every such family ships its own command for moving between the variants: modus-themes-toggle, ef-themes-select, tokyo-night-select, batppuccin-select and so on.

I have to admit that I had completely missed that Emacs has a built-in command for this since Emacs 29 - theme-choose-variant. I learned about its existence only recently, when I tried it with my own Tokyo Night theme and got this in return:

Theme `tokyo-night' does not have any known variants

Not cool, given that the theme has four variants! So, what’s going on here?

The command

M-x theme-choose-variant looks at the theme that’s currently enabled and switches to another theme from the same family. If there’s only one other variant it just switches to it, otherwise it asks you which one you want. The command is also available as toggle-theme, which is a much better name for the two-variant case.

You don’t need to install anything to try it, as a few of the themes that ship with Emacs come in pairs - tango and tango-dark, leuven and leuven-dark, tsdh-light and tsdh-dark:

(load-theme 'leuven t)

M-x toggle-theme will take you to leuven-dark, and another M-x toggle-theme will bring you back to leuven. Pretty neat! The old theme gets disabled before the new one is loaded, so you don’t end up with one theme stacked on top of the other. (I wrote about that problem in Clean Unloading of Emacs Themes)

Things are a bit different with the Modus themes. There are eight of them in Emacs these days, so with modus-operandi enabled you won’t get a toggle, but a prompt listing the other seven. And a theme that’s on its own, like wombat, gives you the same error I got:

Theme `wombat' does not have any known variants

How themes opt in

So, how does Emacs know that leuven and leuven-dark belong together? In case you’re wondering - it doesn’t guess this from their names. In Emacs 29 deftheme started to accept a property list after the docstring, and the theme has to say what family it’s a part of:

(deftheme leuven-dark
  "Face colors with a dark background."
  :background-mode 'dark
  :family 'leuven
  :kind 'color-scheme)
  • :family is what ties the variants together. Themes with the same family are variants of each other.
  • :kind should be color-scheme for a regular color theme. Themes that don’t set it are treated as color schemes for the time being.
  • :background-mode is light or dark. Nothing uses it yet, but the manual asks theme authors to set it anyway.

wombat sets a kind and a background mode, but no family. My themes didn’t set anything at all - their deftheme forms are just a name and a docstring.

The autoload catch

Adding the properties to deftheme is not enough, though. They are stored on the theme’s symbol when the theme file gets evaluated, and nobody has evaluated the files of the variants you haven’t loaded yet. Emacs has to know the properties of every variant before any of them is loaded.

The built-in themes solve this with a special cookie:

;;;###theme-autoload
(deftheme leuven-dark
  ...

When Emacs is built, the properties of every theme marked this way are extracted into a file named theme-loaddefs.el, that’s loaded at startup:

(put 'leuven-dark 'theme-properties
     (list :background-mode 'dark :family 'leuven :kind 'color-scheme))

That cookie means nothing in a package you’ve installed from MELPA, though. A third-party theme has to use the regular ;;;###autoload cookie in front of its deftheme. Starting with Emacs 29 the autoload generator knows about deftheme and extracts only the properties from it, so you end up with the same put form in the package’s autoloads file.

Without this the command will find only the variants that you’ve already loaded in the current Emacs session, which for most people means none of them:

`foo-dark' has no variants

Who supports this?

I was curious how many themes have picked this up, so I went over the source of 60 or so popular ones. The short answer is “very few”. Protesilaos’s themes (Modus, Ef, Standard, Doric) declare a family, and so do doom-themes and a handful of smaller packages. Pretty much everyone else declares nothing, including big multi-variant families like Solarized, Gruvbox and Kanagawa.

What surprised me more is that I didn’t find a single third-party theme that autoloads its properties. As far as I can tell that leaves the built-in command blind to the variants you haven’t loaded yet, and I guess that’s why the themes that did the work kept their own commands anyway. (e.g. Modus loads its themes without enabling them to learn their properties)

A few rough edges

The command is pretty basic and it has a few limitations you should be aware of:

  • It toggles only when the family has exactly two themes. Tokyo Night has four, so I’d get a prompt every time. There’s no way to say “these two are the ones I switch between”.
  • It doesn’t know what’s light and what’s dark, because nothing reads :background-mode. You can’t ask it for “the light one”.
  • It refuses to work if you have more than one theme enabled.
  • It loads the new variant with a plain load-theme, so for a third-party theme you haven’t marked as safe you’ll get the usual “Loading a theme can run Lisp code” question.

That last one is the reason modus-themes-toggle is still around. Protesilaos considered dropping it in favor of toggle-theme, and decided against it because of the prompts.

Note: This is a command you invoke by hand. If you want Emacs to follow the appearance of your OS or the time of the day, check out Automatic Light/Dark Theme Switching.

What about older Emacs versions?

The good news is that the properties are harmless there. deftheme has been ignoring any extra arguments for ages (I checked all the way back to Emacs 24), so a theme that declares a family will load just fine on Emacs 27 or 28.

The bad news is that theme-choose-variant doesn’t exist before Emacs 29, so the users of the older versions get nothing out of the properties. The autoload trick doesn’t translate either - the old autoload generator doesn’t know about deftheme, so it copies the whole form into the autoloads file and the theme gets declared at startup.

Both Tokyo Night and Batppuccin support Emacs 27.1, which means I can’t rely on the built-in command and I need one of my own anyway. It’s not much code:

(defconst tokyo-night--variants
  '(tokyo-night tokyo-night-storm tokyo-night-moon tokyo-night-day))

;;;###autoload
(defun tokyo-night-select ()
  "Select and load a Tokyo theme variant interactively."
  (interactive)
  (let* ((names (mapcar #'symbol-name tokyo-night--variants))
         (choice (intern (completing-read "Tokyo theme: " names nil t))))
    (mapc #'disable-theme tokyo-night--variants)
    (load-theme choice t)
    (setq tokyo-night--current choice)
    (run-hook-with-args 'tokyo-night-after-load-hook choice)))

The theme knows its own variants, so there are no properties to autoload and no theme directories to scan. It works the same on every Emacs version, it doesn’t ask you to confirm anything, and it can do things that only make sense for this theme, like running a hook after the switch. That’s why I think that theme authors who still support older Emacs versions shouldn’t rely on theme-choose-variant for now. Just ship your own command, as most themes already do.

Of course, nothing stops you from doing both. Declaring a family takes only a few lines per variant, and it makes the theme play nice with the built-in command on Emacs 29+. I’ll certainly add the properties to my themes, but their own commands are here to stay.

Do you use theme-choose-variant? Did you even know it existed? I’d love to hear about it in the comments!

That’s all I have for you today. Keep hacking!

-1:-- Theme Families and theme-choose-variant (Post Emacs Redux)--L0--C0--2026-11-27T12:30:00.000Z

Emacs Redux: M-n: The Minibuffer’s Future History

Every Emacs user knows that pressing M-p in the minibuffer goes back through the history of the things they’ve typed there before. That’s one of the first things you learn, right after C-g. And if you go back too far you can press M-n to go forward again. End of story, right?

Not quite! What happens if you press M-n right away, when there’s nothing to go forward to? You might expect an error, but instead Emacs will often insert something useful. That’s what the Emacs manual calls “future history” - a list of things that the command guessed you might want to type next. 1

A Few Examples

Here are a few built-in commands where M-n does something handy:

  • C-x C-f (find-file) - inserts the file name at point (if there’s one) and after it the name of the file you’re visiting, which is great when you want to open one of its siblings
  • M-% (query-replace) - inserts the symbol at point and after it the last thing you searched for with isearch
  • M-s o (occur) - the same suggestions, plus the active region
  • M-! (shell-command) - inserts the name of the file you’re visiting (or the file at point in Dired), which is super handy for commands that operate on the current file
  • C-x b (switch-to-buffer) - inserts the default buffer and afterwards keeps going through the rest of the buffers

The last one shows something that applies to every command that uses completing-read. When you run out of default values, M-n starts going through the completion candidates themselves. So in a pinch M-n is a poor man’s candidate cycling, even if you’re not using any fancy completion framework.

Tip: A lot of prompts show their default value (e.g. Describe function (default car):) and most people just press RET to accept it. If the default is almost what you want, though, press M-n to insert it into the minibuffer and edit it there.

Using it in Your Own Commands

If you’re writing Emacs Lisp you get all of this pretty much for free. The functions that read from the minibuffer (read-string, read-from-minibuffer, completing-read, read-shell-command and friends) accept a default value, and that default value can also be a list. The first element is the default and M-n will go over the rest of them in order:

(defun my-search (term)
  (interactive
   (list (read-string
          "Search for: " nil nil
          (delq nil
                (list (thing-at-point 'symbol t)
                      (add-log-current-defun)
                      (and buffer-file-name
                           (file-name-base buffer-file-name)))))))
  (message "Searching for %s" term))

Here M-n will first offer the symbol at point, then the name of the current function and finally the name of the current file. There’s also read-regexp, which adds a bunch of standard suggestions (the ones you saw in occur) to whatever you give it.

That’s the trick behind most of the smarter prompts in the upcoming Projectile 3.5. I like this approach a lot, because the suggestions don’t get in anyone’s way - if you never press M-n the prompt behaves exactly as it always has.

Lazy Suggestions

There’s one catch with the list approach - you have to compute all the suggestions before the prompt shows up, even though most of the time nobody will ask for them. If they are expensive to compute that’s a problem. Enter minibuffer-default-add-function. Emacs calls it the first time M-n runs out of default values, and whatever it returns becomes the new list of defaults:

(minibuffer-with-setup-hook
    (lambda ()
      (setq-local minibuffer-default-add-function
                  (lambda ()
                    (append (my-expensive-guesses)
                            (minibuffer-default-add-completions)))))
  (completing-read "Find file: " files))

minibuffer-default-add-completions is what this variable is set to out of the box, and it’s the reason why M-n goes through the completion candidates in the first place. Here we just put our own guesses in front of them. Keep in mind that the function gets called with the minibuffer as the current buffer, so if your guesses depend on the buffer the command was invoked from (e.g. you want the thing at point) you’ll have to switch to it first. (with-selected-window (minibuffer-selected-window) ...) does the job. That’s how find-file comes up with the file name at point, by the way, and I’m using the same trick for Projectile’s projectile-find-file.

That’s all I have for you today. Give M-n a try the next time Emacs asks you something - you might be pleasantly surprised! Keep hacking!

  1. See C-h f next-history-element and the Minibuffer History section of the manual. ↩

-1:-- M-n: The Minibuffer’s Future History (Post Emacs Redux)--L0--C0--2026-11-27T06:30:00.000Z

Sacha Chua: Typing + voice, voice + typing; dual-channel awesomeness with Emacs

This post is for five types of people:

  • The tiny group ofq Emacs users exploring dictation and voice control: let's bounce ideas around and see how far we can take this
  • Emacs users who are curious about speech: there are plenty of non-Emacs dictation tools like OpenWhispr and Superwhisper, but it might be worth the effort to make Emacs the center of your speech workflow
  • People who use dictation and voice control with other editors (Cursorless on VS Code, etc.): borrow ideas and share what you've come up with
  • People who haven't checked on the state of local speech recognition and who might be pleasantly surprised by what it can do these days
  • Me, so I can think about the things I want to experiment with and prioritize what I want to squeeze into these last two weeks before EmacsConf (aaah!)

Dictation is a tap away on Windows and macOS. If you're on Linux or if you're looking for something other than whatever's built into the operating system, tools like OpenWhispr are easy to install. Different Linux distros are working on integrating dictation: Omarchy has Superwhisper, Ubuntu is working on dictation with Project Myna. OpenAI, Claude, and Gemini all have conversational interfaces so you can chat with a large language model. Most of the tools I've seen start with dictation. Some tools offer LLM-based rewriting to clean up filler words and false starts. You can edit, reformat, translate, and revise. Tools like Dragon and Talon Voice offer voice control and integrate into more applications.

There are any number of providers that would happily sell you a subscription for a dictation service with a cool demo, but you can get surprisingly decent results from free open-weight models that you can run on your own computer without a GPU and without cloud processing. I use sachac/whisper.el and phony with orukeet on a Lenovo P52 laptop (entirely on my CPU) from 2018. I use Kokoro for speech synthesis. Sometimes I toggle speech recognition on and off with a keystroke, sometimes I switch between command and dictation mode, and sometimes I just leave it running in the background, using Silero voice activity detection to segment it by silences. It does reasonably well. If you're philosophically opposed to large language models trained in massive data centers on enormous quantities of scraped data, you are not cut out of this game either. If you're open to more classical approaches like Vosk or CMU Sphinx, you might still be able to get voice control with a set of commands.

I've been experimenting with Emacs as the core of my speech recognition system. You might be wondering what a 50-year-old text editing program has to do with speech recognition. It's probably the most programmable piece of software around. Over the years, people have built so much on top of it. People have added task managers, note archives, email clients, web browsers, media players, and more. I think it offers some interesting possibilities that other people might not have much of an opportunity to explore. There are a bunch of us now experimenting with this, and before our meetup tomorrow, I wanted to think through the topic so that I can come up with more ideas based on things that are working well and share what I've been learning with other people.

There are three main topics I want to explore that might be at a bit of an interesting distance from the typical kinds of dictation that other tools offer:

  • No silos: taking advantage of what Emacs can offer
  • Typing + voice: using voice as an additional channel
  • Voice + other methods: capturing, editing and restructuring ideas

No silos

One of the things I love about doing my speech recognition through Emacs is that it can take advantage of all the data and functionality that I already have. Here are some examples of how effective it is when you don't have to deal with different applications for different features.

Correction

Speech recognition isn't 100% accurate. A good speech recognition tool makes it easy to define a dictionary that influences how words get recognized. For example, I refer to "Emacs" far more often than I refer to "IMAX." I don't want to define this dictionary multiple times for dictation and spell checking and other things that I need to do with text. I want to fix misrecognized words once and have that available everywhere: when I'm dictating to my computer, when I'm automatically transcribing recordings from my phone, when I'm editing the transcripts of other people's presentations.

Bookmarks

I want to be able to open bookmarks quickly. I can use "open …" to open one of my favourites in the foreground, and "background open …" to open it without changing focus. I can use "web scroll" to scroll the browser window without shifting to it, and I can click with "web click …". I can configure some links to open in Firefox and some links to open in Chrome. This uses a list of favourites that I can also use when writing blog posts, Markdown, Mastodon toots, and e-mails. I can insert a link with completion. I can even select some plain text (ex: "EasyEffects") and use my keyboard shortcut to automatically link it to the matching favourite. I can save a link right from my blog post drafts with sacha-org-favorite-save-link. And I'm not limited to websites. I can run any kind of code or custom link through the same mechanism. For example, I can say "open schedule draft" to open the draft schedule for this year's EmacsConf as an Org mode file and an SVG. I don't have to manage different stores of data.

Integration

My voice commands have access to anything my Emacs has access to, which is a lot. When I tell my computer to take a note or add a task, it can put it in the same Org mode file that's part of my daily routines. When I'm trying to resynchronize audio and video in a recording, I can use "from the top" to restart the video player and jump to the first subtitle that I've narrowed my focus on.

Malleability

It's super easy to tweak my speech recognition system. I can add new commands, change their behaviour, or debug their internals on the fly.

Typing + voice

I still type my code. I haven't quite gotten the hang of hands-free coding yet, although a lot of people with repetitive stress injuries have figured out things that work really well for them like Emacslisten or Cursorless.

Voice gives me an additional channel that I can use to keep my fingers and my focus on one thing, while offloading the inevitable distractions to something else that can keep track of it for me. When I'm typing some code and an idea occurs to me, I can say "remind me next week to …" and the audio feedback reassures me that it's saved and I don't need to let it occupy my brain. When I'm stuck because I need to look something up, I can say "look up …" and my browser searches it for me in the background without stealing my focus. I love being able to say "let's go live" to start streaming on YouTube and "over and out" to stop streaming, even when OBS is buried under other windows on my laptop screen.

I like using voice commands to create natural shortcuts for the things that I don't do frequently enough to dedicate and memorize a keyboard shortcut for. It feels natural to use voice to expand snippets and call commands.

When I'm trying to figure out a bug or I'm thinking through a new feature, I can talk out loud and do some rubber ducking, and the notes are there so that I can go back over them later. Misrecognized words are not a problem because if I capture enough context for myself, I can usually figure it out, and I have the recording that I can go back to. When I get interrupted, my notes are there to help me pick things up again. For this, it really helps to be able to dictate somewhere other than at my cursor, and to integrate into all the other things that I do.

I prefer using a deterministic grammar to figure out my voice commands so that I have a better sense of what's going to happen. It's also pretty fast, and I can do everything locally.

I think this group of ideas is about offloading things using a secondary channel so that I can keep thinking about something without having to make a context switch. Voice is great for that because I don't even have to move my fingers or rearrange my windows.

For coding, it should be pretty straightforward to add some voice commands that reload the web page or rerun the last test. I should also be able to come up with commands to arrange my windows the way I want them. I just haven't gotten around to implementing those yet, but I've saved the TODOs so that I can focus on getting this post out the door.

Voice + typing and other methods

When I'm writing a blog post like this, it's pretty natural to use dictation because there aren't that many weird things that are hard to say. I type at about 100 words per minute. I talk at about 210 wpm if I'm doing a full-on info dump. I'm much slower at either when I actually have to think about what I want to say. (I dictated+typed this post at about 26 words per minute.) Talking helps me get the gist of the idea out of my brain before I can forget it. I also like how, when I'm streaming or recording a video, having dictation means that I don't have to explain things out loud and try to type at the same time. These are pretty normal benefits that you can get with whatever dictation tool you choose, so let's go into some of the more Emacs-y things.

For writing, I find myself shifting to getting the bulk of the ideas in through dictation rather than typing. I still prefer to edit my own text instead of having a large language model rewrite it for me. Here, Emacs's strengths as a proper text editor really come into play. Org mode makes it so easy to manage text. I've set up my dictation so that it's automatically split up into one sentence per line. This makes each sentence easy to scan. In an Org mode list, my dictation switches to automatically inserting new list items at the same level. In a comment, it continues the comment. Org mode shortcuts make it easy to move sentences and paragraphs around, reorganize lists, and move entire subtrees. I can change between lists and paragraphs, between paragraphs and one sentence per line, and between comments and code.

I can separate my voice cursor from my typing cursor with a command like "voice mark", which tells the computer where I want new text to go in. ("Voice clear" resets it.) Then I can use the keyboard to move around and do some edits at the same time. I can even switch to a different file to grab a link or copy some text.

Voice is also handy for switching things from one medium or another. For example, I start many of my blog posts as sketch notes, and voice lets me flesh out the idea in the process of getting it into my computer as a draft. It does take a little bit of correction, but so would optical character recognition, even with an AI.

Having the ability to shift back and forth between voice and typing means that I can do other things with my hands. I have some fidget toys and a 5-pound weight near my laptop. I can stand up and stretch. It's nice to have more flexibility.

I'm still practising formulating my sentence all the way through before saying it, or at least speaking in more comprehensible chunks. I often have lots of pauses and false starts. Speaking more fluidly is a good life skill though, and it'll help me with making videos and talking to other people too.

I think this group of ideas is about using voice as an input method and finding better ways to work with the raw material. I'm thinking about voice commands that I might like to use for editing. A number of other people have already started experimenting with those, like cursorfree and earwig. I think it's mostly a matter of picking the commands that I want and getting the hang of using them. I'm also curious about using voice to sort ideas into different piles. Like the way that I categorize lots of links for Emacs news every week. I experimented with using voice for categorizing those before, and I think it might be possible to generalize it so that I can write in a less linear way. I can imagine brain dumping a whole bunch of points and then grouping them into the introduction, different supporting areas, and the conclusion.

Wrapping up

People are already finding basic dictation useful, and voice control is also pretty mature. I'm curious about the stuff that doesn't scale, the things you can build when you have a super personalized setup where you aren't limited to a small set of features that the developers have anticipated. My setup is nowhere near mass market. I'm amazed that a few people have actually been able to scavenge enough from it to get things running on their systems.

None of these things are really revolutionary. They're probably not even really good reasons to switch to Emacs if you're already comfortable with something else like Neovim or VS Code. But I love being able to make these tiny tweaks to the way I work with my computer, and given my experience with Emacs, I know they'll accumulate. I'm looking forward to seeing what we can figure out together.

View Org source for this post

You can e-mail me at sacha@sachachua.com.

-1:-- Typing + voice, voice + typing; dual-channel awesomeness with Emacs (Post Sacha Chua)--L0--C0--2026-11-27T02:20:27.000Z

Sacha Chua: EmacsConf: Resynchronizing audio and video using Emacs and subed-record

Pedro Aranda and Roger Schurch used our instance of BigBlueButton to record their upcoming presentation about accessible PDFs with ltx-talk for EmacsConf 2026. I had configured it to export a single-file .webm for easier downloading and playback. After their video finished processing, I downloaded it and I ran WhisperX with diarization on the video file. I trimed the beginning and the ending to remove some extra bits.

While reviewing the transcript and adding chapter markers (using sacha-subed-mpv-ocr-and-select-line-as-comment), I noticed that the audio and video tracks from BigBlueButton kept drifting apart throughout the video. I'm not entirely sure why. Even the original had these synchronization issues.

The desync bothered me enough that I wanted to sort it out. I could get the separate .webms for the audio, screenshare, and webcams, but their durations differed too, so I'd probably still need to figure out the offsets. I decided to work with the combined webm instead. I just needed to figure out the delays to add to the audio file to get it to match up. I'm not used to staring at people's faces trying to read their lips, but I'd had some practice when I corrected the offsets for the Emacs community panel. That one is public. Now my process is:

  1. Jump to a speaker change, since that's usually when the timestamps drift.
  2. In MPV, use C-+ or C-- somewhat randomly until I happen across a setting that lined it up. I think it's + to add a delay to the audio, which is needed when the audio says the words first and then the video follows. - is for when the video is ahead of the audio. MPV displays the offset when I change it, and I can also use I to display the stats.
  3. Once I've gotten things mostly synced, skim backwards until I find the end of the previous segment where the offset needs to be different.
  4. Add the value as #+AV_OFFSET: directive in a comment in my VTT file. Ex:

       00:05:08.004 --> 00:05:11.531
       our teaching materials.
    
       NOTE #+AV_OFFSET: 600
    
       00:05:11.532 --> 00:05:14.353
       [Pedro]: And here in Europe we do have a
    
  5. Test it by selecting a region with a few subtitles and using subed-record-compile-video to check it. I used or mpv --loop-file=inf to loop over the full clip.
  6. Test the audio file for the whole video without regenerating the video part: mpv video-file.webm --audio-file=test.webm
  7. Combine the new audio track with the video using ffmpeg, or regenerate the whole video with subed-record-compile-video.

Here are the offsets I came up with:

Offset Start time End time
-200 00:00:14.560 00:02:18.840
300 00:02:18.841 00:05:11.531
600 00:05:11.532 00:06:05.532
500 00:06:05.533 00:10:11.660
800 00:10:11.661 00:11:00.559
1000 00:11:00.560 00:13:17.451
1800 00:13:17.452 00:16:06.940
2500 00:16:06.941 00:18:16.704
3000 00:18:16.705 00:22:12.559
3600 00:22:12.560 00:26:31.406
3900 00:26:31.407 end

I'm not entirely sure that I've gotten the offsets nailed down yet, but they're better than the original. Once the talk airs on Dec 12, you'll get to see the results at https://emacsconf.org/2026/talks/ltx-talk/ .

So now I have a workflow for resynchronizing audio and video using Emacs. I really liked being able to navigate the video by using the transcript. It was easy to find the next speaker change to examine closely. I liked not having to do lots of fiddly little splits on my clips, particularly since I often found myself needing to move the offset a little earlier or later.

My next steps are probably:

  • modify compile-media.el to handle :av-offset for both open and closed captions
  • modify subed-mpv to handle jumping to the right place
  • modify subed-waveform to take the offset into account when displaying the waveform

Yay editing videos by using plain text!

View Org source for this post

You can e-mail me at sacha@sachachua.com.

-1:-- EmacsConf: Resynchronizing audio and video using Emacs and subed-record (Post Sacha Chua)--L0--C0--2026-11-26T20:14:01.000Z

Irreal: Prelude 2.2

Bozhidar Batsov has announced the release of Prelude 2.2. For those of you who don’t know, Prelude is a prepackaged configuration that is simpler and more flexible than configurations like Doom and Spacemacs. It’s not, I suppose, as full featured as Doom and Spacemacs but it’s less opinionated and easier to customize.

In general, I’m not a fan of prepackaged configurations but for someone just starting out, something like Prelude may make sense. In any event, Prelude has been around for 15 years and is a mature product. A product, furthermore, developed and maintained by an Emacs luminary.

One of the most obvious changes in this version is the change to the Tokyo Night theme. It replaces the traditional Zenburn theme. I hate both of them—especially Tokyo Night—but plenty of people disagree. In any event, it’s easy to change the theme so as usual with Emacs, you can have it your way.

One of the most significant changes is that Batsov has tried hard to make Prelude more familiar to “vanilla” Emacs users. One simple example of that is his use of use-package= instead of the Prelude specific prelude-require-package that previous versions used.

Another nice feature is prelude-doctor that troubleshoots your configuration and finds missing prerequisites. That makes getting Prelude setup easier.

Batsov has also sped up the startup process although, like me, he continues to insist startup time doesn’t really matter. There are several other changes so take a look at Batsov’s post for the details.

-1:-- Prelude 2.2 (Post Irreal)--L0--C0--2026-11-26T15:29:57.000Z

James Dyer: Two Kinds of Auto-Save in Emacs: Giving Up on the Perfect Save Key!

For someone who spends as much time in Emacs as I do, it is faintly ridiculous how much of my configuration time goes on the save keybinding. I have tried the stock chord, a shorter prefix, function keys, and spare keys; each one feels right for a day, and then the search starts again. So I am going to stop optimizing the key and let Emacs save the buffer for me. This post is the setup, not the verdict!

20261126120000-emacs--Two-Kinds-of-Auto-Save-in-Emacs.jpg

Here are the options for a built in automatic saving, so maybe I don't have to focus on any keybindings at all, but can I get used to it?

auto-save-mode is on by default in file-visiting buffers. It writes #file# beside the real file (TRAMP copies go to /tmp) after either 300 input events or 30 seconds of idle time. The original is untouched. It runs auto-save-hook but not before-save-hook or after-save-hook, so no formatter, VC refresh, or file watcher fires. Saving normally deletes #file#; after a crash, M-x recover-file or M-x recover-session gets it back. It is the only one of the two that protects a long continuous typing burst.

auto-save-visited-mode (Emacs 26.1+) is global and off by default. After five seconds of idle it calls save-some-buffers with no prompt and writes the real files. It runs the full save hooks, VC refreshes, backups, and watchers, and can create a file you were only testing. It also saves every modified file buffer, not just the current one, unless you narrow it with auto-save-visited-predicate (Emacs 29.1+), a buffer-local nil, or remote-file-name-inhibit-auto-save-visited for TRAMP.

(setq auto-save-visited-interval 5)
(setq remote-file-name-inhibit-auto-save-visited t)
(setq auto-save-visited-predicate
      (lambda ()
        (and (derived-mode-p 'org-mode)
             (not (file-remote-p buffer-file-name)))))
(auto-save-visited-mode 1)

That is the version I am trying: Org only, no TRAMP. It needs Emacs 29.1+ for the predicate; older versions would save every modified file buffer.

I am keeping auto-save-mode at its defaults and adding visited mode narrowly. Then I will live with it and see: does five seconds feel right?, do the hooks and VC refreshes annoy me?, does it save something I meant to discard?, and do I stop thinking about the save key (is this something I really want?)? If yes, the experiment wins. If not, I will know which side effects actually matter. I will still save deliberately before a commit or a risky change. Auto-save is a safety net, not a save point. I will don't worry report back, probably craving for a keybinding, but you never know!

-1:-- Two Kinds of Auto-Save in Emacs: Giving Up on the Perfect Save Key! (Post James Dyer)--L0--C0--2026-11-26T14:40:00.000Z

Emacs Redux: Smarter Minibuffer Prompts in Projectile

Projectile asks you a lot of questions. What do you want to search for? Replace it with what? Which command should I run? For as long as I can remember those prompts were about as dumb as a prompt can be - an empty line, maybe with the symbol at point as the default, and you had to type the rest.

That’s a bit silly when you think about it, because by the time Projectile asks you something it already knows quite a lot - the project you’re in, the function your cursor is sitting in, the Makefile at the root of the project and what’s in it. I’ve been meaning to do something about this for ages, and in the upcoming Projectile 3.5 a bunch of prompts finally start to use that knowledge. Let’s go over them!

The Search Prompt

Every command that asks what to search for (projectile-search, projectile-grep, projectile-ripgrep, the search reviewer, projectile-find-references and friends) now uses the same prompt. It’s still a plain text prompt, so whatever you type is what gets searched for, but it has learned a few new tricks:

  • RET on an empty prompt searches for the symbol at point (or the region), as before
  • M-n goes through a few more guesses - the name of the function you’re in, the name of the current file and the last thing you looked for with Isearch
  • M-p goes through your previous searches, and the search prompts now have a history of their own
  • TAB completes the word before point against the identifiers that occur in the project (super handy)

Here’s all of this in action:

The search prompt going through its suggestions with M-n and then completing a typed prefix against the project's identifiers with TAB

The TAB completion is my favorite part. I can never remember whether something was named projectile-replace-review or projectile-review-replace, and now I don’t have to! The candidates are sorted by how often they show up in the project, so the names you actually use end up at the top.

Where do the candidates come from? There’s no index and no tags file involved. Projectile just runs rg (or git grep, if you don’t have ripgrep installed) for the prefix you’ve typed and collects the words that start with it. That takes a few milliseconds on a small project and a fraction of a second on something as big as Emacs itself. Not too shabby, right? You need to type at least two characters for the completion to kick in. And if you don’t like it, you can always turn it off:

(setq projectile-search-complete-identifiers nil)

Note: You might be wondering why the prompt isn’t simply using completing-read. That would have been the easiest way to get completion, but with something like Vertico pressing RET would then select the current candidate instead of what you’ve typed, and I really don’t want a search prompt that second-guesses my input. That’s why it’s a plain read-from-minibuffer with a completion-at-point function installed in it, so TAB works the same way it does in a code buffer. In the screencast above the candidates are displayed by consult-completion-in-region. Without it you’ll get the stock *Completions* buffer.

The Replace Prompts

projectile-replace reads what to replace with the same prompt, so everything above applies there as well. When it asks what to replace it with, M-n brings up the original text. After all, most replacements are a small edit of the thing they replace (e.g. a rename), so it’s nice not to have to type it again.

With a prefix argument the search and replace commands ask which files to work on, and those prompts now complete over the file extensions that are actually present in the project. (the most common ones come first)

The Command Prompts

The compile, test and run prompts got the same treatment. M-p has always gone through the commands you’ve run before. Now M-n goes the other way - through commands you haven’t run yet, but the project suggests - the default command for the project’s type, followed by the commands of its tasks (Make targets, npm scripts, just recipes and so on). The tasks named after what you’re doing come first, so the test prompt starts with things like make test:

The test command prompt going from npm test through the project's test tasks with M-n

The same suggestions show up on M-n when you run a shell command in the project root with s-p ! or s-p &.

Filtering Search Results

Projectile’s search and replace results buffers have had filters for a while - k/d to keep or flush matches by line, and K/D to do the same by file. The file filters expect a regular expression and most of the time people type pretty much the same thing there - something like ^test/.

Now the prompt suggests it for you. The default is the directory of the match at point, and M-n goes on to that file’s extension, the file itself and then the top-level directories that have matches, busiest first. Getting rid of all the matches in the tests is D RET:

Flushing every match under test/ from the search results by accepting the default the prompt suggests

The Find File Prompt

projectile-find-file (s-p f) is probably the most used Projectile command, and quite often the file you’re after is one that the current buffer already points to - the module imported on the current line, a file mentioned in a backtrace, the test for the code you’re editing. Projectile has had dedicated commands for all of those forever (projectile-find-file-dwim, projectile-toggle-between-implementation-and-test, projectile-find-other-file), but you have to remember them and their keybindings.

Now M-n at the plain old find file prompt brings up the file named at point, followed by the test of the current file (or its implementation, if you’re in a test) and its “other” files. After that it keeps going through the rest of the project’s files, as before.

The find file prompt bringing up the file imported at point with M-n and then the test of the current file

Projectile is pretty relaxed about what counts as a file name at point - a bare name, a relative path, an import without the file extension, something like cart.js:42 in a compilation buffer - they all work.

Note: Those are suggestions on M-n and not the default value of the prompt for a reason. Completion UIs like Vertico move the default to the top of the candidate list, and that spot belongs to the file you’ve been visiting the most recently and the most often. Pressing RET right away should keep doing what it has always done.

Odds and Ends

  • A few prompts that offer a handful of options now have a sensible default. projectile-switch-to-buffer defaults to the project buffer you were in last (just like C-x b), projectile-run-task to the task you ran last, and projectile-find-file-in-subproject to the subproject of the current file.

  • C-u s-p C (projectile-find-changed-file with a prefix argument) asks for a revision to compare against. It now defaults to the project’s main branch, whatever it happens to be called, and it completes over tags as well, so “what changed since the last release” is a M-n or two away.
  • projectile-add-known-project starts at the root of the project you’re in, instead of whatever subdirectory the current buffer lives in.

M-n is Underrated

You’ve probably noticed that M-n shows up in pretty much every section of this article. Every Emacs user knows that M-p in the minibuffer goes back through the history. I’m not sure how many people know that M-n goes forward, into what the Emacs manual calls “future history” - a list of guesses that the command has made about what you might want to type. A lot of built-in commands provide those (try M-n at the query-replace or find-file prompts), but you’ll never see them unless you ask, so they are easy to miss. It’s one of those fairly obscure Emacs features that really deserve to be better known.

For package authors that’s probably the cheapest way to make a prompt smarter. The functions that read from the minibuffer (read-string, read-from-minibuffer, completing-read, read-shell-command) all accept a list as their default value, and that list is what M-n goes through:

(read-string "Search for: " nil 'my-search-history
             (delq nil
                   (list (thing-at-point 'symbol t)
                         (add-log-current-defun)
                         (and buffer-file-name
                              (file-name-base buffer-file-name)))))

It doesn’t get in anyone’s way, it works with every completion framework, and it’s only a few lines of code. I wrote a bit more about M-n here, as it certainly deserves an article of its own.

Closing Thoughts

None of those changes is a big deal on its own, but together they make Projectile feel a lot smarter to me. All of this will be a part of Projectile 3.5, and it’s already available in the master branch if you want to play with it today. If you can think of other prompts that could do a better job of guessing what you want - I’d love to hear about them!

That’s all I have for you today. Keep hacking!

-1:-- Smarter Minibuffer Prompts in Projectile (Post Emacs Redux)--L0--C0--2026-11-26T11:00:00.000Z

Dilip - Zororg: Power of Habit

Every good thing should be a habit, and every bad thing turns out to be a habit as well.

Habit is such a great quirk. I lately realised that whatever productivity hunt or anti-procrastination drive we go on, habit is the only de-facto solution there.

How I noticed it

I started realising this after reading the slides by yantar92 (Ihor Radchenko) for his EmacsConf 2026 talk, Personal task management under stress (with Org mode). He is the Org mode maintainer, and he does it in his spare time alongside a day job. I have been following him and attending the monthly Org meetup, and I am always astonished by how he even manages his life: so many emails on the Org mailing list that only he can take care of most of the time, work life, personal life, pending tasks and patches to review.

In the talk he outlines how tasks cannot be spread across different places like apps, the browser, email, your head, a notebook and maybe a phone call. They need one home. His first rule is simply "If you manage tasks in Org, do it in Org", and the second one is the one that stuck with me:

Task management won't work unless it becomes habit. Ever!

This is where Org mode and habit come into the picture.

The habit I already had

I noticed that I often open reddit (r/emacs, r/OnePiece and so on), lobste.rs, mastodon and many more tabs to catch up every day and see what is happening. This has become so habituated that every day, without any effort, my hands naturally takes me there. It is a three times a day thing: morning, lunch and late night. That can be put down to media craving, but that is another topic.

The key thing to notice is that it has no obstacle. It is never missed, there is no holding back, and even at the busiest time there is at least a glance over it. That is my habit, and it connected all my GTD thoughts, productivity, self-help and everything else. From that moment I made sure, and even configured my system, to make it a thorough habit to capture notes, schedule tasks every day and just get on with them.

What a habit is made of

Both popular books on this say roughly the same thing in simple words:

  • In The Power of Habit, Charles Duhigg describes a loop: a cue triggers a routine, and a reward tells the brain the loop is worth remembering. To change a habit, keep the cue and the reward and swap the routine.
  • In Tiny Habits, BJ Fogg says to make the new behaviour so small it needs no motivation, attach it to something you already do (an anchor: "After I …, I will …"), and celebrate it right away so it feels good.

Yantar's slides put the same idea in his own words: "Build new habits using existing habits". My tab ritual is a ready-made anchor. The cue (morning, lunch, night) and the reward (catching up) are already there, so the task habit only has to ride along with it.

Habits in Emacs and Org mode

This is what that looks like in plain Org, nothing fancy. It is the same idea as my Art of Getting things Done post: start with defaults and let the system evolve.

Capture everything into one inbox

The cheapest habit is capture. One key, one file, no thinking about where it goes. org-capture does this from anywhere in Emacs, and you sort it later.

(setq org-capture-templates
      '(("i" "Inbox" entry (file "~/inbox.org")
         "* TODO %?\n%U")))
(keymap-global-set "C-c c" #'org-capture)
(keymap-global-set "M-k c" #'org-capture)
(keymap-global-set "s-k c" #'org-capture)
;; *-k since sounds like `K'apture

(keymap-global-set "M-j" #'org-agenda)
(keymap-global-set "s-j" #'org-agenda)
;; *-j since sounds like A`J'enda

The same inbox works on the phone with Emacs on Android or an Org app (bloom), and from the browser or elfeed or email notes.

Open the agenda before the tabs

This is the anchor. Before reddit, open org-agenda (M-j). It takes a few seconds and it tells you what today actually needs. Yantar splits his day view into "Must do today", "May do today" and "Can do on a good day", which keeps a bad day from turning into a guilty one.

Open it anywhere, everywhere and anytime, make it a rhythm and make it a habit

Track the habit itself with org-habit

Org has a built-in habit tracker. A habit is a TODO with a STYLE of habit and a repeater, and the agenda draws a small consistency graph next to it, so a broken streak is visible at a glance.

(with-eval-after-load 'org
  (require 'org-habit))
* TODO Process inbox.org
  SCHEDULED: <2026-11-26 Thu .+1d>
  :PROPERTIES:
  :STYLE:    habit
  :END:
* TODO Catch up: r/emacs, lobste.rs
  SCHEDULED: <2026-11-26 Thu .+1d>
  :PROPERTIES:
  :STYLE:    habit
  :Effort:   0:20
  :END:

The second entry is my favourite idea from the talk: instead of fighting the distraction, give it its own habit with a time limit ("check social media (daily, once per day, 20 min max!)"). Clock in with C-c C-x C-i, and the Effort estimate tells you when to stop. A .+1d repeater means "one day after I last did it", and something like .+2d/4d allows a little slack for habits that are not strictly daily.

Review weekly, and plan to fall off

Daily habits keep things moving, and a weekly review keeps the list honest. Group the someday tasks under projects or topics so the review stays short, and trim what no longer matters.

Habits also break: a trip, an illness, a busy month. Yantar's fourth rule covers exactly this: "First, go back to the habit of using your task management". Do not rebuild the system, just open the agenda again tomorrow.

Closing

None of this needs a new app or a perfect setup. One plain text file (see Org mode is the best OBTF), one capture key, one agenda glance tied to a habit I already had. The tools only help once the habit is there.

Further reading

-1:-- Power of Habit (Post Dilip - Zororg)--L0--C0--2026-11-25T16:30:00.000Z

Irreal: Integrating Frames Into Your Workflow

Marcin Borkowski (mbork) has a nice post on how he uses frames in his workflow. The TL;DR is that because he often works on several projects in parallel, he has a separate frame for each project. That makes a lot of sense. You don’t get buffers confused among projects and everything for a project is “in one place”.

That brings up the problem of switching among frames. There is, of course, other-frame (Ctrl+x 5 o) but like other-window it can be a bit clunky. Mbork set out to remedy that by writing a function to switch to a given named frame. That’s sort of like ace-window for frames, except that you use the frame name instead of a label generated on the fly.

The first problem is that frame names don’t have to be unique. It wouldn’t be too hard to enforce unique names manually but mbork decided to rewrite set-frame-name to enforce a unique name when naming a frame. It’s pretty simple and should probably be the Emacs default.

Once he had a way of ensuring unique frame names, he rewrote select-frame-by-name to select a frame by name and to create a frame with that name if one doesn’t already exist. The result is a very nice workflow for handling several projects that you’re working on at the same time. Take a look at mbork’s post for the details.

-1:-- Integrating Frames Into Your Workflow (Post Irreal)--L0--C0--2026-11-25T15:28:04.000Z

Emacs Redux: Emacs Prelude 2.2

Emacs Prelude 2.2 is out! 2.0 and 2.1 shipped within a few days of each other back in March, while 2.2 took eight months and about 150 commits. It’s a big one!

A New Look

Let’s start with the most visible change. Zenburn had been Prelude’s default theme since day one, and I still love it (I’ve been maintaining its Emacs port for ages, so it’s not like we’re breaking up). Still, at some point I got tired of looking at it. These days I’m mostly using Tokyo Night and Batppuccin (my take on Catppuccin), which I wrote about a while ago, and I figured it was time to freshen up Prelude’s look as well.

Tokyo Night is the new default, with its light variant during the day and the dark one at night. Prelude follows your system’s light and dark mode where Emacs knows about it, and the clock everywhere else (see automatic light/dark theme switching for the gory details). If you’re a Zenburn fan, keeping it is a one-liner in personal/preload:

(setq prelude-theme 'zenburn)

What’s New

Broadly speaking, this release was about four things:

  • internal housekeeping and consistency (every module is now set up the same way, the way you’d set things up in your own config)
  • modernizing the internals (more of what’s built into Emacs these days, fewer third-party packages, faster startup)
  • covering more of the popular programming languages out of the box
  • better defaults for the UI and the overall experience

Here are the changes I’m most excited about.

A Welcome Screen

Prelude now shows you a welcome screen when you start Emacs without a file to open. It points newcomers at the basics (your personal config, the list of enabled modules, the manual) and gives everyone quick access to their recent files, projects and bookmarks, plus a tip of the day:

The Prelude welcome screen with links to the personal config, the modules and the manual, followed by recent files, projects and bookmarks

M-x prelude-welcome brings it back any time. If that’s not your cup of tea, (setq prelude-welcome-screen nil) turns it off.

M-x prelude-doctor

When something doesn’t work, the first question is usually “what’s missing?” M-x prelude-doctor answers that for you. It checks the programs Prelude relies on (git, ripgrep, a C compiler for tree-sitter grammars), the grammars and language servers of the modules you’ve enabled, modules that do the same job (e.g. Company and Corfu), and the obsolete Prelude hooks your config still uses:

The report of M-x prelude-doctor, listing what's fine and what's missing

It also lists the modules that were added to Prelude since you made your copy of the modules file, which is a nice way to find out about new modules. And the report is exactly what a bug report needs, so paste it there.

More Languages Out of the Box

Java, C#, Kotlin, PHP, Swift, Julia, R, Nix, SQL, Terraform and Zig got modules of their own, so Prelude now covers most of the popular languages out there. More importantly, the experience of opening a file in a new language got a lot better. Prelude offers to install a missing tree-sitter grammar the first time you need it (and falls back to the classic major mode if you say no), and it starts a language server only if there’s one installed, mentioning it once if there isn’t. No more Eglot complaining every time you open a file. Here it is for a Go project on a fresh install:

Opening a Go file with no grammar installed: Prelude asks to install the Go grammar, and the file opens in go-ts-mode right after

M-x prelude-treesit-install-grammars installs the grammars of all the modules you’ve enabled in one go, if you’d rather get that out of the way.

Just Emacs

This one isn’t exciting, but it’s the change I like the most. Prelude has always tried not to feel alien to people who know Emacs, yet over the years the modules picked up Prelude-specific ways of doing things - prelude-ruby-mode-hook, prelude-ruby-mode-defaults and the like. Now every module installs its packages with use-package and sets up its major modes with a named function on the mode’s own hooks:

(add-hook 'ruby-mode-hook #'prelude-ruby-setup -50)
(add-hook 'ruby-ts-mode-hook #'prelude-ruby-setup -50)

The depth of -50 means Prelude’s setup runs before your own functions on the same hooks, so your config always has the last word. Want something extra in Ruby buffers? Add it to ruby-mode-hook, like you would without Prelude. Want Prelude’s setup gone? remove-hook does the trick. All of Prelude’s options also work from M-x customize now, and there’s a new manual page on writing a module for those of you who’d like to contribute one.

Faster Startup

I still think that startup time doesn’t really matter, but Prelude now starts in about 0.4 seconds in a terminal with the default modules (down from 1.3). There’s a new early-init.el that tunes startup, packages are no longer initialized twice, the shell environment is read only for GUI frames and daemons, and a bunch of things (TRAMP, Eglot, calc, etc) are loaded only when you need them. You can keep your own early settings in personal/early-init.el.

Odds and Ends

A few more things worth mentioning:

  • The Vertico module got Embark (C-. and C-;), the vertico-directory extension and consult’s narrowing (e.g. < b in consult-buffer shows only buffers).
  • repeat-mode and context-menu-mode are on by default.
  • New optional modules: Corfu (as an alternative to Company), Apheleia (async format on save), eglot-booster, Forge, MisTTY and AI (a thin wrapper around gptel).
  • You can pick jinx as the spell checker and ws-butler for cleaning up whitespace, if you prefer them to the defaults.
  • Prelude installs fewer packages - browse-kill-ring, discover-my-major, smartrep and gist are gone, as are which-key and editorconfig on Emacs 30+, where they’re built in.
  • The manual has a new page on how Prelude differs from stock Emacs, which is handy when you’re wondering why a key doesn’t do what you expected.
  • Lots and lots of bug fixes (the installer in particular got some much needed love).

The changelog has the full list.

Upgrading

Most setups should keep working as they are, but a few things changed: the theme, a handful of key bindings (e.g. the Go test commands, some Ivy and Org keys, and M-y is Emacs’s own yank-pop again), prelude-require-package is deprecated in favour of use-package, and the prelude-*-mode-hooks are obsolete (they still run, and prelude-doctor will tell you which ones you’re using). The upgrade notes cover all of that, so give them a quick read before running M-x prelude-update.

15 Years Later

Prelude turned 15 this year, and it’s in better shape today than it has been in a very long time. I’ve got a few more ideas for 2.3, and I hope it won’t take eight months this time.1 As always, thanks to everyone who reported problems, sent patches and kept using Prelude over the years! You rock!

That’s all I have for you today. Keep hacking!

  1. Famous last words. ↩

-1:-- Emacs Prelude 2.2 (Post Emacs Redux)--L0--C0--2026-11-25T12:46:00.000Z

Sacha Chua: Emacs: Join lines even in comments

I like to dictate one sentence per line. My voice activity detection sometimes adds extra breaks in between lines if I pause too much in the middle of a sentence. sacha-whisper-insert takes care of inserting the comment markers using comment-indent-new-line. After I edit my dictation, I usually want to make the comments more compact. The following function overrides delete-indentation so that join-line and fill-paragraph all manage the common prefix properly, which means sacha-reformat-paragraph-or-region can cycle through wrapped, one line per sentence, or everything on one line.

From Smartly join comments with join-line · Tony Zorman

;;;###autoload
(defun sacha-delete-indentation (&optional arg beg end)
  "Join this line to previous and fix up whitespace at join.
If there is a fill prefix, delete it from the beginning of this
line.
With prefix ARG, join the current line to the following line.
When BEG and END are non-nil, join all lines in the region they
define.  Interactively, BEG and END are, respectively, the start
and end of the region if it is active, else nil.  (The region is
ignored if prefix ARG is given.)

When joining lines, smartly delete comment beginnings, such that one
does not have to do this by oneself.

From https://tony-zorman.com/posts/join-lines-comments.html"
  (interactive
   (progn (barf-if-buffer-read-only)
          (cons current-prefix-arg
                (and (use-region-p)
                     (list (region-beginning) (region-end))))))
  ;; Consistently deactivate mark even when no text is changed.
  (setq deactivate-mark t)
  (if (and beg (not arg))
      ;; Region is active.  Go to END, but only if region spans
      ;; multiple lines.
      (and (goto-char beg)
           (> end (line-end-position))
           (goto-char end))
    ;; Region is inactive.  Set a loop sentinel
    ;; (subtracting 1 in order to compare less than BOB).
    (setq beg (1- (line-beginning-position (and arg 2))))
    (when arg (forward-line)))
  (let* ((comment (string-trim-right comment-start))
         (prefix-start (and (> (length comment-start) 0)
                            (regexp-quote comment)))
         ;; A continuation of a comment. This is important for
         ;; languages such as Haskell, where -- starts a comment
         ;; and --- still is one.
         (prefix-cont (and prefix-start
                           (regexp-quote (substring comment 0 1))))
         (prev-comment?                 ; Comment on previous line?
          (save-excursion
            (forward-line -1)
            (back-to-indentation)
            (search-forward prefix-start (pos-eol) 'no-error))))
    (while (and (> (line-beginning-position) beg)
                (forward-line 0)
                (= (preceding-char) ?\n))
      (delete-char -1)
      (unless (save-excursion (forward-line -1) (eolp))
        (delete-horizontal-space)
        ;; Delete the start of a comment once.
        (when (and prev-comment? prefix-start (looking-at prefix-start))
          (replace-match "" t t)
          ;; Look for continuations.
          (while (and prefix-cont (looking-at prefix-cont))
            (replace-match "" t t)))
        (fixup-whitespace)))))

Let's use advice to override it so that it lasts even if I reevaluate the original.

(advice-add 'delete-indentation :override #'sacha-delete-indentation)
This is part of my EmacsConfiguration.
View Org source for this post

You can e-mail me at sacha@sachachua.com.

-1:-- Emacs: Join lines even in comments (Post Sacha Chua)--L0--C0--2026-11-25T12:44:56.000Z

Lars Ingebrigtsen: A grid display for Emacs image triage

A couple days ago I started typing a new Emacs mode for really fast image viewing and triage. (Click the link to read the rationale behind all this.) But after working with it for some hours, I realised that the layout just wasn’t ideal:

If we’re doing a line based layout, you have to have really small thumbnails — otherwise you get so little information density in a screenful.

And then I realised that the file names have very little interest. The size is only interesting if it’s zero — that’s a broken image, but a missing thumbnail would also tell me that. The date is the most interesting thing, but since I’m sorting by date, it’s not that vital anyway.

So:

A grid! Well, duh.

The package can do both layouts, but defaults to using a grid now.

The image details are still available, both as tooltips, via a command, and shown automatically when walking through the images with TAB:

I think that’s kinda usable? Gives you an overview while tabbing through images. Fast. Vroom vroom.

You can find the code on Microsoft Github.

-1:-- A grid display for Emacs image triage (Post Lars Ingebrigtsen)--L0--C0--2026-11-25T12:04:09.000Z

Amit Patel: Find files anywhere, updated for 2026

Back in 2017 I posted my emacs set up for finding files globally. I tend to work with lots of small projects instead of mainly with one at a time. When I use find-file I have to switch folders quite often. If I've already opened the file I can use switch-to-buffer, but then I have to remember whether I have the file open. If I've opened it recently I can use recentf. If I'm opening something in the same project I can use project-find-file. But a lot of times it's easier to use something based on locate, like icicle-locate or consult-locate. But locate is too broad. I want to find one of my files, not one of the files on my disk. I essentially want to treat my home folder as one big project.

In 2014 I was using helm; in 2016 I had switched to ivy; now I use the vertico+marginalia stack. I'm posting the updated code here:

Find files globally

1. Make a list of files

The locate command on Linux and the mdfind -name command on Mac produce a list of filenames on the disk that match some pattern. From that starting point, I filter the list to files that I might want to actually open in Emacs.

  1. Text files. On Mac, mdfind "kMDItemContentTypeTree = 'public.text' restricts the output to text files. On Linux, I can check the extension.
  2. Home folder. On Mac, mdfind -onlyin $HOME restricts the list to only files under my home folder. On Linux, I can check the filename prefix.
  3. Only my files. I want to exclude files from third-party libraries (e.g. node_modules in JavaScript).

From an hourly cronjob, I make a global list of filenames that I am likely to work with. This is around 17000 on my system. I sort them so that the newer ones are closer to the top:

(mdfind -onlyin $HOME "kMDItemContentTypeTree = 'public.text' && kMDItemFSContentChangeDate > \$time.today(-1)";\
 mdfind -onlyin $HOME "kMDItemContentTypeTree = 'public.text' && kMDItemFSContentChangeDate > \$time.today(-4) && kMDItemFSContentChangeDate <= \$time.today(-1)";\
 mdfind -onlyin $HOME "kMDItemContentTypeTree = 'public.text' && kMDItemFSContentChangeDate > \$time.today(-14) && kMDItemFSContentChangeDate <= \$time.today(-4)";\
 mdfind -onlyin $HOME "kMDItemContentTypeTree = 'public.text' && kMDItemFSContentChangeDate > \$time.today(-45) && kMDItemFSContentChangeDate <= \$time.today(-14)";\
 mdfind -onlyin $HOME "kMDItemContentTypeTree = 'public.text' && kMDItemFSContentChangeDate <= \$time.today(-45)"\
) >~/.global-file-list.txt

From a minutely cronjob, I get everything that I've touched in the last few hours. On my Mac with an SSD, it takes 0.1 seconds to run this:

mdfind -onlyin $HOME "kMDItemContentTypeTree = 'public.text' && kMDItemFSContentChangeDate > \$time.now(-7200)"\
> ~/.recent-file-list.txt

To make the recent-file-list query fast on Linux, fd --changed-within 2hours is probably the best bet. Linux doesn't have a real time filename index like Mac does, so the fd command on my system takes over 10X as long as the mdfind.

2. Static file list

I have these helper functions for reading a text file into a list of strings:

(defun read-file-into-string (filename)
  "Read file contents into a string"
  (with-temp-buffer
    (insert-file-contents filename)
    (buffer-substring-no-properties (point-min) (point-max))))

(defun read-file-into-lines (filename)
  "Read file, split into lines, return a list"
  (split-string (read-file-into-string filename) "\n" t))

Periodically I read .global-file-list.txt into an Emacs list, removing files that are generated from other files. For example if I have apple.md in the list then I'll remove apple.html from the list.

(defvar amitp/global-file-list '() "List of most files I work with.")
(defun amitp/update-global-file-list ()
  "Periodically update my global file list."
  (condition-case nil
      (setq amitp/global-file-list
         (amitp/remove-generated-files (mapcar 'abbreviate-file-name (read-file-into-lines "~/.global-file-list.txt"))))
    (file-error (message "amitp/update-global-file-list: could not read global file list") nil)))

(amitp/update-global-file-list)
(defvar amitp/update-global-file-list-timer
  (run-with-idle-timer 1200 t #'amitp/update-global-file-list))

(defun amitp/remove-generated-files (filenames)
  "In a list of filenames, remove the ones that are generated from
another file in the list"
  (let ((filename-set (map-into '() 'hash-table)))
    (--each filenames (map-put! filename-set it t))
    (--each filenames (map-delete filename-set (-amitp/replace-ext ".md" ".html" it)))
    (--each filenames (map-delete filename-set (-amitp/replace-ext ".org" ".html" it)))
    (map-keys filename-set)))

3. Dynamic file list

The static file list is useful but I want to merge other data sources into it:

  1. Files from recentf
  2. Recently modified files (.recent-file-list.txt from above)
  3. Currently open buffers
  4. Files in the current project

I merge these and delete duplicates:

(defun amitp/all-files-list ()
  "Files to list in amitp/all-files"
  ;; Use destructive delete-dups, much faster than cl-remove-duplicates
  (delete-dups
   (append
    (mapcar 'amitp/abbreviate-file-name
            (append
             (-take 1 recentf-list)
             (amitp/buffer-file-names)
             (amitp/remove-generated-files (directory-files default-directory t))
             (amitp/remove-generated-files (read-file-into-lines "~/.recent-file-list.txt"))
             (amitp/remove-generated-files (amitp/all-files-in-current-project (amitp/project-root-for-directory)))
             (amitp/remove-generated-files (-drop 1 recentf-list))))
    amitp/global-file-list
    nil ;;; need this because append reuses the last element, and delete-dups modifies the list
    )))

4. Searching with Vertico

Vertico works with the built-in completing-read:

(defun amitp/all-files ()
  "Global filename match, over all files I typically open"
  (interactive)
  (find-file
    (completing-read "All files: "
                      (amitp/all-files-list)
                      nil
                      t
                      nil
                      'file-name-history)))

5. Annotating with Marginalia

Marginalia annotates the completion buffer when it knows they're filenames. I can tell it that my command is outputting filenames:

(use-package marginalia :defer t
  :config
  (add-to-list 'marginalia-command-categories
               (cons #'amitp/all-files 'file)))

6. Customization

One thing I love about Emacs is that I can customize it for my needs. I don't think this code will be directly usable but the ingredients may be useful to remix for your own needs.

-1:-- Find files anywhere, updated for 2026 (Post Amit Patel)--L0--C0--2026-11-25T00:03:56.785Z

Raymond Zeitler: Follow up to windmove

My previous post focused on my latest discovery of an Emacs feature -- window management with windmove.1 I described the way the windmove functions facilitate moving point among windows, as well as deleting windows. But I didn't mention that you can specify the window that will display a buffer.

In the simplest scenario, I might be writing about an Emacs feature and have a single window open. I'd like to visit my init file in another window. Typically I'd press C-x 4 f, which runs the command find-file-other-window, and then enter ~/.emacs at the prompt. Emacs creates a new window and fills the buffer with the .emacs file.

Where does this window appear? It depends on the size of the frame. Generally if the frame is taller than it is wide, the frame will be split horizontally, and the visited file will be placed in the lower window. Otherwise, the split is vertical and the visited file will be placed in the right-hand window. But if I wanted the opposite behavior -- to split a narrow frame vertically, for example -- I'd first have to run split-window-right (C-x 3) to create a new window on the right, run other-window (C-x o) to activate (or move point to) the new window, and then run find-file (C-x C-f). A single windmove-display-right followed by find-file will put the init file in a new window on the right regardless of the frame's aspect ratio.2 This is demonstrated in the animated GIF, below.

Using windmove-display-right to split a narrow frame vertically

One drawback is that the windmove-display functions will place "the buffer displayed by the ... command [that you] invoked immediately after" windmove-display. Sometimes that buffer is an intermediary buffer that's used to clarify the new command's behavior. Thus, org-agenda, which opens a menu, will put *Org Agenda* in the default location. But you can outsmart Emacs and run org-agenda-list (usually bound to C-c a a) immediately after window-display-down to get your agenda to show in the window below the active window on a wide frame.3 There doesn't seem to be a way to change this behavior -- you can't, for example, use a M-1 prefix argument to tell it to skip one buffer. The prefix arguments are designated for other changes in behavior.

The windmove functions let you "point" in the direction of the target window, so I find them intuitive. They're packaged with Emacs, and they make managing Emacs windows easy. So now this is the most recent feature that I've adopted. But November isn't over yet.


1 Emacs Windows Management With windmove

2 Unless the current window is too narrow for splitting.

3 Having just done that, I find the result a bit unsatisfactory because the frame isn't split evenly -- *Org Agenda* takes up 75% of the frame. But maybe that's because I have about three dozen items scheduled for today. I suppose a well-organized user would have better results.

-1:-- Follow up to windmove (Post Raymond Zeitler)--L0--C0--2026-11-24T19:36:58.573Z

Irreal: Magit Tour

Pablo Murad just showed up in my feed courtesy of Planet Emacslife. There were three posts, two of which Sacha has already covered in this week’s Emacs News. The third is an in-depth tour of Magit.

It’s a nice post. Even though I use Magit several times a day, I still learned a couple of new things. Murad discusses:

  1. Installation
  2. The Status buffer
  3. The ? key to get help
  4. Staging hunks instead of the whole file
  5. The various type of commits
  6. The log functions
  7. Blame
  8. Stashing
  9. Interactive rebasing
  10. Resolving merge conflicts
  11. The Forge interface

At the end, he has a very nice cheat sheet that breaks out the commands by subsystem.

This is a really nice post that should be useful even if you are already familiar with Magit and Git. Give it look.

-1:-- Magit Tour (Post Irreal)--L0--C0--2026-11-24T14:47:29.000Z

Org Mode requests: [FR] images yanked with 'yank-media' does not show up after an invocation of 'org-link-preview' [9.8.7 (release_9.8.7 @ /usr/share/emacs/31.1/lisp/org/)]

[request] flags:--- replies:2
-1:-- [FR] images yanked with 'yank-media' does not show up after an invocation of 'org-link-preview' [9.8.7 (release_9.8.7 @ /usr/share/emacs/31.1/lisp/org/)] (Post Org Mode requests)--L0--C0--2026-11-23T23:48:37.000Z

Marcin Borkowski: Improving support for named frames in Emacs

At my day job, I use multiple Emacs frames a lot. I often work on two or sometimes even more projects in parallel, and the way I don’t get lost is that I keep every project in a separate frame. Moving between them with other-frame (C-x 5 0, which I also bound to M-) is sometimes slightly clunky – especially that from time to time I’d like to be able to see the list of all my frames and possibly select one of them. (Before you tell me that my window manager could do that, let me explain that I use terminal Emacs inside a virtual machine, so I only see one frame at a time.)
-1:-- Improving support for named frames in Emacs (Post Marcin Borkowski)--L0--C0--2026-11-23T20:44:48.000Z

Sacha Chua: Fixing commonly-misrecognized words in dictation, voice commands, and regular text

I edit a lot of transcripts, and I've also been dictating to my computer more and more for both prose and voice commands. Speech recognition is pretty accurate, but there are some terms that it tends to get wrong. There are also some terms that I find hard to say, like sometimes my brain will just hiccup and I'll end up saying "start screaming" instead of "start streaming". I want to make it really easy to correct a misrecognized word throughout my current buffer and save it for future edits.

One of the advantages of doing this kind of replacement within Emacs instead of a separate dictation tool is that I can use it for both editing text (like transcripts of other people's presentations) as well as pre-process the speech recognition results when I dictate or use voice commands to control Emacs. I can even use it to start gradually getting my transcripts to follow Emacs keybinding conventions, like C-c instead of "control c", and for finicky capitalization like LaTeX.

1. Description and demo

You can watch a description and a demo here. The dictionary part starts at about 00:37:01.403.

Full video and transcript

Or as a YouTube short: Emacs Speech-to-Text That Learns From Its Mistakes - Sacha Chua - YouTube.

2. Saving the dictionary

First, we define a variable that we're going to save the changes to.

;; Use the saved version of this instead of forcing the reevaluation
;;;###autoload
(defcustom sacha-subed-common-edits
  '("I"
    "I've"
    "I'm"
    "Mendeley"
    "JavaScript"
    "RSS"
    ("stop section" "subsection")
    ("EmacsConf" "EmacsCon" "EmacsConf" "imaxconf")
    ("going to" "gonna")
    ("want to" "wanna")
    ("transient" "transit")
    ("C-c" "control c" "Ctrl+C")
    ("C-x" "control x" "Ctrl+X")
    ("C-f" "control f")
    ("" "uh" "um")
    ("Magit" "maggot")
    ("Emacs" "e-max" "emex" "emax" "bmx" "imax")
    ("Emacs News" "emacs news")
    ("Emacs Lisp" "emacs list")
    ("ivy" "iv")
    ("UI" "ui")
    ("TECO" "tico")
    ("org-roam" "orgrim" "orgrom" "Org Rome")
    ("non-nil" "non-nail")
    ("commits" "comets")
    "SQL"
    "arXiv"
    "Montessori"
    "SVG"
    "YouTube" "GitHub" "GitLab" "OmegaT" "Linux" "SourceForge"
    "LaTeX"
    "Lisp"
    "Org"
    "IRC"
    "Reddit"
    "PowerPoint"
    "SQLite"
    "SQL"
    "I'll"
    ("<f9>" "F-9" "f9")
    "I'd"
    "PDFs"
    "PDF"
    "ASCII"
    ("Spacemacs" "spacemax")
    "Elisp"
    "Reddit"
    "TextMate"
    "macOS"
    "API"
    "IntelliSense"
    ("EXWM" "axwm")
    ("Emacs's" "emax's")
    ("BIDI" "bd")
    ("Perso-Arabic" "personal arabic")
    "Persian"
    "URL"
    "HTML"
    ("vdo.ninja" "Video Ninja"))
  "Commonly-misrecognized words or words that need special capitalization."
  :group 'sachac
  :type '(repeat (choice string
                         (repeat string))))

3. Making changes with substitute.el

I like using Prot's substitute.el. I bind substitute-target-in-buffer to C-; . I can either replace the current word or select a couple of words if I think I need to be more specific. I ignore "SPEAKER_…" because then I can use the same shortcut to easily change speaker identification in transcripts.

(defvar sacha-substitute-save-changes "SPEAKER_"
  "Non-nil means save changes to `sacha-subed-common-edits'.
If this is a string, it is treated as a regular expression, and only
strings that do NOT match this regular expression will get saved.
If this is a function, call it with the target string. It should return
non-nil if the substitution should be saved.")

(defun sacha-substitute-save-common-edits (target sub count scope)
  "Keep track of changes so I can add them to `sacha-subed-common-edits'."
  (when (cond
         ((functionp sacha-substitute-save-changes)
          (funcall sacha-substitute-save-changes target))
         ((stringp sacha-substitute-save-changes)
          (not (string-match sacha-substitute-save-changes target)))
         (t
          sacha-substitute-save-changes))
    (customize-save-variable
     'sacha-subed-common-edits
     (cons (list sub target)
           sacha-subed-common-edits))))
(use-package substitute
:bind ("C-;" . substitute-target-in-buffer)
      :config
      (setq substitute-fixed-letter-case t)
      (add-hook 'substitute-post-replace-functions #'substitute-report-operation)
      (add-hook 'substitute-post-replace-functions #'sacha-substitute-save-common-edits))

customize-save-variable is in charge of saving the changes after I replace something with susbtitute.el. If I want to remove or edit entries, I can use M-x customize-variable to change sacha-subed-common-edits.

4. Correcting the errors

Then I have some functions that make the changes automatically or interactively.

;;;###autoload
(defun sacha-subed-fix-common-errors ()
  (interactive )
  (let (done entry correction)
    (while (and
            (not done)
            (setq entry (sacha-subed-find-next-fix-point)))
      (setq correction (if (listp entry) (car entry) entry))
      (if (let ((case-fold-search nil))
            (looking-at (regexp-quote correction)))
          (forward-word 1)
        (if (called-interactively-p 'any)
            (let* ((c (read-char (format "%s (yn.): " correction))))
              (cond
               ((= c ?y) (replace-match correction t t))
               ((= c ?n) (goto-char (match-end 0)))
               ((= c ?j) (subed-mpv-jump-to-current-subtitle))
               ((= c ?.) (setq done t))))
          (replace-match correction t t))))))

;;;###autoload
(defun sacha-subed-fix-common-errors-from-start ()
  "Change common errors in this buffer."
  (interactive)
  (goto-char (point-min))
  (sacha-subed-fix-common-errors))

;;;###autoload
(defun sacha-subed-fix-common-errors-in-text (text)
  "Change common errors in TEXT."
  (interactive)
  (with-temp-buffer
    (insert text)
    (goto-char (point-min))
    (sacha-subed-fix-common-errors)
    (buffer-string)))

;;;###autoload
(defun sacha-subed-find-next-fix-point ()
  (when (re-search-forward
         (format "\\_<\\(%s\\)\\_>"
                 (downcase
                  (string-join
                   (seq-mapcat
                    (lambda (o)
                      (if (listp o)
                          (if (string= (car o) "") (cdr o) o)
                        (list o)))
                    sacha-subed-common-edits)
                   "\\|")))
         nil t)
    (goto-char (match-beginning 0))
    (seq-find
     (lambda (o)
       (if (listp o)
           (seq-find (lambda (s)
                       (save-match-data
                         (string-match
                          (format "\\_<%s\\>" (downcase s))
                          (downcase (match-string 0))))) o)
         (string= (downcase o) (downcase (match-string 0)))))
     sacha-subed-common-edits)))

;;;###autoload
(defun sacha-subed-fix-common-error ()
  (interactive)
  (let ((entry (sacha-subed-find-next-fix-point)))
    (replace-match (if (listp entry) (car entry) entry) t t)))

Then I can call sacha-subedf-fix-common-errors-in-text from my whisper-insert-text-at-point functions, and sacha-subed-fix-common-errors-from-start from sacha-stream-prepare-transcript-for-editing.

5. Other ways to define the correction

Here's another function to define a correction if you don't want to use substitute.el.

;;;###autoload
(defun sacha-subed-add-common-edit (beg end replacement)
  "Add this word to the misrecognized words."
  (interactive
   (let ((beg (if (region-active-p) (min (point) (mark))
                (skip-syntax-backward "w")
                (point)))
         (end (if (region-active-p) (max (point) (mark))
                (save-excursion (forward-word 1) (point)))))
     (list beg end
           (completing-read
            (format "Replacement (%s): " (buffer-substring beg end))
            (mapcar (lambda (o) (if (stringp o) o (car o))) sacha-subed-common-edits)))))
  (customize-set-variable
   'sacha-subed-common-edits
   (cond
    ((member replacement sacha-subed-common-edits)
     (cons (list replacement (buffer-substring-no-properties beg end))
           (delete replacement sacha-subed-common-edits)))
    ((assoc replacement sacha-subed-common-edits)
     (setcdr (assoc replacement sacha-subed-common-edits)
             (append (list replacement) (cdr (assoc replacement sacha-subed-common-edits))))
     sacha-subed-common-edits)
    (t
     (push (list replacement (buffer-substring-no-properties beg end))
           sacha-subed-common-edits))))
  (delete-region beg end)
  (insert replacement))

At some point, I really should abstract this out to its own package, because it's just so useful. Other people have actually managed to get it to work, which is always a nice milestone. Anyway, here it is, in case it's helpful for you too!

This is part of my EmacsConfiguration.
View Org source for this post

You can e-mail me at sacha@sachachua.com.

-1:-- Fixing commonly-misrecognized words in dictation, voice commands, and regular text (Post Sacha Chua)--L0--C0--2026-11-23T19:31:49.000Z

Lars Ingebrigtsen: A new, faster Emacs package to do image triage

One thing that’s annoyed me for yonks is how slow Emacs is when displaying images. Emacs has never been fast on this point, exactly, and has gotten better over the years — but at the same time, image sizes have exploded. In the bad old days, images were just a couple of megabytes, but with modern cameras, images can be 25MB, easily.

So now it’s really painful to page through directories of images:

It takes half a second for each image, and if you don’t find that annoying, you’re way more patient than I am.

Those are from my camera, and I’ve adjusted the image size down to “just” 10MB — because it’s just too painful to deal with 25MB images all around. For instance, when posting a 25MB file to WordPress, it uses about half a minute to scale it down to various sizes. Not fun.

The Emacs slowness in this area has, in the past, led me to use other non-Emacs ways of looking through images. So horrible! When you find images you want to copy an image somewhere else, for instance, you have to go through all these non-ergonomic contortions… It’s a complete nightmare! Have you people seen non-Emacs interfaces!? They’re awful!

Now, Emacs has things like image-dired that will go through a directory and create thumbnails, which makes things more liveable. But it does that by creating thumbnails up-front, which I just don’t like. And it doesn’t really help with the display of the images themselves when you want to look at them.

Now, what’s the baseline here?

larsi@corrigan:/home/sony/ftp$ time djpeg DSC09468.JPG >/dev/null

real	0m0.128s

Well, just decoding one of these 10MB images takes more than a tenth of a second. Emacs also resizes images before display, so this is perhaps a more fair comparison:

larsi@corrigan:/home/sony/ftp$ time convert -resize 1500x DSC09468.JPG jpg:- >/dev/null

real	0m0.264s

So — large images just take a lot of time anyway, and there’s not much we can do about that.

But what if we cheated?

Whoa. No, those li’l images haven’t been resized and cached (like image-dired does) — they’re extracted directly from the exif metadata: All modern cameras store a thumbnail inside the images. So I’m just extracting them and displaying them on-the-fly. As you can see from the screencast there, it’s so fast that even if I jump randomly around in the buffer, it keeps up.

(It inserts thumbnails for the lines displayed in the window, and then the next and a half window’s worth, thinking that you’re presumably going to scroll down. And then whenever you move around, it inserts the thumbnails for the page you’re currently viewing. So we’re not wasting preciouses electricity on things that are never going to be shown — my test directory here has 8K images.)

If the images don’t contain thumbnails, the new mode does things the hard way — by calling convert to scale the images down. This is, of course, a lot slower, but things run asynchronously, anyway, so the UX is UXing, as they say.

(What’s that? They don’t? They don’t say that? They should!)

But what about looking at the pictures in full, then? That’s as slow as before, surely?

Let’s have a look at what’s in the JPEG:

larsi@corrigan:/home/sony/ftp$ exiftool -json -a -G1 -s -preview:all DSC09471.JPG
[{
  "SourceFile": "DSC09471.JPG",
  "IFD1:ThumbnailImage": "(Binary data 7453 bytes, use -b option to extract)",
  "MPImage2:PreviewImage": "(Binary data 287215 bytes, use -b option to extract)"
}]

There’s a 1616×1080 “preview” image embedded in there, too!

(Side note — amusing JSON format here, with the size of the image (in bytes) embedded in a string. Which also includes helpful command line options. Such JSON.)

So:

Emacs displays these previews so fast without doing any magic that it refreshes faster than I can hit n.

If there are no thumbnails, the mode precomputes the next dozen images, so you only see the slowness if you never take any pauses. Lay off that n finger, man! Not cool!

(Or rather, it will do that tomorrow — my fingers got too tired from typing all day long…)

In addition, the new mode also allows looking at entire hierarchies with M-x image-triage-tree, which is useful when doing image archaeology.

The useful Dired commands are present in this mode, too — you can mark images (both from the listing view and the per-image buffer), and then copy them over somewhere. (This was the main reason I wrote this — I had a bunch of old images I wanted to go over and copy over the useful ones (therefore the name image-triage).)

(defvar-keymap image-triage-list-mode-map
  "RET" #'image-triage-display-image
  "SPC" #'image-triage-list-toggle-mark
  "m" #'image-triage-list-mark
  "U" #'image-triage-list-unmark-all
  "u" #'image-triage-list-unmark
  "g" #'image-triage-list-reload
  "v" #'image-triage-list-view-in-dired
  "C" #'image-triage-list-copy
  "D" #'image-triage-list-delete
  "s" #'image-triage-list-toggle-sort)

It’s not feature complete yet, I guess… but seems to work fine for my use case, at least.

And I wrote the mode by hand! So there! Except that I got Claude to write a helper command (I’ve written exif parsers by hand twice already, so I didn’t want to do it again) in C to dump thumbnails, because exiftool is just too slow:

So the new C programme uses half a millisecond to extract the thumbnail. exiftool uses… er… let’s see… carry the one… 0.072s to do it. Is that right? Yeah, I guess — exiftool is a Perl script, after all. So the C program is… 144x faster. 🫠

Now you’re asking yourself — hasn’t somebody already written a thumbnail extractor that you can just apt install instead? Yes, exiv2 exists and is fast… but can only extract thumbnails, and not previews. And! It can’t extract to stdout — it insists on writing to the same directory as the image is in, so it’s a pain to deal with. So whatchagonnado.

(Typical Linux situation — one solution that’s general but slow, and one solution that’s fast but outdated and awkward to use.)

But I understand many people are opposed to using LLMs, so you don’t need to compile the extra binary. In that case, things look like this:

Not as impressive, but I guess it’s usable — it’s asynchronous, after all.

So there you go.

I’ve put the code on Microsoft Github, so you can give it a whirl if you want.

-1:-- A new, faster Emacs package to do image triage (Post Lars Ingebrigtsen)--L0--C0--2026-11-23T19:13:31.000Z

Sacha Chua: 2026-11-23 Emacs news

: Fixed link to nfdn: Opening Texinfo Web Pages in Emacs Info

I really liked two things in this week's newsletter. First, Ihor Radchenko has posted his talk on task management, Which he prepared for EmacsConf 2026, coming up this Dec 12 and 13. He's okay with posting it early so that people can start thinking about the ideas in advance and make the most of the live Q&A during the conference itself, so check out how he deals with tens of thousands of items. Similarly, the panel that he organized on Emacs community is now public, so you can take a look at it too. That one is a long one, and I'd love to hear your thoughts.

The second thing that I thought was really fun was Ethermacs, which uses web sockets for synchronous editing, so now people who aren't using Emacs and people who are can still edit the same Etherpad together. (And using Emacs means no JavaScript needed, which is good news for our non-JS community members!) And after a little bit of tweaking, I've been able to use it to edit the etherpads that we have for EmacsConf. Whee!

(You might be able to tell that I have EmacsConf on the brain. =) )

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, Mastodon #emacs, Bluesky #emacs, Hacker News, lobste.rs, programming.dev, lemmy.world, lemmy.ml, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar, and emacs-devel. Thanks to Andrés Ramírez for emacs-devel links. Do you have an Emacs-related link or announcement? Please e-mail me at sacha@sachachua.com. Thank you!

View Org source for this post

You can e-mail me at sacha@sachachua.com.

-1:-- 2026-11-23 Emacs news (Post Sacha Chua)--L0--C0--2026-11-23T14:24:11.000Z

Irreal: Moving Among Windows

Over at Ray on Emacs, Ray Zeitler writes about moving among windows
and discovering windmove
. It was a nostalgic moment for me because
I’ve been in the same place. The problem with other-window
(Ctrl+x o) is that you may have to invoke it several times and, as Zeitler says, you can easily overshoot your target.

The next step in my journey—and apparently in Zeitler’s—was the discovery of Windmove. It allows you to use the arrow keys with (by default) the Shift key to move through the windows in a two-dimensional way. It’s a big improvement over the standard other-window command but it does interfere with certain Org bindings.

The next step in my journey was the discovery of abo-abo’s excellent ace-window package. It allows you to easily move among windows as well as perform many other actions such as splitting, deleting, moving, and copying windows. You can see a complete list at the link. To be honest, I use it almost exclusively for changing focus to another window. It works just like abo-abo’s other ace functions. You invoke it (I use Ctrl+x o to leverage my muscle memory) and the windows are labeled. Then you merely choose the label of the window to want to move to. As as added feature, if there are only two windows, it simply moves to the other window without the need for further input. You can also precede the command with the universal argument and it will swap the windows instead of simply moving to the target window.

All-in-all, ace-window is the best package I’ve found for window control. Perhaps it will be the next step on Zeitler’s journey too.

-1:-- Moving Among Windows (Post Irreal)--L0--C0--2026-11-22T15:38:31.000Z

Raymond Zeitler: Emacs Windows Management With windmove

Two weeks ago I wrote about how I discovered and began using the bookmark feature.0

Recently I came across the windmove functions1. This discovery caused me to lose interest in bookmarks; now bookmarks are a mere curiosity.

The windmove functions allow you to "operate" on a window; the target window is given as a direction relative to point. Operations include:

  • selection, like next-window, but direction overrides window order
  • deletion, like delete-window, but direction indicates the window to delete
  • buffer display (not yet in use by the author)

Arrow keys specify the directions. Of course, arrow keys already move point one character to the left (or right, up, or down). So the windmove functions are bound by default to S-<left>, S-<right>, S-<up>, S-<down> for window selection. For example, you can activate the window on the left with windmove-left or S-<left>.

Org users already press S-<left> (and S-<right>) on a heading to change TODO status. As well, we press S-<up> (and S-<down>) to increase (decrease) a heading's priority. Luckily, it's easy to specify a different modifier key. I configured my system to make windmove-dir respond to M-s-<dir>2 with the following statement:

(windmove-default-keybindings '(meta super))

Similarly, you can delete windows in a given direction. For example, to delete a window on the left, run windmove-delete-left. I've defined C-M-s-<dir>3 for the windmove-delete-dir functions by adding this to my init file:

(windmove-delete-default-keybindings '(control meta super))

I used to struggle with other-window (C-x o), sometimes "overshooting" the desired window, or I'd resort to using the mouse to click in it. Now with this intuitive method of selecting windows, I can keep my hands on the keyboard and spend less time figuring out how to get around.

Try it out!


0 See: https://ray-on-emacs.blogspot.com/2026/11/emacs-carnival-november-2026.html

1 Emacs windmove help page

2 On Windows, I hold down the Alt and Win keys while pressing an arrow key.

3 As above, but additionally with the Control key. It's surprisingly easy, in fact.

-1:-- Emacs Windows Management With windmove (Post Raymond Zeitler)--L0--C0--2026-11-21T16:12:27.484Z

Irreal: Manual Dired Search

JTR over at The Art Of Not Asking Why reminds us of a very useful technique for iteratively searching through a series of files for those that contain a given set of terms. The process if simple but very flexible:

  1. Open a Dired buffer with the files you want to search.
  2. Use %g to do a regular expression search through the files for one of the terms. The files containing the term will be marked.
  3. Use t to toggle the marks, resulting in all the files that don’t contain the term being marked.
  4. Use k to temporarily hide the marked files, leaving only those that contain the term.
  5. Go to step 2 using the next term.

When you’ve searched for all the terms, you’re left with a list of files that each contain all the target terms. JTR recommends that you mark the remaining files and do a final regular expression search with the A command to search through the contents of the marked files and show the results in another buffer.

The nice thing about this method is that it’s interactive: you progressively narrow down the list of target files by eliminating files that don’t contain the terms your looking for. You can, as JTR says, even manually eliminate files that you don’t want to consider as you go along. It’s a good technique and worth remembering.

-1:-- Manual Dired Search (Post Irreal)--L0--C0--2026-11-21T16:12:19.000Z

TAONAW - Emacs and Org Mode: Dired: Classic Technique for Manual-Visual Search

Here’s a Dired thing that most Emacs veterans know well, but only clicked for me yesterday: searching for specific words and terms in different files while narrowing the results down until you find exactly what you need.

There are many ways to do this, some in Emacs and some outside, but I find that the manual-visual process in the middle makes this especially powerful, as you get to see the files selected each time and decide what to keep as you keep narrowing down your search.

Let’s say you want to find journal entries where you wrote about a vacation that involved going out of state, and maybe get an idea of where you stayed, say a hotel vs. an Airbnb.

  1. In Dired, go to the folder where the words are (say your journal notes directory) and enter % g for a regex search for term 1 — in our case, “vacation”.
  2. Dired will mark the files containing “vacation” somewhere in the text.
  3. You now start the manual narrowing process:
    1. Enter t to mark all the opposite files, the ones that were not included in the results before. What you have now are all the files that do not have the word “vacation” in them.
    2. Enter k to remove the marked lines from view (don’t worry, this just hides the files. They are still there, just hit g). You now have the files you don’t need — those that do not have the word “vacation” in them — out of the way.
  4. You can now go back to step 1, running another search on those narrowed results. In our example, enter % g again for term 2 — “airport” (maybe you drive, but you get the idea) — and narrow again. Because we are now only working with the files that remained after our first round of narrowing, these files (by deductive logic of what we did) now contain the word “vacation” already. The files we are now narrowing (steps 3.1 and 3.2) will contain the word “vacation” and the word “airport”. When you’re done narrowing a second time and have the files that contain “vacation” and “airport”:
  5. Mark all the files you have left (or the one you decide you want from what’s left, looking at the list of files), and enter A1. This works on the file at point unless you have a couple marked, so that’s why we need to mark those first. This runs a fresh regex search over the full contents of the marked files, and will show the results in a dedicated buffer, so you see all the results from all the files in a list, showing you which file they are from and on what lines you can find them. Since this is a regex search, you can get fancy here. For me, I found that at this point the selection is small enough to find what I need: I can run one search for “hotel”, another for “Airbnb”, no problem.

As I said above, there are many ways to run something automatic and not go through these steps, but the fact that you see the files in front of you is powerful.

For example, in step 5, when you look at what you have left, you might find an old packing list template that somehow snuck into your journal folder (this never happens to me though! I’m way too organized… uhm…), or maybe you have an idea of what time of year you went on a particular vacation you’re looking for (say if it was a vacation during the summer), so you can manually take out files that contain the above words but have a timestamp of December and February.


  1. A runs the command dired-do-find-regexp, for searching, so it’s worth noting that in Dired it has a sibling: Q for dired-do-find-regexp-and-replace, which replaces the searched term with your choice. Great for fixing a mistake you may have in a couple of files, like a misspelled name you keep getting wrong. ↩︎

-1:-- Dired: Classic Technique for Manual-Visual Search (Post TAONAW - Emacs and Org Mode)--L0--C0--2026-11-20T15:06:23.000Z

Mickey Petersen: Announcing DreamCoder

It’s been a little bit quiet around these parts; sorry about that. I’ve been really busy for the past fifteen months with a major project that I am finally ready to formally release. So I’d like to talk about that project, and also a potted history of AI and Emacs.

It’s called DreamCoder, an AI coding harness that is very different from the ones you’re probably familiar with already.

I installed Claude Code a few days after its first release some time in May 2025. I put some coins in the slot machine and I put it to work building a complex piece of enterprise middleware I’d built several times in my career. Wow.. watching this thing chomp its way through the project with that chaotic, early Sonnet energy. It was far, far from perfect; it required a lot of human steering, input and correction, but the speed advantage was undeniable, and seeing it jump between disparate programming languages, frameworks and theoretical and practical programming from one turn to the next was just such a sight to behold.

One thing that struck me with Claude Code is that it was the first terminal application I’d used in a long time. I found it an odd choice for a coding agent; then everyone else copied them and made their own terminal coding agents.

Why on earth do I have to stare at a shoe rack-sized terminal window to do this? Sure there are GUI versions also; but the terminal interface remains the primary modality for most of these tools. Most GUIs, and most harnesses now have them also, are second-class citizens. And they all look the same. A boring sidebar with chat headings and a chat pane is what most of them look like.

But a serious coder needs more than that. Even a casual user will bristle when they try to copy and paste multi-line text in a terminal.

So in May 2025 I decreed that I would build a better harness, and surely now that I have AI this should not take more than 2 or 3 months to build.

And so, after 15 months of work, and endless UI and backend iterations, culminating in a successful beta test, I am now ready to release DreamCoder, which is I think the acme of what a coding harness should be.

DreamCoder with chats, a code review and a terminal tiled side by side
DreamCoder is a frontier coding harness with a tiling window manager that runs in your browser on all 3 platforms.

Before I get into the meat and potatoes of all of that, I want to talk about AI history and Emacs’s role in it.

Let’s roll back time to the 1950s.

Past

Emacs and LISP, if you did not know, both have a special place in the annals of AI history.

John McCarthy was an AI researcher at MIT, and in the 1950s he set out to create the Advice Taker, a piece of software that envelops a framework for what a basic human should know that he called commonsense reasoning using “mathematical logic”. His postulation was that if we can express with symbolic precision all the aspects of what constitutes humanity like ordinary facts about life, that we can set in motion the rudiments of AI.

In the 50s there was little in the way of computer software that could do this. To formalize such a system you need a lot of data, rigorously formatted, and a method of manipulating the data. The data and code itself may intertwine recursively, and so an ordinary programming language would not work.

To help him achieve this, McCarthy created the LISt Processing (LISP) language made up of two facets: M-expressions, a functional language in the vein of Algol; and S-expressions, designed for symbolic data representation, and never intended as a method of writing code. S-expressions were dolled up with parentheses. M-expressions meanwhile used square brackets to visually separate the two. Uniquely, the language specification had an eval feature that would prove that the language is also a universal Turing machine… if only McCarthy had the means to do so. It was theoretical because McCarthy lacked, in time, staff and money, what he needed build this recursive evaluator that can take as input its own world state and evaluate it alongside new expressions, a fact made even more apparent by the sheer complexity of his M-expression language and the limited resources he had at the time.

Steve Russell who worked with him proved him wrong the way most young people do: by just doing it. Russell wrote the first LISP Interpreter with a working eval function, but M-expressions got sidelined; the imperative, procedural nature of programming got squished into S-expressions instead. They had to hand roll the language on paper then punch it into cards and then batch run them. Eliding M-expressions was a simple matter of pragmatism. And so LISP was born. And through several accidents of history, M-expressions never gained traction. M-expressions live on in Wolfram’s Mathematica, but few other places.

Much later, McCarthy eventually conceded that,

“One can even conjecture that LISP owes its survival specifically to the fact that its programs are lists, which everyone, including me, has regarded as a disadvantage.”

S-expressions were always intended as the storage format with a bridge language to manipulate them. But by pushing evaluation into the same symbolic representation format as the data, we have what we call LISP today. That is why LISP is so unique. Consider a simple calculator. (+ 2 2) can simultaneously represent an expression that we want to compute, two plus two, or perhaps a ledger of record of a calculation we have already done.

McCarthy never built the Advice Taker in its purest form. He and his team ran into many philosophical, mathematical and computational walls that kept them occupied for a long time.

The idea behind the Advice Taker was simple. If you want to go somewhere in your car, you can symbolically express this by building a chain of narrative facts – kinda like a flowchart, but as small snippets of rules and facts, not as one grand design.

The system would automatically resolve ambiguities, and all the logician had to do was capture the microcosm of the world he wished to represent:

(at me home)

(walkable home car)
(walkable home driveway)
(drivable car shop)

And so on. If you’re a student of Computer Science you’ll see echoes of Prolog here. The intent was simple: if we can symbolically express the world around us, we can advise that symbolic world with real-life facts, and have the automaton that uses this reified symbolic world change with it.

But the axiomatic complexity of a world model would never survive an encounter with a 3-year-old child. Every axiom you write begets a new one — so you can walk to your front door? Well what if the door is locked? Or what if your car is parked on the street and not in your drive way?

A rules-based order of the world is a tender, beautiful one; but it is hard to build. It’s a fractal of ever-more specific and pedantic rules that conspire against you, just as you think you have a soluble world, typed and ready.

Anyone who has ever written Prolog knows exactly what that feels like!

I have my own personal story to add to this. In the 90s as a teenager I got a summer internship at a business that built banking software. They clearly didn’t know what to do with us teenaged interns, so on our first day they crammed us in a room and split us into teams and told us to build a flow chart for assembling a bike. Team exercise or something. Best one wins. We were told to be as specific and explicit as possible and account for as many conditions as we could think of, and the poor employees who had to mind us did their best to help. I distinctly recall losing because in my flowchart I forgot to open the box the disassembled bike came in.

McCarthy meanwhile eventually moved on and set up his own AI lab at Stanford, but the idea of the Advice Taker lived on.

In the late 70s Stallman and Steele create EMACS (Editing MACroS), also at MIT’s AI Lab, a set of building blocks on top of TECO, a famously inscrutable text editor. TECO did not update the screen by default; you had to toggle that on and hope your edits worked. You typed out terse keyboard commands, crossed your fingers and hoped you got it right, and then you patiently waited for your text manipulation to take effect. Rinse and repeat until you got what you wanted.

Stallman and Steele wanted more: they wanted macros so they could automate tedium of typing all that line noise. This strand of augmentation and later on self-modification is of course a unifying theme in Emacs today. The history of Emacs is long; but its outcome is known to us. I am typing this very article in Richard Stallman’s Emacs.

McCarthy’s Advice Taker left its mark in a subtle but indelible way. Warren Teitelman built the ADVISE system in his thesis with a cool title that reads like something out of a pulpy 1970s sci-fi novella: PILOT: A Step Toward Man-Computer Symbiosis. Teitelman, he later said, was deeply inspired by McCarthy’s original idea of advising systems.

In his thesis, he describes a method of arresting a function call and inserting code before or after it is run. He was tired of editing other people’s LISP code by hand, and wanted a way of modifying their code without touching it directly. He built and rebuilt his system several times over the years, culminating in his ADVISE system in Interlisp, a structured editor and language runtime for manipulating LISP code and data. Interlisp eschewed plain text files; instead, you manipulated the tree at a high level of abstraction with explicit instructions like “move X list to Y position”. You can see my own attempts at merging structured editing with plaintext editing in Combobulate.

MIT AI hackers eventually implemented Teitelman’s ADVISE system from his PILOT thesis in their own versions of Emacs. Later, it was canonized in Chalupsky’s own 1992 re-implementation in Emacs Lisp that lives on (M-x find-library advice.el) as one of Emacs’s advice systems to this day.

What began as an idea for expressing automata using symbolism in an as-yet theoretical language in the 1950s culminated in a system for dynamically altering functions in GNU Emacs in the 1990s. What an unlikely lineage and history.

A cast-iron system made of stern rules cannot spawn general intelligence.

Symbolism and AI did not end with advising functions. There were many attempts at symbolic intelligence. Terry Winograd’s SHRDLU; Marvin Minsky’s Frame Systems; and even Emacs’s ELIZA-style M-x doctor all make use of symbolic “AI”.

None of them brought us closer to the AI that proponents of symbolic AI hoped they would.

In hindsight that seems obvious.

Writing a LISP macro just so will not produce artificial intelligence; nor will a carefully crafted web of rules and symbolic algebra suddenly spark intelligence. We know that today, but for a generation of computer scientists it felt like the future we have all read about in science fiction novels: a perfect, logical intelligence. A positronic brain. Robby the Robot; HAL 9000; C-3PO; Data; or the Speedies and Cuties from I, Robot. The unifying theme of these science fiction stories is they are automatons that follow strict rules — they obey Asimov’s three Laws of Robotics.

Every turn of hardware and software brought them ever closer to one day realizing the vision of an artificial intelligence, captured in neat axioms and LISP S-expressions, and modified in tools like Emacs.

It is surprising that symbolic AI, the vanguard movement for artificial intelligence, would instead dissipate into the wider body of Computer Science and programming as tools, languages and concepts, but not survive as a viable method of achieving AI.

Perhaps we always knew. Because at some point – even if we never really fully internalized it – we discovered that a ductile system that is shaped by its master’s desires is a tool that survives the ages because it remains eternally useful.

A cast-iron system made of stern rules cannot spawn general intelligence.

For all the mathematical purity, beauty even, of the idea of a clockwork mind that is introspectable and malleable and its behavior expressed as S-expressions and interpreted by elegant algorithms and honed macros, we can, through the benefit of hindsight – now that we do have AI through other means – see that it was not to be.

The argument in favor of ductility is especially poignant when you learn of the Connectionists, which sounds like a bad 1960s band, but was in fact a loose coalition of people who believed firmly that neural networks, not symbolic AI, were the path to success. The Connectionist viewpoint was deeply unpopular in AI academia of that era, and funding for it was scarce.

Frank Rosenblatt invented the Perceptron, a foundational concept in neural networks, in 1957. Before Rosenblatt died in 1971, Marvin Minsky, an authority in the AI movement at MIT and a leading proponent of Symbolism, knifed the idea of Perceptrons and neural networks in a book he co-authored with Seymour Papert. They named the book, which they also dedicated to Rosenblatt, Perceptrons. The book deftly explains the mathematics of Perceptrons but undercuts their possible utility by showing that a single-layer Perceptron cannot represent an XOR gate. It was a deliberately obtuse reading of what neural networks could and could not do. With one additional hidden layer, a network can represent an XOR gate. It was a sneaky thrust of the stiletto: Minsky’s claims were overstated. A fact that was not lost on anybody in the Symbolic or Connectionist camps.

It’s disputed if the Perceptrons book led to the first AI winter in the 1970s. It certainly did not help. But funding for many AI research paths dried up in the 1970s.

The Connectionist movement was vindicated in the long run. They lost the battle then, but they won the war, and the fruits of their research eventually gave us AI.

The ductility we so prize in our software and tools today is antithetical to a strict, symbolic world model spun of axioms and facts that we hoped would one day birth AI. Yet to try and give birth to this world they had to build the most ductile tools of them all: LISP and, from that, also software like Emacs. The ultimate hacker’s tool.

It is ironic then that a neural network, a crude facsimile of how a brain works, a construct that is by its nature ductile and malleable, won out in the end.

So I feel a profound sadness that I started out programming DreamCoder in Emacs, the most extensible editor in the world, by hand back in May 2025, only to see DreamCoder write itself… in DreamCoder today.

Future

I am still sad, but I also know that our industry completely reinvents itself every decade or two. This is my second career upheaval. Most programmers today have not been around long enough to go through it themselves. So I feel for them that this especially massive quake is their first encounter with how unsentimental our industry is.

But for all the sadness, I wake up every day with a feeling of optimism that I have not felt in a very long time.

I finally get to build again, no longer weighed down by my decades of knowledge and experience that held my ambition in check. I truly have not felt this liberated since I was a teenager programming in Delphi, blissfully unaware that the things I was busy building were impossible for a self-taught teenager to ever realize. I see this reflection in others: the best programmers I know also love AI. Amateurs also revel in AI’s capabilities, happy that they can finally solve problems they could never afford to pay a programmer to do for them.

I must admit that building software has, over the years, gotten a lot more complex, with an ever-larger share of that work being repetitive tedium. This is more so with hobby software – as I do not get paid to do it, so I do not have a moral duty to see it through – where I’d do all the fun bits leaving just the enervating, boring and soul-crushing parts behind. Do you have a projects folder full of sad, abandoned projects like I do?

Now I can craft in abundance. AI has freed up a lot of toil but I somehow still find myself busy all day doing real work.

Building a coding harness is perhaps the closest I will get to the optimism all those researchers and scientists must have felt in the 1970s and 1980s. They hoped that with a little bit more work, their logical rules would kindle a new intelligence. Fifty years on, and I can simply tell DreamCoder to improve itself and watch as it changes before me. I can ask the AI running inside it to analyze the changes I have made to its tools and prompt and have it adjust them accordingly. It feels like science fiction; the very thing the researchers of yesterday strove to build. Yet we really do live in this reality now.

Taste is a scarce, human resource.

So. DreamCoder. Let me address the 900 lb gnu in the room: DreamCoder is not an Emacs-related application. The reason is unfortunately one of economics and access: I want to build an AI coding harness for everyone. But don’t worry: I have some cool plans for DreamCoder + Emacs, and AI + Emacs more generally going forward. So stay tuned.

But what about all those other coding harnesses? Well, most of those harnesses all suffer from the same mistakes. It is a problem that is not unique to coding harnesses or the people who make them, but a constraint we all labor under, and one that is not easily replaced by AI:

Taste is a scarce, human resource.

And for all the bounty of AI, it still requires a human to persevere and to see things through. One thing intensive use of AI coding has taught me is that we’re going to need a lot of computer programmers who know what they’re doing going forward. I believe this is so, because let us be honest, most people do not want to program computers, even if that computer can actually do the bulk of the work for them. It requires a steady hand to build reliable software; that has not changed.

Therefore, if we programmers have to spend a lot of our time interacting with AI, then the tool we do it with should be ‘human-centric’ in its design, and it should take advantage of all the modern features we have at our disposal.

Back in May 2025 I took a look at all the tooling and said “no, thank you.” Today I look at the landscape and I feel pretty much the same.

And I think I am not the only one who feels that way. Most of these coding harnesses, to me, feel bristly. They shouldn’t be; but they are like that because we are at an important inflection point where no one really knows what the future looks like. We’re all just… fumbling around a bit. It’s an exciting time to build software, even if we don’t quite know what the world will look like a few years hence.

One thing I am adamant about is that DreamCoder must be a powerful, frontier-class coding harness. That means it should have all the features you’d expect from that: backgroundable sub agents, MCP servers, cache efficiency, and all that stuff. Check.

  • Sub-agents
  • MCP servers
  • Building an agent of your ownYour own agents
  • A terminal beside a chatTerminals beside chats
The frontier-harness basics. Click any of them to see it full size.

But that stuff quickly recedes into the background because, you know, it just works. Day to day you will dart between chats and terminals and whatnot, and you need an interface that accommodates that. Emacs is a tiling window manager; so is DreamCoder. DreamCoder’s window manager is a little bit cleverer than most window managers as every pane has a minimum, comfortable and maximum size. The window manager will therefore ensure windows always fit snugly on your screen, and you’ll never end up in a situation where windows are tiny and unreadable. It has a sophisticated constraint satisfaction solver that tries to balance your demand for a new window (“open a terminal”) with the challenge of keeping your visible panes roughly the same size. If DreamCoder can’t wedge in a new pane, it’ll punt one to the hidden window bar. Just click it to resurface it, or hover it to see what it’s doing; it’s a live view.

Panes are made to fit; if a new pane must evict an old one, it is pushed to the hidden window box.
Avy-style selection and embark-style actions.

Because of my Emacs roots, I think a good tool must be keyboard-friendly. Because it runs on a browser you get the mouse for free of course. But smacking the tab button over and over is a frustrating user experience in complex webapps, and doubly so a tiling window manager: where exactly are you going to end up when you tab from one window to the next? To combat that, I built an avy-style window and “point of interest” selector for chats. Tap a key and pick from a selection of “embark”-like actions such as clicking links or opening pictures. It’s a work in progress, but I think it works well.

Familiar type-to-complete mechanics

Most high-volume operations like opening and creating panes is done through a Helm-like interface with search-as-you-type. It’s really efficient, of course. And it works with a mouse also; which is sort of the point. The keyboard’s there for those who want it, and the mouse for regular folk who are just getting started. One unique feature of the design, which admittedly I am still exploring privately, is that everything is stored as Javascript objects (on account of running in your browser) so it’s not too much of a leap to build “macros” that prefill most of these dialog windows, leaving behind just the fields you want to edit.

But yeah. With DreamCoder I want to take the best of Emacs and its coterie of third-party packages and bring some of that with me. The world is still not ready for an Emacs-shaped future, sadly, so that is why DreamCoder is a standalone application and a web frontend.

Another thing that drives me wild: I see people with tmux running 10 claude codes (or codex, or…) cycling between them like a duck gallery at a carnival to see if one of them is done working, or if it needs human intervention.

So there’s two things to unpack here: one is running lots of things in parallel, and the other is observability. You need insight into what is going on: is an AI jammed because it’s awaiting an answer or a tool safety prompt? Perhaps you’ve parked a bunch of chats pending some conversations with coworkers or other work that must finish first.

In DreamCoder you have workspaces. They’re like virtual desktops (or window configurations in Emacs lingo): a snapshot view of panes as you want em. As you can see from the screenshots, panes expand to fill all the space. So if you want more space, you can: resize them (with the mouse or keyboard); shuffle them to a named workspace; or float them so they sit on top of the other windows.

  • The event graphThe event graph
  • ObjectivesObjectives
  • Image panesImage panes
  • DreamCoder on a phoneOn your phone
More than a chat window, already.

But if you’ve got a lot of things happening in multiple workspaces, it’s hard to keep tabs on that. That’s why DreamCoder has a big, honking minimap in the top-right corner. One for each workspace. The minimap is a miniature of your actual layout. Each pane in the map gently pulses when it’s working, and it makes it abundantly clear when it’s blocked. When there’s nothing to do, it’s green.

Because workspaces and panes are distinct things you interact with, it must be easy to navigate between them.

I also wanted full-on, optional Emacs key bindings, but that is… pretty much impossible to properly build. Browsers lock you out of some rather important Emacs button combinations. Sadly that feature is parked until I can solve it on all major browsers without breaking your normal browser keys.

That’s not to say it doesn’t have Emacs-inspired key bindings. Most global actions are reachable with Alt+x, akin to M-x; local, pane-specific ones with Alt+c. Alt+m activates keyboard mode: you can now type the number of the named pane to jump to it; or WASD to switch the active pane in that cardinal direction.

Support for open weight models like Qwen, Gemma, Deepseek, GLM, etc. is also very important to me. They work so well. I’m really surprised, here in late 2026, just how capable small models are at local-only development compared to just one year ago. Qwen 3.8 27B, for example, is fantastically good for its size. You can do a lot of good software development with it if you’re a capable hand yourself. Bigger models equal more auto piloting; but that Qwen model? Wow. So local models work great. In fact I think the future is local for a lot of use cases. Intelligence is fast approaching a cost where it will be too cheap to meter. If you remember the personal computer revolution in the 1980s and 1990s, then there are definitely echoes of that here.

If you’ve been holding off on local models then I do recommend you reconsider. Small ones like Qwen 3.8 27B (or its cousin, Flash Next) can run well on a high-end gaming rig or Mac, or with a little investment if you do not have that. If you have a dinky old computer and you’re cash starved, then not all hope is lost. Turn to the potato agronomists on twitter: give twitter’s AI, Grok, what you have and what you can reasonably spend and tell it to track down the cutting edge setup for your rig. This is no lie the fastest, easiest way to catch up to the cutting edge of self-hosted inference today. Five minutes.

Coding harnesses are the IDEs of the future

As I’ve been building DreamCoder, I have come to the belief I’m not just building a coding harness. Coding harnesses are an IDE for the future; it will do more than just display a chat window for coding agent work. DreamCoder does more than that already. It’s going the way of Emacs in that it’ll consume a wide range of adjacent workflows and tools. But I have only just gotten started. I am brimming with ideas I’m building in parallel, but they take time because as I said it’s not about the code; it’s just one small facet of building something that works well. But you know that already: it’s always the last mile.

DreamCoder is the most ambitious, technically complex and advanced software project I have ever built in my life. And that’s just the beginning. I’m not done. I’ve barely started. I will be blogging about this going forward, in addition to my usual Emacs scribblings.

In fact, the thing I’m currently grinding away at is a world-class pentest and cybersecurity suite in DreamCoder. Every single bit of software we have ever written is vulnerable; we have many rough years ahead of us. Just look at the crippling vulnerabilities coming out every day now almost. Even the most security conscious person is going to find themselves on the wrong side for no other reason than we depend on packages that were mature and stable and assumed to be secure. DreamCoder can do its bit to help catch many of most obvious weaknesses, especially as new software is minted every day that also needs thorough testing.

  • Roster of pentested endpoints and their statesPentested endpoints and their states
  • Graph overview of findings and how exploits were tracedFindings and how exploits were traced
Screenshot of DreamCoder's upcoming, awesome pentesting and cybersecurity suite. It's built for humans. The AI does the work, and you and your team assess its results and impact. The graph overview is AI-generated from its explorations and findings. Do not worry: no human will ever have to suffer the indignity of writing flow charts like that.
(If you're interested in/have questions about the pentesting stuff, please e-mail me.)

To round it off, I would like to formally invite you to join me in making DreamCoder better by trying it out. It’s great. It’s not a toy; it’s not a demo; and it’s not a weekend prototype. It’s a frontier coding harness that has most of what you’d expect: MCP, backgroundable sub agents and shell commands, terminal windows, skills, hooks, 99% cache hit, it runs for days, and an interactive UI for all of it. There’s a handy dandy importer for your Pi, OpenCode or Codex configs also to help you get started. A couple of clicks and your model settings are set up in DreamCoder. Ready to go.

Please do e-mail me your thoughts ((rot13 "zvpxrl@znfgrevatrznpf.bet")) on AI, coding harnesses, what you’ve built with it, and what you think more generally about where our world is heading. I’m keen to hear from you.

And if you want to hear more from me on the technical aspects of AI, building coding harnesses, and more, then do sign up for the DreamCoder newsletter below.

-1:-- Announcing DreamCoder (Post Mickey Petersen)--L0--C0--2026-11-20T09:44:33.000Z

Alvaro Ramirez: agent-shell 0.98 updates

Another month, another agent-shell update. If you missed the last post, have a look at the 0.87 update. This time around, the most notable changes are around rendering, performance, and bugfixes, sprinkled with new features here and there.

As usual, this post showcases highlights, but please check out the full list of changes if you're after the nitty-gritty.

What's agent-shell?

agent-shell brings your favorite AI agents to Emacs, keeping you at home: familiar buffers and bindings, no terminal emulation. All powered by ACP, the Agent Client Protocol.

New supported agent

DeepSeek Harness joins the family, bringing the total number of supported agents to 24. Start DeepSeek with M-x agent-shell-deepseek-start-agent, or pick it from M-x agent-shell as usual.

Antigravity moved to agy (action required)

Latest Antigravity ships with ACP out of the box, so agent-shell now runs agy acp rather than a separate binary you had to download and unpack. If you're an Antigravity user, install a recent CLI, make sure agy is on your PATH, and sign in once:

agy acp --login

Blockquotes: rendering + navigation + copy

Blockquotes improved their display, rendering embedded Markdown (#942).

They also joined the TAB navigation party. TAB and S-TAB now visit blockquotes, stopping on their first quoted character.

With point on a blockquote, RET now copies the quote's raw Markdown, without the > markers.

Images in table cells

Images are now rendered as thumbnails within tables. Press RET on an image to open in full view.

Thank you @alberti42 for #938. Tables also realign in the resized window's own buffer now (#934), so splitting a window no longer leaves a table laid out for the window it used to be in.

Links

Hovering a rendered link (or with point on one) now shows its target URL, so you can judge whether it's worth opening.

Two new entry points landed alongside (#933):

  • agent-shell-markdown-open-link-at-point opens the link at point.
  • agent-shell-markdown-xref-backend plugs into xref-backend-functions, so M-. on a rendered path:line citation visits it. It returns nil anywhere else, web and binary links included, leaving point to the next backend.

Recursive folding

RET toggles the fragment at point, as usual. C-u RET now toggles groups recursively (#924, #945).

Queued -> steered

Queued a prompt, but wanted to steer instead? Pressing M-RET on an empty prompt now offers to steer the last queued prompt into the running turn (#918, #919). While this isn't something I need often, I'm pretty happy with the UX we landed on.

While on the topic of steering, chat mode now handles steered prompt labelling (#930, proposed by @Gleek). If you'd like to render labels differently, agent-shell-chat-label-function now receives the :steered param.

Exposing more options in header

Agents often expose options that never make it to the buffer header. Additional options are now offered via the (+N) menu (#921).

Filtering noisy notices

Agents write all sorts to stderr, and agent-shell surfaces it under "Notices". You can now use agent-shell-notice-filter-function to filter notices (or modify) as preferred (#950 by @astoff). It receives an alist with :text, one stderr line, and returns the text to show or nil to drop it:

(setopt agent-shell-notice-filter-function
        (lambda (notice)
          (unless (string-prefix-p "[idle-compaction]" (map-elt notice :text))
            (map-elt notice :text))))

A filter that signals or returns a non-string is reported, and the notice shown unfiltered.

Your own system prompt

agent-shell-system-prompt is appended to the agent's default system prompt, sent whenever a session is created, loaded, resumed or forked (acp.el #37 by @systemfreund):

(setopt agent-shell-system-prompt "Keep answers short and respond like a pirate.")

Only agents advertising ACP's systemPrompt capability can take one. Configure a prompt for an agent that can't, and agent-shell says it's ignored rather than dropping it quietly. An agent config's :system-prompt takes precedence.

Secrets resolved at agent start

agent-shell-make-environment-variables now takes a function as a value and calls it when the agent starts, rather than when your config loads (#948 by @nbarrientos). Handy for a password store still locked at init:

(setopt agent-shell-opencode-environment
        (agent-shell-make-environment-variables
         "MY_SECRET" (lambda ()
                       (auth-source-pick-first-password :host "example.org"))))

A function that errors or returns nil leaves the variable out of the agent's environment and says so in a boxed warning in the shell. Works across all agents.

Shells follow project-switch-project

Starting a shell from C-x p p used to land in the current shell's directory rather than the project you just picked, and offer that directory's sessions to resume. It now starts in the chosen project (#949 by @OSadovy).

Fork and show history

When agent-shell-session-fork-restore-history is non-nil, forked sessions will attempt to restore interaction history as per agent-shell-session-restore-verbosity.

agent-shell-session-fork-restore-history is off by default, so you'll need to enable it with:

(setopt agent-shell-session-fork-restore-history t)

Note: You'll need an agent that supports loading a session right after forking it, like claude-agent-acp 0.90.0 or newer.

Faster streaming

Streaming performance received some love. Message chunks are coalesced before rendering (#883 by @moyotar), thought chunks are batched the same way, and restored sessions replay with far less overhead (#897 by @Gleek).

Lots of fixes

As mentioned, the much effort in the release went into fixes and improvements.

Rendering:

  • Bold renders next to text and punctuation (#925 by @vritser), with CommonMark flanking rules relaxed for CJK (#942).
  • Numbered headers and bold steps no longer render as list items (#939 by @budu), nor does markup that merely reads like one.
  • A fenced block's last line is fontified (#916 by @liaowang11), two flush source blocks render as two (#940), and nested ones stay verbatim while streaming.
  • Headers keep their title when a code fence follows directly (#947).
  • Text quoted into the prompt keeps its quote face (#952 by @OSadovy).
  • Copilot multi-hunk diffs render as separate hunks (#931), and Codex streamed output is fenced correctly (#906 by @bartbunting).
  • Icons scale correctly on HiDPI Linux (#917 by @heraplem).
  • Unfinished tool calls survive turn end (#941), so a late subagent keeps its title and grouping.

Performance and responsiveness:

  • Buffers shown in no window measure against a live one (#885 by @bcc32), and measuring glyph height no longer triggers window hooks (#886, also @bcc32).
  • agent-shell-cwd-function is called once per command (#857, also @bcc32).
  • Pending Markdown is protected and fontification updates silenced (#915 by @daym).
  • Chat mode relabels only the last turn while streaming, not the whole buffer (#943, profiled and proposed by @Gleek).
  • In shell-maker, auto-scroll can be suppressed during bulk updates (#50 by @Gleek), which is what makes the faster replay possible.
  • Also in shell-maker, the curl --version check that ran on every submission is gone (#32 by @carlosdagos).
  • In acp.el, agents handle SIGTERM before being killed on shutdown (#35 by @fjolliton).

Elsewhere:

  • Undo history no longer carries programmatic renders: the compose buffer starts empty (#893 by @liaowang11) and resets after a deferred render (#902 by @bcc32).
  • New worktrees stay under the main working tree (#904 by @xiaofeilovecoding).
  • A restored session finishes initializing even when rendering errors (#887 by @bcc32).
  • Flymake context is only used when flymake-mode is on (#892 by @liaowang11), and single-line regions carry one line number (#922 by @martenlienen).
  • Quoting a region leaves the mark where reading stopped (#896 by @OSadovy).
  • Minibuffer completion keeps the agent's candidate order (#929 by @Zzull).
  • Remote URLs are skipped when parsing local links (#926 by @mpmiszczyk), and optional system-sleep functions are declared (#928 by @mboldt).
  • In shell-maker, non-ASCII prompt history no longer reads back as raw bytes, and entries already corrupted by older versions are decoded on read (#49 by @kazmuroi).
  • In acp.el, agent stderr reaches error handlers one line at a time rather than in arbitrary pipe chunks (added for notice filtering).

Public functions

A few more additions for package authors building on agent-shell.

Prompt locations

agent-shell-prompt-ranges returns the range of every prompt in the buffer, in buffer order, covering prompts typed at the shell, replayed by a restored session, and steered into a running turn (#882). Each comes back as an alist spanning the comint shell prompt itself (:prompt-start, :prompt-end) and the input typed after it (:input-start, :input-end).

Usage events and ACP _meta

agent-shell-subscribe-to now offers a usage-update event, broadcast when the agent reports context window or cost usage. Events now also carry ACP's _meta, so integrations can read whatever an agent attaches without waiting on agent-shell.

Choosing sessions programmatically

agent-shell-session-strategy now accepts a function. It's called with the resumeable sessions and returns new, latest, prompt, or a (session-id . ID) cons to load a specific one:

(setopt agent-shell-session-strategy
        (lambda (context)
          (if (map-elt context :sessions) 'latest 'new)))

Housekeeping

If you peeked at the commit logs for the period, you'll see it's been another busy month. Since the last post, 193 commits landed, 32 issues have been closed and 27 pull requests merged. As of this writing, the backlog sits at 6 open issues and 5 open PRs (versus 4 and 6 last time around).

Zooming out a little, here's how the backlog has tracked:

As usual, this chart was generated using the /github-activity skill shared in my emacs-skills repo.

All of this requires daily attention.

Sponsoring keeps agent-shell running.

While paying for tokens keeps agents running, sponsoring keeps agent-shell running.

agent-shell is built and maintained by me, an indie dev, while the tools it competes with often have well-funded teams behind them. Funding Emacs-native tools, so we can keep living in our beloved editor, matters now more than ever.

Using agent-shell at work? Ask your employer to sponsor too. Companies can contribute at a scale individuals can't.

Pull requests

Thank you to all contributors for these improvements!

agent-shell

  • #857: Call agent-shell-cwd-function only once per command (@bcc32)
  • #873: Add Antigravity default-model-id and default-session-mode-id defcustoms (@tychoish)
  • #883: Coalesce streamed message chunks before rendering (@moyotar)
  • #885: Measure a buffer shown in no window against a live window (@bcc32)
  • #886: Do not trigger window hooks when measuring glyph height (@bcc32)
  • #887: Finish initializing a restored session even if rendering errors (@bcc32)
  • #889: Add a separate provider notification handler (@Cy6erBr4in)
  • #892: Only use flymake error context when flymake-mode is on (@liaowang11)
  • #893: Start the viewport compose buffer with an empty undo history (@liaowang11)
  • #894: Render the viewport's held-back markup when a turn ends (@liaowang11)
  • #896: Leave the mark where reading stopped when quoting a region (@OSadovy)
  • #897: Reduce overhead when replaying restored sessions (@Gleek)
  • #902: Reset undo history after a deferred markdown render (@bcc32)
  • #904: Keep new worktrees under the main working tree (@xiaofeilovecoding)
  • #906: Fix streamed Codex command output (@bartbunting)
  • #915: Protect pending Markdown and silence fontification updates (@daym)
  • #916: Fontify the last line of a fenced code block (@liaowang11)
  • #917: Fix HiDPI icon scaling on Linux (@heraplem)
  • #922: Use one line number for single-line region contexts (@martenlienen)
  • #925: Fix bold rendering next to text and punctuation (@vritser)
  • #926: Skip remote URLs in parse-local-links (@mpmiszczyk)
  • #928: Declare optional system-sleep functions (@mboldt)
  • #929: Keep original order of candidates for minibuffer completion (@Zzull)
  • #938: Lay out table cells that show images (@alberti42)
  • #939: Don't render numbered headers and bold steps as list items (@budu)
  • #949: Start a new shell in the project chosen with project-switch-project (@OSadovy)
  • #952: Keep the quote face on text quoted into the prompt (@OSadovy)

acp.el and shell-maker

agent-shell stands on acp.el to speak ACP and shell-maker for its shell foundations, so fixes landing there reach you just the same:

  • acp.el #34: Allow listing sessions without a working-directory filter (@Gleek)
  • acp.el #35: Let the agent handle SIGTERM before killing it on shutdown (@fjolliton)
  • shell-maker #50: Allow suppressing auto-scroll during bulk updates (@Gleek)

Make it sustainable, sponsor agent-shell

As of this writing, we're 89% of the way to the 150 monthly sponsors goal, a tiny closer since the last update. If agent-shell is part of your daily workflow, please consider becoming a monthly sponsor (or ask your employer to).

Not in a position to sponsor? A GitHub star helps with exposure and brings in new users.

-1:-- agent-shell 0.98 updates (Post Alvaro Ramirez)--L0--C0--2026-11-20T00:00:00.000Z

Irreal: Opening Techinfo Sourced Web Pages In Emacs

Charles Choi has just released another interesting little utility. Although it’s restricted to Safari and the Mac, it’s a nice idea that could probably be ported to other operating systems without difficulty. The idea is to be able to easily move from reading a Web page generated by Techinfo to reading the same information with the Emacs Info reader.

Reading Info pages with Emacs is straightforward and comfortable but the external utilities to read them outside of Emacs are terrible. Therefore, a lot us who started with another editor learned to go to the Web first rather than try to navigate the horrible external reader packages. But, as Choi points out, recent events have shown us that we can’t always count on the Web being there for us.

Choi’s solution to all this is the Counterpart utility that provides a menu in Safari to open the Web page’s content in Emacs. Of course, this only works for Techinfo generated content. Your immediate reaction may be, “Who cares?” but I’ve sometimes wished for something like this so that I could have the content side by side with whatever I was working on in Emacs. That also make’s it easy to copy text out of the Info buffer when you want to add a quote to whatever you’re writing.

-1:-- Opening Techinfo Sourced Web Pages In Emacs (Post Irreal)--L0--C0--2026-11-19T16:08:31.000Z

Lars Ingebrigtsen: Herp derp I eat paste

A year and a half ago I made a kitchen clock, which has worked well (except that I had to swap out the screen which broke mysteriously).

But yesterday I was having some work done here, so I had to remove one of the wifi access points here, and… the clock stopped working. *gasp* Yes, because I had in my infinite wisdom decided that I would generate the clock face on a different machine, because the clock is a Raspberry Pi Zero 2 W, and I just assumed that it didn’t have enough memory to run Emacs (which I am, being a totally rational person, using to generate the SVG that’s being displayed).

So it’s a Rube Goldberguesque setup of having the image being generated on the main server, and then scp‘d over once a minute, and then being displayed on the console here in the kitchen.

But the wifi outage made me wonder — is it true that the machine doesn’t have enough memory to do it all on device?

So it’s got 416MB of useful memory, and while just running and doing nothing special, it’s using 129MB of that.

What happens if I load an Emacs with all the SVG libraries and stuff and generate the image?

It’s using 186MB — so the Emacs occupies about 50MB max.

*sigh*

It’s so easy to think of Emacs as this “big thing”, but everything has gotten so much bigger around it that it doesn’t matter at all any more.

So now I’ve changed the code to run on-device, so the only thing that goes AWOL if the wifi goes missing is updated temperatures.

-1:-- Herp derp I eat paste (Post Lars Ingebrigtsen)--L0--C0--2026-11-19T10:45:09.000Z

Protesilaos: Emacs: Denote version 4.3.0

Denote is a simple note-taking tool for Emacs. It is based on the idea that notes should follow a predictable and descriptive file-naming scheme. The file name must offer a clear indication of what the note is about, without reference to any other metadata. Denote basically streamlines the creation of such files while providing facilities to link between them.

Denote’s file-naming scheme is not limited to “notes”. It can be used for all types of file, including those that are not editable in Emacs, such as videos. Naming files in a consistent way makes their filtering and retrieval considerably easier. Denote provides relevant facilities to rename files, regardless of file type.

Below are the release notes


Version 4.3.0 on 2026-11-19

This version introduces quality-of-life improvements as well as a series of abstractions that empower developers to change how Denote retrieves its data. Concretely, developers can write an optional cache or database for Denote.

I am developing denote-data, which is an in-memory cache. Its job is to make certain operations faster. The package is still in development, though I hope to have an initial release within the next weeks: https://github.com/protesilaos/denote-data.

Once denote-data is ready, users will be able to experiment with another package that will be made public soon. That one will provide a much-requested feature. But I will write more about it when the time is right.

AI policy changes

I have added AGENTS.md and CLAUDE.md to denote.git. I copied those files from the emacs.git repository. They instruct AI agents to not write patches or comments for the Denote source code. Users can still use whatever program they want, though they are expected to prepare their own code or bug reports.

I am doing this because Denote is legally part of Emacs: I have assigned copyright to the Free Software Foundation. The GNU project as a whole is waiting for legal advice on how to handle AI-generated contributions. I agree with the current GNU position and will adapt accordingly.

In addition to that, I prefer to write even these release notes by hand even if nobody will read them. They give me an opportunity to review the entire package. I go through the commit logs and check back on the diffs. Then I know what is the state of the project and what may be done next.

Abstractions for a cache or a database

I have introduced several variables and hooks that allow developers to affect how Denote retrieves its data. Existing users will not notice any difference. This is relevant for those who plan to write relevant packages. Users will have to opt in to whatever new functionality.

The manual describes all the technicalities:

I did this in response to issue 724 by kimsaram32, with participation from Aaron Jensen, relict007, Samuel W. Flint, mentalisttraceur, Mirko Hernandez: https://github.com/protesilaos/denote/issues/724.

Disable the “fancy” file prompt

By default, Denote’s file prompt reformats file names. A Denote-style file name is split into columns so that its components are easier to read. Users who prefer to see the actual file names can now set the user option denote-fancy-file-prompt to a nil value.

I did this in response to issue 732 by Honza Pokorný: https://github.com/protesilaos/denote/issues/732.

Note that in addition to this user option advanced users can also change the relevant completion metadata. Check the variable denote-file-prompt-extra-metadata and the functions mentioned therein.

Extra backslashes in query links now result in an error

Denote supports direct links to files as well as “query links”. Those look like links but actually produce a buffer with files that match the given query for file contents or file names. Query links are documented at length in the manual. They are the functional equivalent of the commands denote-dired (search for file names and put them in a Dired buffer) and denote-grep (search for file contents and put them in an Xref buffer).

Queries that have extra backslashes will now report an error. This can happen when users try their regular expression in something like M-x re-builder and then bring it into the query link. That is a common mistake with Emacs regular expressions in general (I do it as well): in Lisp programs we write double backslashes but in interactive calls we use single backslashes.

I did this in response to issue 733 by hapst3r: https://github.com/protesilaos/denote/issues/733. I actually did it as part of a live stream, which you can watch if you are curious about the technicalities: https://protesilaos.com/codelog/2026-10-30-emacs-live-denote-refinements/.

Miscellaneous

  • I developed denote-data as part of denote.git because this made it easier for testing purposes. This helped me write the necessary abstractions. Now denote-data will become its own package as was the plan from the beginning.

  • I made lots of minor refinements that improve the reliability of relevant functions. I also introduce stylistic changes on occasion in the interest of ensuring consistency throughout the code base. This is the kind of boring yet essential work that makes it easier to maintain the project long-term.

  • The variable denote-file-prompt-use-files-matching-regexp can be let bound to affect the FILES-MATCHING-REGEXP value of the denote-file-prompt. There are many such “use” variables that help users write simple wrappers around Denote functions. Thanks to andsy10 for the contribution in pull request 735: https://github.com/protesilaos/denote/pull/735. The change is small, meaning that andsy10 does not need to assign copyright to the Free Software Foundation.

  • I documented some of the packages that extend Denote. If you are a package developer, please contact me and I will add your package to the list—everybody is welcome! To this end, thanks to Matthieu Muller for writing the section about the denote-paperless package and Pavlo V. Lysov for writing about the denote-solo package. Those were done in pull requests 711 and 713, respectively:
  • Fixed a crash in the denote-file-prompt that could happen with some unexpected file names. Thanks to Marco Baringer for the contribution in pull request 708: https://github.com/protesilaos/denote/pull/708.

  • Fixed an issue with a helper function that could under certain conditions do the wrong thing for the command denote-link-dired-marked-notes. Thanks to João Sena for the contribution. This was done in pull request 730: https://github.com/protesilaos/denote/pull/730. No copyright assignment is needed.

  • The user option denote-org-store-link-to-heading supports a new local value, as a symbol. It produces links to headings like [[*Heading text][Heading text]]. Thanks to Michael Korat for the contribution in pull request 723: https://github.com/protesilaos/denote/pull/723. No copyright assignment is needed.

  • Removed obsolete functions from the manual. Thanks to kimsaram32 for the contribution in pull request 728: https://github.com/protesilaos/denote/pull/728. No copyright assignment is needed.

  • The denote-date-prompt supports Unix timestamps. Thanks to Jeff Valk for the original contribution in pull request 722: https://github.com/protesilaos/denote/pull/722. No copyright assignment is needed. Also thanks to Jean-Philippe Gagné Guay for making a follow-up tweak to how this is handled internally. This was done in pull request 726: https://github.com/protesilaos/denote/pull/722. Jean-Philippe is a long-term contributor who has assigned copyright to the Free Software Foundation.

  • The already comprehensive manual includes more useful information. For example, on how to handle files with accented characters in their title. To this end, we now have the function denote-slug-remove-accents. This is based on the code originally written by Jean-Philippe Gagné Guay in issue 603: https://github.com/protesilaos/denote/issues/603#issuecomment-2869702877. I made stylistic changes to it to make it fit with the rest of the code. I added it in response to issues 603 and 718:

Git commits

~/Git/Projects/denote $ git shortlog 4.2.0..4.3.0 --summary --numbered
   214	Protesilaos
     2	Marco Baringer
     1	Jean-Philippe Gagné Guay
     1	Jeff Valk
     1	João Sena
     1	Matthieu MULLER
     1	Michael Korat
     1	Pavlo V. Lysov
     1	andsy10
     1	kimsaram32

🔷 Consider making a donation.

-1:-- Emacs: Denote version 4.3.0 (Post Protesilaos)--L0--C0--2026-11-19T00:00:00.000Z

Charles Choi: Opening Texinfo Web Pages in Emacs Info

As convenient as accessing online services can be, any disruption in availability without a fallback is painful. Given events of late, many are learning the hard way what it’s like to live without that fallback.

GNU Emacs has long supported reading documentation via the Info reader package. Info reader is a “local first” system, where all documentation is stored locally. The source format of the documentation is Texinfo which is exported to different formats, among them Info (used by the Emacs Info reader), HTML, and PDF.

Texinfo exported HTML is typically hosted on a website (usually GNU Project), with each Info node mapped to a URL path and indexed by most major search engine services.

Discovery of information in Texinfo documentation is frequently done via web search. If the user desires to view that Texinfo web page in the Emacs Info reader, that has to be done manually by corresponding the web page to its Info node.

Counterpart is a new utility to automate opening the Info node counterpart of a Texinfo exported web page in Emacs. This utility is designed for Emacs users on macOS who also use the Safari web browser. It requires the installation of a macOS Shortcut which is run from the main menu bar. More detail on using it can be found in the Counterpart User Guide.

Once a desired Info node is opened in Emacs, you can then bookmark it for later access, no internet connection required.

-1:-- Opening Texinfo Web Pages in Emacs Info (Post Charles Choi)--L0--C0--2026-11-18T21:30:00.000Z

Protesilaos: Emacs: ef-themes version 2.3.0

The ef-themes are a collection of light and dark themes for GNU Emacs that provide colourful (“pretty”) yet legible options for users who want something with a bit more flair than my modus-themes or my minimalist doric-themes.

Below are the release notes.


Version 2.3.0 on 2026-11-18

This version introduces a pair of new themes to the collection: ef-halloween-light and ef-halloween-dark. I produced the prototype of the dark theme during a livestream, if you are curious to learn about the process: https://protesilaos.com/codelog/2026-10-31-emacs-live-ef-themes-halloween/.

The two themes add to an already comprehensive collection that covers a broad spectrum of styles. All themes are consistent with the spirit of avoiding exaggerations while remaining legible.

Note that since version 2.0.0, the ef-themes are built on top of my modus-themes. They benefit from all the changes I make there.


🔷 Consider making a donation.

-1:-- Emacs: ef-themes version 2.3.0 (Post Protesilaos)--L0--C0--2026-11-18T00:00:00.000Z

Irreal: Ramírez’s Emacs Contributions

Most of you know that I think very highly of Álvaro Ramírez. That’s mainly because I’m a huge fan of Journelly, which I use many times a day as my memo book. It has many other uses so take a look at the link if you’re interested in a note taking/journaling/private tweet/memo book application. I can’t recommend it enough.

Ramírez has, of course, done many other things, many or perhaps most, in the Emacs sphere. See his site for details. In a recent post he writes about making contributions to Emacs and getting them merged. Those of you who have been down that road know that it’s hard to get started. You have to navigate the GNU copyright assignment process, which seems needlessly baroque until you remember that all this is being run by volunteers.

You can follow the link to find out what his contributions are. They are all live in Emacs 31 so if you are up to date they are available to you now. The main takeaway for me was the satisfaction that Ramírez got from making those contributions. None of them were huge changes and merely scratched an itch that Ramírez had. If you have a small itch that you’ve scratched, you should consider sharing it with the community. You too can become part of Emacs’ long and influential history just as Hari Seldon’s successors in the Second Foundation contributed their own additions to Seldon’s Psychohistory.

-1:-- Ramírez’s Emacs Contributions (Post Irreal)--L0--C0--2026-11-17T15:59:07.000Z

Protesilaos: Emacs live Org custom link type and more today 2026-11-17 at 16:00 Europe/Athens

Raw link: https://www.youtube.com/watch?v=Lb1WfF4iRNA

[ The stream will be recorded. You can watch it later. ]

Today I will implement some new features for my Emacs configuration. I will include the final code on my website, as an update to this publication.

As usual, I will keep the chat open and shall answer all questions.

UPDATE 2026-11-17 18:52 +0200: Pasting the code.

UPDATE 2026-11-17 19:24 +0200: I forgot the prot-text part.

UPDATE 2026-11-20 11:04 +0200: I decided to remove the rgrep call because I never liked its behaviour.

The code I wrote during the livestream

Custom Org link types

;;;; Custom link types

(defcustom prot-org-grep-directory org-directory
  "Directory where prot-grep links search in with `rgrep'."
  :type 'directory)

(defun prot-org-grep-follow (query &rest _)
  "Use QUERY to `rgrep' the `prot-org-grep-directory'."
  (let* ((current-file (file-name-nondirectory buffer-file-name))
         (grep-find-ignored-files (append (list current-file) grep-find-ignored-files))
         (heading (format "\\*+[\s\t]+\\<%s\\>" query)))
    (compilation-start
     (concat
      "find " prot-org-grep-directory
      " -path " (shell-quote-argument "*/.git") " -prune "
      " -o -type f "
      " -iname \"*.org\""
      " -exec grep -inHER --color=auto " (shell-quote-argument heading) " "
      (shell-quote-argument "{}")
      " " (shell-quote-argument "+"))
     'grep-mode
     (lambda (_mode) (format "*prot-dired-grep-marked for `%s'*" query))
     t)))

(defvar prot-org-grep-complete-history nil
  "Minibuffer history for `prot-org-grep-complete'.")

(defun prot-org-grep-complete (&rest _)
  "Complete prot-grep link types using `prot-org-grep-complete-history'."
  (let* ((default (car prot-org-grep-complete-history))
         (input (completing-read
                 (format-prompt "Text to search in `prot-org-grep-directory'" default)
                 prot-org-grep-complete-history nil nil nil
                 'prot-org-grep-complete-history default)))
    (format "prot-grep:%s" input)))

(defun prot-org-grep-export (query &rest _)
  "Export prot-grep link types."
  (format "[ Prot Grep for: %s ]" (or query "")))

(defface prot-org-grep-link
  '((t :inherit success :underline t))
  "Face for prot-grep link type links.")

(org-link-set-parameters
 "prot-grep"
 :follow #'prot-org-grep-follow
 :complete #'prot-org-grep-complete
 :export #'prot-org-grep-export
 :face 'prot-org-grep-link)

;;;###autoload
(defun prot-org-insert-grep-link (query)
  "Insert prot-grep link for QUERY.
When called interactively, prompt for QUERY.  Else QUERY is a string."
  (interactive (list (prot-org-grep-complete)))
  (when (or (null query)
            (string-blank-p query))
    (error "The QUERY cannot be nil or an empty string"))
  (insert (format "[[%s]]" query)))

;; TODO 2026-11-17: I want to add an "until" logic.
(defvar prot-org-meetings-link-regexp
  "\\`\\([A-Za-z]+\\) since \\([0-9]\\{,4\\}-[0-9]\\{,2\\}-[0-9]\\{,2\\}\\)"
  "Regular expression for the contents of prot-meetings links.")

(defun prot-org-meetings-sort (entries)
  "Sort the ENTRIES from oldest to newest.
ENTRIES is a list of plists of the following form:

    (list
     :heading HEADING
     :text TEXT
     :time HEADING-TIME-OBJECT)"
  (sort
   entries
   (lambda (entry1 entry2)
     (< (plist-get entry1 :time)
        (plist-get entry2 :time)))))

(defun prot-org-meetings-display-buffer (entries title)
  "Display ENTRIES of `prot-org-meetings-follow'.
ENTRIES is a list of plists of the following form:

    (list
     :heading HEADING
     :text TEXT
     :time HEADING-TIME-OBJECT)

Sort ENTRIES with `prot-org-meetings-sort'."
  (let ((buffer (get-buffer-create "*prot-org-meetings*")))
    (with-current-buffer buffer
      (save-excursion
        (erase-buffer)
        (unless (eq major-mode 'org-mode)
          (org-mode))
        (insert (format "#+title: %s" title))
        (insert "\n\n")
        (setq entries (prot-org-meetings-sort entries))
        (dolist (entry entries)
          (insert (format "* %s\n%s"
                          (plist-get entry :heading)
                          (plist-get entry :text)))
          (insert "\n\n"))))
    (display-buffer buffer)))

(defcustom prot-org-meetings-file org-default-notes-file
  "The path to the file where prot-meetings links search in."
  :type 'file)

(defun prot-org-meetings-follow (query &rest _)
  "Find headings with meetings that match QUERY.
QUERY matches `prot-org-meetings-link-regexp'."
  (if (string-match prot-org-meetings-link-regexp query)
      ;; TODO 2026-11-17: I want an "until" logic which will also go
      ;; into the `prot-org-meetings-link-regexp'.
      (let* ((name (match-string 1 query))
             (since (match-string 2 query))
             (since-timestamp (format "[%s]" since))
             (since-time-object (prot-org--timestamp-to-time since-timestamp))
             (title (format "Meetings with %s" query))
             (entries nil))
        (with-temp-buffer
          (unless (file-exists-p prot-org-meetings-file)
            (error "The file `%s' does not exist" prot-org-meetings-file))
          (insert-file-contents prot-org-meetings-file)
          (org-mode)
          ;; TODO 2026-11-17: I want to match only DONE headings.
          ;; TODO 2026-11-17: I want to get the CLOSED timestamp as well.
          (org-map-entries
           (lambda ()
             (when-let* ((heading (org-get-heading :no-tags :no-todo :no-priority :no-comment))
                         (_ (string-match-p name heading))
                         (heading-timestamp (or (org-entry-get nil "DEADLINE")
                                                (org-entry-get nil "SCHEDULED")))
                         (heading-time-object (prot-org--timestamp-to-time heading-timestamp))
                         (_ (>= heading-time-object since-time-object))
                         (text (org-get-entry))
                         (entry (list
                                 :heading heading
                                 :text text
                                 :time heading-time-object)))
               (push entry entries))))
          (if entries
              (prot-org-meetings-display-buffer entries title)
            (user-error "There are no matching entries"))))
    (error "The query `%s' does not match `prot-org-meetings-link-regexp'" query)))

(defface prot-org-meetings-link
  '((t :inherit warning :underline t))
  "Face for prot-meetings link type links.")

;; TODO 2026-11-17: I want to implement a `:complete' and an `:export' parameter.
(org-link-set-parameters
 "prot-meetings"
 :follow #'prot-org-meetings-follow
 :face 'prot-org-meetings-link)

(defvar prot-org-meetings-person-prompt-history nil
  "Minibuffer history for `prot-org-meetings-person-prompt'.")

(defun prot-org-meetings-person-prompt ()
  "Prompt for a person for prot-meetings link type."
  (let ((default (car prot-org-meetings-person-prompt-history)))
    (completing-read
     (format-prompt "Meetings with PERSON" default)
     prot-org-meetings-person-prompt-history nil nil nil
     'prot-org-meetings-person-prompt-history default)))

;;;###autoload
(defun prot-org-meetings-insert (person date)
  "Insert prot-meetings link for PERSON since DATE."
  (interactive
   (list
    (prot-org-meetings-person-prompt)
    (org-read-date)))
  (when (or (null person)
            (string-blank-p person))
    (error "The PERSON cannot be nil or an empty string"))
  (when (or (null date)
            (string-blank-p date))
    (error "The DATE cannot be nil or an empty string"))
  (insert (format "[[prot-meetings:%s since %s]]" person date)))

Indent text-mode region

(defun prot-text-insert-prefix (prefix string)
  "Prepend PREFIX to every line of STRING."
  (with-temp-buffer
    (insert string)
    (goto-char (point-min))
    (insert prefix)
    (while (and (forward-line 1)
                (not (eobp)))
      (goto-char (line-beginning-position))
      (insert prefix))
    (buffer-string)))

(defmacro prot-text-define-prefix-command (scope prefix)
  "Define command with SCOPE to insert PREFIX to string.
SCOPE is a string that describes what the command will do.  PREFIX is
the prefix as a string.

The command will target the text between `region-beginning' and
`region-end'.  It will produce and error if the region is not active."
  `(defun ,(intern (format "prot-text-prefix-%s" scope)) (beginning end)
     ,(format
       "Add prefix `%s' to text between BEGINNING and END positions.
Report an error if the region is not active."
       prefix)
     (interactive
      (if (use-region-p)
          (list (region-beginning) (region-end))
        (error "The region is not active")))
     (when (= beginning end)
       (error "The BEGINNING and END cannot be equal"))
     (let* ((text (buffer-substring beginning end))
            (replacement (prot-text-insert-prefix ,prefix text)))
       (replace-region-contents beginning end replacement))))

;;;###autoload (autoload 'prot-text-prefix-blockquote "prot-text" nil t)
;;;###autoload (autoload 'prot-text-prefix-indent "prot-text" nil t)
(prot-text-define-prefix-command blockquote "> ")
(prot-text-define-prefix-command indent "    ")

(defvar-keymap prot-text-prefix-leader-map
  :doc "Commands to insert prefix to the active region text."
  :prefix 'prot-text-prefix-leader
  "b" #'prot-text-prefix-blockquote
  "i" #'prot-text-prefix-indent)

Emacs configuration

My personal Emacs configuration. It is comprehensive, both in terms of the [custom] code it contains as well as the documentation on what each piece of functionality does.


🔷 Consider making a donation.

-1:-- Emacs live Org custom link type and more today 2026-11-17 at 16:00 Europe/Athens (Post Protesilaos)--L0--C0--2026-11-17T00:00:00.000Z

Marcin Borkowski: Copying the current location improved again

Last year I improved my code for copying the current location to the kill ring. Recently it occurred to me that this was not the last word. In fact, I’m pretty surprised I didn’t think of it earlier – it’s sort of obvious in hindsight. The idea is that it should copy the range of lines when the region is active.
-1:-- Copying the current location improved again (Post Marcin Borkowski)--L0--C0--2026-11-16T21:33:34.000Z

Irreal: EWW As The Default Buffer

As most of you know, I’m one of those people striving to move as much as possible into Emacs. I’ve mostly succeeded in that except for the usual sticking point: the browser. No modern browser will run in Emacs and I’m not sure that we’d want one to. Still, it would be nice to be able to do all or most of our browsing tasks from with Emacs.

There is, of course, EWW. It does a pretty good job of displaying text and images but has no JavaScript support. Some of us consider that a feature. It turns out that most of what JavaScript does isn’t really necessary and merely gets in the way.

Joshua Blais has taken using EWW a step further and made EWW his default browswer. That means that whenever he clicks on a URL and certain other links, the link is opened in EWW or—for special links—in another application that runs in Emacs. The point is, all browser activity starts in Emacs, usually in EWW.

Of course, Emacs can’t handle every browsing task so Blais uses the & key in EWW to escape to a “normal” browser. Blais says that EWW suffices for 85–90 percent of his use cases. He has some functions to kick off Emacs apps for MP4, PDF, and other specialized links. Everything else goes to EWW. He’s added a couple of custom bindings for EWW functions he uses a lot but it’s mostly a normal EWW instance.

Blais’ experiment shows that it is possible to almost browse from within Emacs. Sites that rely on JavaScript in an essential way are not going to work of course, and there are still a lot sites that insist on JavaScript so they can enforce the delivery of ads or implement a pay wall. Blais’ method gives us a chance to consider if those sites are worth viewing.

-1:-- EWW As The Default Buffer (Post Irreal)--L0--C0--2026-11-16T15:42:36.000Z

Sacha Chua: 2026-11-16 Emacs news

: Added OrgDevMeetup on Nov 21

I liked reading the Emacs Carnival posts about how people discover new features and what things they've tried lately. Feel free to share your story.

Also, the Emacs 31.1.90 pretest is available (note Irreal's post about typos). Please help test it if you can!

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, Mastodon #emacs, Bluesky #emacs, Hacker News, lobste.rs, programming.dev, lemmy.world, lemmy.ml, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar, and emacs-devel. Thanks to Andrés Ramírez for emacs-devel links. Do you have an Emacs-related link or announcement? Please e-mail me at sacha@sachachua.com. Thank you!

View Org source for this post

You can e-mail me at sacha@sachachua.com.

-1:-- 2026-11-16 Emacs news (Post Sacha Chua)--L0--C0--2026-11-16T13:07:30.000Z

Matt Maguire: My AI Teaching Setup, Part 0: A Life in Plain Text

This is the first of a few articles about the AI system I use for teaching maths. Basically, ten months ago I decided to buy an AI subscription to learn more about the technology, and today I run a small fleet of machines and agents that draft my lessons, check my exams, index my syllabus, and argue with me about design at midnight. This first article is about the recent years before any of that, because it turns out to be the part that made everything else possible.

-1:-- My AI Teaching Setup, Part 0: A Life in Plain Text (Post Matt Maguire)--L0--C0--2026-11-16T00:00:00.000Z

Matt Maguire: My AI Teaching Setup, Part 3: The Organs

Part 2 was about models and harnesses. But a model in a harness is still just a clever voice. What turned the setup into a system was the organs: the memory, the senses, and the reflexes bolted on around it. This is the final part, and it starts with a full circle.

The knowledge base that was already ten years old

People ask how I got my teaching knowledge into the AI. The answer is anticlimactic: I didn’t. I had spent a decade writing it in plain text — Org-mode notes, syllabus annotations, lesson reflections, the whole zettelkasten from Part 0 .

-1:-- My AI Teaching Setup, Part 3: The Organs (Post Matt Maguire)--L0--C0--2026-11-16T00:00:00.000Z

Irreal: Vim To Emacs

Over at the Emacs subreddit, Sahkopi4 recounts his journey from Vim to Emacs. Actually, his journey was from Nano to Emacs by way of Vim. When he first started using Linux, Nano was the default editor and he began with that. Eventually he wanted more power and because Vim seemed more popular in the forums he inhabited, he learned Vim. He really like it and the power that it brought him was an eyeopener.

He experimented with other Vim-like implementations but they didn’t work for him so he stuck with Vim. Eventually he tried Emacs and almost immediately became a convert. Like me, he jumped right in and didn’t try to use Evil or some other Vim emulation. Like many of us, he loved the experience and now wants to do as much as he can in Emacs.

As always, a lot of the action is in the comments. Many said that immigrants from Vim should use Evil because it gives you the best of both worlds: the modal, composable editing commands of Vim and the power and flexibility of Emacs. Others said that Evil induces a sort of cognitive dissonance where neither system is fully in control.

There is, of course, the occasional post proclaiming loudly that Emacs is no good because it uses Lisp with all those parentheses. The ankle biting aside, the comments offer an intelligent and useful commentary on Sahkopi4’s journey.

-1:-- Vim To Emacs (Post Irreal)--L0--C0--2026-11-15T15:58:46.000Z

Alvaro Ramirez: My Emacs 31 contributions

For me, landing changes in Emacs upstream always felt somewhat out of reach, so I kinda postponed it for a long while. Perhaps the biggest hurdle was getting over the process to assign copyright to the Free Software Foundation, which does feel a bit archaic (download, sign, and return a PDF) and slow (mostly waiting for an email response), though hey, I have nothing but sympathy. Open source is unsustainably tricky. As consumers, we often like free as in freedom and free as in beer, but neither pay the bills. We hope some company steps in to fund these projects, but that rarely happens. As a result, most open source projects are starved (even popular ones), run by volunteers working for free.

All that is to say, if the upstream Emacs contribution/onboarding process seems less than ideal, cut it some slack. The project as a whole primarily runs on the blood, sweat, and tears of unpaid contributors. If you can, fund the maintainers you rely on (or better yet, get your employer to do so).

If you've been thinking of contributing to Emacs upstream, don't procrastinate like me and just give it a try. Compared to the typical GitHub pull-request process, your first Emacs contribution may feel a little daunting and dated, but there's a lovely fuzzy light at the end of the tunnel. You see, Emacs has been around for 50 years. Very few software projects get to live this long. Landing contributions on a project with such a rich history is a real treat!

But I digress… Let's get moving. Once I got over procrastinating, I finally got a handful of small contributions landed on the master branch. Thank you, Eli Zaretskii, Stefan Kangas, and Gerd Möllmann, for your help. From then on, I eagerly waited for them to formally make it to a stable release.

Emacs 31 shipped the lot.

Hide Dired's absolute location

I do enjoy a visual (and functional) tweak here and there, and a Dired tweak felt small enough to be the perfect candidate for my very first Emacs contribution.

With that in mind, I tweaked dired-hide-details-mode by adding the dired-hide-details-hide-absolute-location user option, which hides the directory's absolute path, typically displayed at the top of Dired buffers (bug#72272, commit).

More on this in my Hide another detail post.

macOS speech recognition permission

At some point, I ran into a snag trying to run macosrec from my beloved eshell. The process just crashed with a cryptic abort trap: 6, so the issue wasn't super obvious. It turned out the utility required granting an OS permission that can only be requested by the host app (Emacs) if it includes the relevant description in its Info.plist file.

As of version 31, Emacs includes NSSpeechRecognitionUsageDescription in its Info.plist (bug#72827, commit).

Send to… (aka macOS sharing)

context-menu-mode now includes a "Send to…" item, enabling sending the current file(s) or region text to external apps or services. You can also invoke M-x send-to directly. On macOS, it's powered by the native sharing picker (I use it frequently to AirDrop things to my iPhone). Elsewhere, it falls back to shell-command-do-open (bug#76120, commit, follow-up fix). These two implementations plug into new generic plumbing (send-to-handlers), so you could, for instance, add a handler sharing via Android's native share sheet (android-browse-url can do the heavy lifting) or KDE Connect on Linux (kdeconnect-cli --share).

More in my Emacs send-to (aka macOS sharing) merged upstream post.

macOS dictation is back

Emacs 30 lost macOS dictation when migrating to NSTextInputClient. Implementing selectedRange in nsterm.m brought it back (bug#79070, commit). With LLMs/agents being a thing these days, dictating into your Emacs buffer may be just the thing to complement your AI workflow.

I covered this in my macOS dictation returns to Emacs (fix merged) post.

Make it all sustainable

Are you getting value from any of my upstreamed changes or my Emacs packages? Please consider sponsoring to keep the work going. While my patches may seem relatively straightforward, some took quite a bit of effort to land upstream.

My Emacs work not your cup of tea? No worries. As mentioned earlier, sponsor the maintainers you rely on instead.

-1:-- My Emacs 31 contributions (Post Alvaro Ramirez)--L0--C0--2026-11-15T00:00:00.000Z

Tim McGilchrist: curry: a modern Emacs mode for Haskell

curry: a modern Emacs mode for Haskell

Back in April I wrote about a month of Elisp and finished by mentioning that, having experienced neocaml (a modern Emacs mode for OCaml), I'd started writing a tree-sitter powered Emacs package for Haskell. That package is curry-mode, and I'm releasing version 0.1.0.

curry-mode is a major mode for Haskell built on Emacs's built-in tree-sitter support. It provides font-locking (Emacs-speak for syntax highlighting), indentation, navigation, imenu (the buffer index you navigate with), a REPL (read-eval-print loop) using GHCi, the interactive environment of the Glasgow Haskell Compiler (GHC), and Cabal integration, and hands everything semantic (completion, go-to-definition, types on hover, code actions) to the Haskell Language Server (HLS) via Eglot, the client for the Language Server Protocol (LSP) built into Emacs.

Why another Haskell mode?

I started out using Emacs at University on SunOS SPARC machines. At the time I learnt both of the viable editors, vi and Emacs, but leant towards Emacs because of how far you could customise it. Over the years I've mostly used other people's packages and configuration, with detours into IDEs when Java or Scala demanded it. I'd never built a large mode from scratch, and the best way I know to learn something is by doing it.

There is already an official haskell-mode with many users and many features, so why build a new one? haskell-mode has grown complex over the years, bundling everything from indentation to a REPL to HLS interaction in one monolith. It has to, since it predates both tree-sitter in Emacs and language servers. With tree-sitter built into Emacs 29+ and HLS providing the semantic features over LSP, a modern Haskell mode can be dramatically simpler.

I'm not the first person to think this. haskell-mode issue #1804 collects the attempts at a tree-sitter powered major mode for Haskell, including two separate haskell-ts-mode packages. There is erikbackman/haskell-ts-mode, which is now archived, and pranshu/haskell-ts-mode. Neither attempt became popular enough to sustain the effort, and I thought I could do a better job by following the architecture of bbatsov's neocaml.

That architecture is a mode built in layers. At the bottom, curry-mode provides the syntax layer with highlighting, indentation, navigation and imenu, all from the tree-sitter AST, and works with nothing else installed. On top of that, HLS via Eglot adds the semantic layer with completion, types, diagnostics, code actions and formatting. All the good things you expect from an LSP.

Each layer should be useful on its own and each one above improves on, or replaces, what the layer below provides. You shouldn't need a running language server before Emacs can indent your code. If things go well, perhaps some of this can be folded back into haskell-mode once it no longer needs to support Emacs versions before 29.

What's in a name

Naming is hard, and realistically this mode should be haskell-ts-mode the third, but that is a really terrible choice. Instead I named it after Haskell Curry, after whom both the language and the concept of currying are named. A delightfully intertwined name, I think.

Standing on neocaml's shoulders

I closely modelled curry-mode on neocaml (and its sibling fsharp-ts-mode), so the packages share plenty of structural and stylistic similarities. Perhaps that's not surprising, since both are statically typed languages with an ML heritage. Borrowing his good ideas let me quickly tick off the basics, like a base mode with language-specific derived modes, the REPL integration pattern, and the build tool interaction pattern. Even imenu, code folding and navigation from tree-sitter started as fairly direct translations of the neocaml code. Hopefully bbatsov is fine with that.

bbatsov has also written up Building Emacs major modes with tree-sitter: lessons learned, which covers many of the same lessons I learnt the hard way. If you're thinking of writing a tree-sitter mode, read that first. If only I'd checked his blog sooner it would have saved me some time.

So let's skip the similarities and talk about what's different about Haskell.

What you get

The 0.1.0 release covers the most common things you'd need in day to day Haskell work:

  • Font-locking with 4 levels of detail for .hs, .hsc and .hs-boot files.
  • Indentation from tree-sitter rules, with region shifting (C-c > / C-c <) and the indentation offset guessed from the existing code.
  • Navigation by definition (C-M-a / C-M-e), by expression (C-M-f / C-M-b), by top-level declaration (M-a / M-e on Emacs 30+), and a jump to the import block and back (M-g i).
  • Imenu grouped into functions, types, classes, instances and imports.
  • A GHCi REPL (curry-repl) with tree-sitter highlighting of what you type, and commands to send definitions, regions or the whole buffer, reload, and ask for :type and :info at point.
  • Cabal integration with curry-cabal-mode for .cabal files, formatting with the cabal-fmt or cabal-gild formatters, and commands to run cabal build, test, run, repl and haddock (Haskell's documentation generator) from any Haskell buffer.
  • GHC errors in M-x compile output, so M-g n / M-g p jump to the source location.
  • Eglot registration for haskell-language-server.
  • Debugging with dape, an Emacs debugger client, and Well-Typed's haskell-debugger (experimental, needs GHC 9.14+).

curry-mode doesn't provide completion, type lookup, Hoogle search (the Haskell API search engine), documentation browsing or code actions. HLS does those better than any Elisp I could write.

How much simpler?

I was curious whether "dramatically simpler" was true, so I counted lines. curry-mode is about 2,100 lines of Elisp against just over 20,000 for haskell-mode, roughly 10 times smaller. That number is a bit misleading, since haskell-mode includes plenty that curry-mode hands to HLS. Comparing the features both modes actually implement is a fairer comparison:

Concern haskell-mode curry-mode Ratio
Font-locking 1,219 122 ~10x
Indentation 2,870 190 ~15x
REPL 2,019 357 ~6x
Cabal 1,228 611 ~2x
Mode, navigation, imenu 1,874 837 ~2x

Tree-sitter shows up clearly in the first two rows. haskell-mode includes a hand-written lexer (haskell-lexeme.el) that copes with the layout rule, string gaps, character literals and pragmas, and adds font-lock keywords on top of it. curry-mode asks the tree-sitter syntax tree instead, and around 120 lines of treesit-font-lock-rules cover all four levels. For indentation, haskell-mode ships two indenters (haskell-indent and haskell-indentation), because Haskell layout is hard enough that neither one alone was enough. curry-mode has about 190 lines of treesit-simple-indent-rules. Again there is a gap in functionality in the indentation but really I think most developers would be better served by an external tool.

The REPL and Cabal savings come from leaning on what Emacs already provides (comint, compile) and on external tools like cabal-fmt, rather than from tree-sitter.

Working with tree-sitter

Most of the size difference comes from tree-sitter. Once you have a syntax tree, font-locking is a set of queries (patterns matched against nodes in the tree) rather than a pile of regular expressions, and the same tree gives you navigation, imenu, folding and Combobulate support with little extra code. Combobulate is a package for structured navigation and editing that works across any language with a tree-sitter grammar. It also makes new features easier to add. Want to find all the tests in a file using the Tasty test framework? That's a query over the tree, not a parser you write yourself.

The Haskell grammar story is a little fragmented, though. The official tree-sitter/tree-sitter-haskell is missing many bug fixes and newer GHC features. tek/tree-sitter-haskell applies most of those fixes and is active, but doesn't commit the generated C parser that Emacs needs to build the grammar. So curry-mode uses my fork of tek's, which adds the generated parser files, and installs it for you. I chose tek's grammar because it has the best language coverage, but I'd love for the fork to become unnecessary.

That leads to my bigger point, which is that a tree-sitter grammar is no longer optional for a language. GitHub code navigation, Emacs, Neovim, Helix, Zed and plenty of other tools are built on tree-sitter, so a good grammar matters as much as a good standard library or build tool. Ideally the grammar would track each GHC release, or even be mechanically derived from GHC's own parser. GHC Haskell keeps growing new syntax, and keeping editors working across versions raises the same problems that Trees that Grow, the extensible AST design used inside GHC, tackles for the compiler.

I hit a few rough edges along the way. Tree-sitter ABI (application binary interface) versions are confusing. Emacs often supports ABI 14 as the lowest version, but you can build grammars with ABI 15, and since ABI 15 isn't backwards compatible with 14, loading the wrong one will SEGV your Emacs. curry-mode now checks the version of libtree-sitter (the tree-sitter C library Emacs is linked against) and gives a clear error instead. Grammar releases also tend to follow the tree-sitter tooling version rather than semver, so a minor version bump can bring major headaches. Finally, with tree-sitter the AST is your API, and an AST is never going to be particularly stable, so curry-mode warns you when the installed grammar is older than the one it expects.

Indentation

Haskell is whitespace sensitive, which makes indentation the hardest part of any Haskell mode. Unlike most languages, there is often more than one valid indentation for a line, and they mean different things. The first rule for curry-mode is to do no harm, so indenting a line should never break a program that was already correct. Beyond that, the tree-sitter rules aim to cover the common layouts like do, where, let, case, guards, records and the rest of the everyday code I write. Where the rules get it wrong there is an escape hatch. curry-cycle-indent switches to indent-relative, which lines up with the previous line, and region shifting moves a block by one level.

Some cases are still hard (NondecreasingIndentation, CPP blocks, and edits that change the parse tree as you type), and the roadmap lists them as known issues. Getting a whole file into the right shape is a job for a formatter like ormolu or fourmolu, which you can already run through HLS with eglot-format-buffer. This is another place where curry-mode provides a usable base and leaves the heavy lifting to the tool that's best at it.

Trying it out

curry-mode needs Emacs 29.1 or newer, built against libtree-sitter 0.25 or newer. On Emacs 30 you can install it from GitHub with use-package:

(use-package curry-mode
  :vc (:url "https://github.com/tmcgilchrist/curry-mode" :rev :newest))

On Emacs 29, use M-x package-vc-install RET https://github.com/tmcgilchrist/curry-mode.

The Haskell tree-sitter grammar is installed automatically the first time you open a Haskell file, or you can run M-x curry-install-grammars yourself. For the semantic features, install HLS (for example with ghcup install hls) and run M-x eglot in a Haskell buffer.

The README has the details on key bindings, font-lock levels and configuration options.

What's next?

How mature is curry-mode? It covers what I need for my Haskell work, and I've been using it daily. The grammar could use polish to keep up with the ever-growing syntax of GHC Haskell, the font-locking needs tuning to look just right, and I'm sure there are corners of Haskell I haven't touched. The roadmap collects ideas for where it could go next, from formatter integration to running the right test from point. I also want to build out the higher layers. I have a branch adding Combobulate support for Haskell (PR #12), which adds structured editing on top of the same syntax tree, and debugging with dape needs more use before it moves past experimental.

Most of the hacking for this release is done, and I'm going to spend time on other projects for a while. Perhaps people will find curry-mode useful and borrow the code for haskell-mode, or enough people will use it that it lives on as a modern Haskell mode for Emacs. Please try it out and report issues for anything that breaks.

Contributions, bug reports, suggestions and feedback are most welcome. Remember, Emacs can be whatever you make of it.

Tags: haskell, emacs, tree-sitter

-1:-- curry: a modern Emacs mode for Haskell (Post Tim McGilchrist)--L0--C0--2026-11-15T00:00:00.000Z

Irreal: Setting The Timezone In Emacs

Charles Choi has a nice hint for those of you who travel and phone home with Emacs. Here’s the situation: you are travelling and log into your home server with SSH and emacsclient. It’s wonderful. Just like being at home except the date/time stamp is wrong. The time and date are whatever your home server thinks they are but you want them to be local time.

The answer is simple. You simply need to change the TZ (timezone) environment variable to reflect your current location. For example, if you’ve travelled to New York (in the US) you would set TZ to “America/New_York”. Emacs, of course, provides a command to do this: (setenv "TZ" "America/New_York").

The zone codes can be a bit opaque so Choi has added a command to the latest Casual suite to set the TZ variable complete with completion. Take a look at his post if you’re interested.

-1:-- Setting The Timezone In Emacs (Post Irreal)--L0--C0--2026-11-14T15:37:33.000Z

Please note that planet.emacslife.com aggregates blogs, and blog authors might mention or link to nonfree things. To add a feed to this page, please e-mail the RSS or ATOM feed URL to sacha@sachachua.com . Thank you!