2026-06-15 Emacs news

| emacs, emacs-news

Lots of discussion around Karthik's latest blog post Even More Batteries Included with Emacs (Reddit, HN, lobste.rs). Check it out!

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

La semaine du 1 au 7 juin

| french

lundi le premier juin

Ma fille a séché les cours et elle n'a pas non plus voulu aller à son cours de gymnastique parce qu'elle a eu une mauvaise nuit et elle était toujours grincheuse.

Au lieu de la harceler, j'ai travaillé sur des transcriptions et sur mon bulletin d'information sur Emacs. J'ai écrit des fonctions pour comparer les mots et effacer les étendues qui correspondent avec les mots effacés.

Après avoir lu dans sa chambre pendant longtemps, elle a finalement réapparu de bonne humeur. Elle et moi avons préparé du sushi pour le dîner. Ensuite, nous avons joué au Scrabble dehors.

Elle a porté sa prothèse oculaire toute seule. Elle a dit qu'elle l'a fait pour elle-même. Je pense que l'autonomie est très importante pour ma fille.

Nous avons fait du vélo à la cour de récréation avec son amie, où nous avons rejoint d'autres amies. De temps en temps, ma fille était surstimulée. Quand ça arrivait, elle a joué au Scrabble avec moi et la nourrice de ses amies. Après qu'une de ses amies soit partie, nous sommes allées à l'autre cour de récréation pour jouer encore.

mardi 3

Ma fille a participé à l'école ce matin même s'il y avait un remplaçant, mais elle n'a pas voulu y participer l'après-midi. Nous sommes assises dehors et nous avons travaillé sur ses devoirs. Nous avons vu des pics.

J'ai emmené ma fille au parc pour jouer avec ses amis. Elle a aimé faire du vélo autour du parc avec ses amis et sans adultes. Ils ont aussi fait du vélo autour de la pataugeoire qui était sèche parce qu'elle n'était pas encore ouverte. Ils tournaient en rond.

J'ai fait l'erreur de jouer à mon jeu de Tileman Reworked près de ma fille. Elle a voulu m'aider, bien. Elle a recueilli les citrouilles et les canneberges, bien. Elle a commencé à couper l'herbe près des récoltes, euh… J'ai essayé d'expliquer qu'il ne fallait pas la couper, mais elle est devenue grincheuse parce que je la corrigeais. Elle m'a dit qu'elle voulait seulement m'aider et elle est partie furieuse. Ce n'est pas grave. Je pense que cette ferme est trop compliquée pour elle pour le moment. Notre ferme habituelle est meilleure. J'apprécie qu'elle ait voulu m'aider, et c'était juste un jeu. C'est aussi bien si elle apprend comment coopérer.

J'ai commencé à réécrire la transcription de la conversation entre ma sœur et notre cousine.

jeudi 4

J'ai discuté d'Emacs avec Ben Zanin. Il a partagé sa configuration sur elfeed, la musique, et d'autres sujets.

J'ai travaillé comme consultante. J'ai pris un cours de formation.

Ma fille et moi avons fait du vélo au parc. Nous avons joué à la pataugeoire et au bac à sable. Nous avons improvisé des histoires de Donjons et Dragons avec les dés sur mon smartphone.

J'ai discuté avec mes sœurs et quelques personnes des assurances-vie de ma mère. Notre accès au compte bancaire sera limité si ma sœur décède, donc il vaut mieux que nous fassions la paperasse maintenant.

vendredi 5

J'ai eu ma première session de la conversation avec mon tuteur aujourd'hui ! À mon grand étonnement, j'ai pu suivre assez de ses mots et j'ai pu expliquer mes pensées ( avec une mauvaise grammaire, bien sûr ). Je sais qu'il fallait que je m'entraîne à penser en français au lieu de traduire de l'anglais, donc davantage parler, davantage apprendre. C'est un exercice intense. J'avais transpiré. Nous avons réussi à parler de la programmation, des études à l'université, le travail, la vie, et d'autres sujets.

J'ai augmenté le stockage pour les vidéos de ma sœur.

J'ai signé la paperasse pour les assurances-vie.

J'ai appelé ma mère et je l'ai informée de la paperasse.

samedi 6

J'ai téléchargé encore d'autres vidéos de ma sœur.

Nous avons joué aux Donjons et Dragons avec ses tantes et ses cousines. Ma fille était la meneuse de jeu pour une partie de la session. Nous avons cherché une petite chèvre perdue, et nous avons combattu quatre bandits déguisés en gardes.

Nous avons fait des mochis.

J'ai payé la pénalité pour la soumission en retard du bilan de vérification du revenu étranger que je n'ai pas pu finir l'année précédente parce que le banquier était peu communicatif. Tant pis. Je pense que si ça arrive encore, je dois le soumettre avec ma meilleure estimation.

Dans mon jeu Tileman Reworked de Stardew Valley, j'ai finalement accédé à la boutique de Willy, le pêcheur. C'était le dernier jour d'automne de la quatrième année.

J'ai travaillé comme consultante. J'ai analysé des mises à jour.

dimanche 7

J'ai emmené ma fille chez le perceur pour examiner ses oreilles. Le perceur nous a dit qu'elle avait l'autorisation de changer pour de nouvelles boucles d'oreilles. Sur le chemin du retour, nous avons fait une promenade dans le parc.

J'ai emmené ma fille au Dufferin Mall pour sélectionner des boucles d'oreilles. Après quelques comparaisons, ma fille a opté pour des clous d'oreilles en acier plaqué or avec des pierres moyennes chez New Steel. C'était bon marché.

J'ai fini de coudre la robe de ma fille. Elle voulait me coudre une robe, donc j'ai préparé des pièces pour elle. Il vaut mieux que j'utilise beaucoup d'épingles et que je trace une ligne à la craie.

View Org source for this post

From DC Toedt: Copy Org Mode as Markdown

Posted: - Modified: | emacs, org

: Add embark way to do things.

DC Toedt is a lawyer and professor of practice who uses Emacs and Org Mode. He wanted a small Emacs Lisp function to convert Org Mode syntax to Markdown and copy it to the clipboard to make it easier to copy the materials he's writing for a course on contract drafting. This seems to be a common need, and here are several other approaches:

Anyway, DC shared how he used Claude to generate a simple function to do it, which is here under public domain:

(defun my/org-to-markdown-clipboard ()
  "Export org region (or buffer) to Markdown and copy to clipboard.
With no active region, exports the whole buffer."
  (interactive)
  (require 'ox-md)
  (let* ((text (if (use-region-p)
                   (buffer-substring-no-properties (region-beginning)
(region-end))
                 (buffer-substring-no-properties (point-min) (point-max))))
         (md (org-export-string-as text 'md t '(:with-toc nil
                                                :with-author nil
                                                :with-date nil
                                                :with-title nil))))
    (kill-new md)
    (message "Markdown copied (%d chars)" (length md))))
(with-eval-after-load 'org
  (define-key org-mode-map (kbd "C-c m") #'my/org-to-markdown-clipboard))
View Org source for this post

Yay Emacs 33: Sacha and Prot Talk Emacs: Built-ins

Posted: - Modified: | emacs, yay-emacs

: Updated transcript

I chatted with Prot about the Emacs Carnival June 2026 topic Underappreciated Emacs Built-ins. Thanks to Ross A. Baker for hosting the carnival!

View in the Internet Archive, watch or comment on YouTube, read the transcript online, download the transcript, or e-mail me.

Related links:

Chapters

  • 0:00 Starting up
  • 2:27 Focus and distraction
  • 3:54 Org Mode and other note-taking, task-management systems
  • 4:58 Kill ring
  • 6:50 Registers
  • 9:58 Narrowing
  • 12:04 org-narrow-to-subtree
  • 12:13 narrow-to-defun
  • 13:19 Indirect buffers
  • 14:50 Undoing within a region
  • 15:53 Bookmarks
  • 17:41 isearch
  • 18:21 Tip: Add a counter to isearch
  • 19:26 C-x C-x (exchange-point-and-mark)
  • 20:55 Popping to marks - going back to where you were
  • 21:49 Selecting what you just pasted
  • 22:33 Indenting pasted or selected text with indent-rigidly
  • 23:24 Popping to mark after xref or imenu
  • 24:05 Adding other packages like consult
  • 24:44 Tip about indicating isearch wrapping
  • 25:26 Navigating by sentence or s-expression
  • 27:45 Navigating to other errors
  • 28:29 Tags
  • 28:47 Imenu
  • 30:19 Projects
  • 32:10 Putting projects in tabs or frames
  • 32:35 Tabs
  • 34:41 Navigating frames
  • 36:07 These navigation shortcuts work for prose, too
  • 37:09 follow-mode
  • 37:50 Ediff
  • 42:12 Calling functions by name
  • 42:52 Completion
  • 44:13 Manuals
  • 45:57 Menus
  • 47:46 Automation - abbreviations
  • 49:56 Quoting the next character with C-q
  • 50:31 Mapping abbreviations to code
  • 51:51 Taking notes with org-capture
  • 52:08 Navigating back to captures or refiles
  • 53:49 dabbrev
  • 54:44 Keyboard macros
  • 57:52 Editable grep and occur
  • 1:01:01 Emacs Carnival June 2026: Underappreciated built-ins

Transcript

Expand this to read the transcript

0:00 Starting up

Sacha: There's a 10-second delay, so I can never quite tell when I'm starting to start, but I think I'm going to do that now. Okay, let's go. Okay, I have pressed the Go Live button. Let's see how it goes. So this is Yay Emacs 33 with Prot: Sacha and Prot Talk Emacs. Today, we're going to be talking about underappreciated Emacs built-ins, which is the theme for this month's Emacs carnival.

Sacha: Kind of like this, you know, shared, lots of people writing or talking about a specific topic. This one is hosted by Ross A. Baker. (Thanks for hosting that!) Anyway, so I'm here with Prot. I was very tempted to just dive into this brain dump like last time about... Let's start with the kinds of problems that newcomers and intermediate users might run into, especially the problems they don't even know about because Emacs would allow them to do things that other editors might not offer. But they've got to think about it first, right? They've got to discover that this is a need of theirs and that Emacs can help them with it. So maybe this conversation can be a high-level discussion of these concepts to help people develop this intuition for what's out there, particularly for the things that Emacs does differently compared to other editors. And if we start with a problem, and I have several that I often run into in my own life, you might suggest others as well. Then we can talk about how the things that are built into Emacs can support that and how they fit together at a high level. We don't have to go into "This is precisely how to start a keyboard macro and how to stop it." People can look that up in the manual. But the idea of a keyboard macro and how it's useful, that would probably be a good thing for a conversation. Then for the advanced users who are listening to this, we can sprinkle in some things we've seen about some really advanced uses of these built-ins, because there's a lot of high-level use that I haven't even got into yet. So Prot is here, which means that because you've got two people, you can see how these same tools can be used in different ways to support different workflows. I'm going to suggest some problems that I have. Of course, you can share some from your experience and from the times that you've coached other people.

2:27 Focus and distraction

Sacha: My main problem with life in general. is focus and distraction. Because I have a kid, my focus time is very unpredictable. It can be interrupted any moment by somebody needing help. My life over the last 10 years has mostly been about five minutes here, 10 minutes there, maybe 15, one hour of focus time if I'm lucky. This is a universal challenge. Well, some people actually get to focus, but my brain is not one of those focusable things. It has to work in stops and starts. Any chance this is a problem that you also run into?

Prot: Not to that extent, but I have the propensity to go down rabbit holes. I will go really deep, like really deep. You give me something which I know nothing about, I will become an expert in it. But of course, this is a problem when you combine it with curiosity, because now you want to learn everything. Thankfully, I have learned to control myself. If you give me something I don't know about, I will say, OK, sounds very tempting, but I will not even try. I won't even go down the rabbit hole.

Sacha: So these are two sides of the same problem, and something that a lot of people will resonate with... When you're working on something and you realize, okay, I've got to go do this other thing first or, oh, I'm curious about this question that has come up in my brain. I want to go down that rabbit hole. How do we manage this? Emacs is here to help.

3:54 Org Mode and other note-taking, task-management systems

Sacha: My first recommendation for this problem is: take advantage of Org Mode or other built-in note-taking task management support systems because it... Sometimes people think, okay, an IDE is just an IDE, right? If they're programmers, it's just for code. Sometimes people are writing. They're using a text editor just for writing their novel. But because Emacs has these built-in ways to support managing your to-dos and all that stuff, it's very easy just to stuff that task in there. Have a quick shortcut to go to your to-do list and put something in. Then it gets out of your brain so that you can try to focus on the thing that you're trying to get done. That's my quick underappreciated... actually, a lot of people really appreciate this, but it's one of those things people coming to Emacs from other editors might not immediately catch on to.

Prot: You might not understand the extent of how valuable it is. It's the gift that keeps giving, basically.

Sacha: Yeah, yeah. When your to-dos and your notes are just a couple of keystrokes away, and they can save the context of whatever you were looking at.

4:58 Kill ring

Sacha: There are all sorts of other small conveniences that Emacs has that also help with distraction and focus. For example, the kill ring. It's such a simple thing, right?

Prot: It's super simple, but super useful. Just to say on the kill ring, it has been part of Emacs for several versions now, but it's not obvious. If you type M-y without C-y beforehand, you get completion. So you can select something that you had in your kill-ring like a few kills ago. Clipboard navigation, which is something that you don't see right away.

Sacha: If people are coming from outside Emacs and they're like, "What is this thing that you're talking about?" People are used to having a clipboard, right? As soon as you copy something, your program forgets the thing that you previously copied. On mobile phones now, if you press paste, you can see a selection of the previous things you've copied before. It's like that, but larger.

Sacha: Prot points out: you can use completion with it. So M-y is yank-pop I think? What I find useful about this is sometimes I'll copy something because I want to go paste it somewhere else, and then on the way to that somewhere else, I get distracted by something, and I need to copy that, but I know that the kill-ring will have the other copies that I meant to put somewhere else.

Prot: By completion here, we mean you can type and match that thing, narrow down to it.

Prot: You don't have to go searching for it and, "Okay, which one exactly is it," right?

Prot: You can find it more easily.

6:50 Registers

Sacha: Registers. It's the other thing that I like to use when I know that I'm copying several things and I need to paste them, possibly in different order.

Sacha: Again, that's another thing that people are like, "What is this thing, even?" Do you find yourself explaining registers to people who are new to Emacs?

Prot: Yes. Registers is something that is underutilized, because of course, why would you need them when you can have a kill-ring with a history, right? Why do I need to store things in a register when I can just have them one after the other in the kill-ring. The answer is because if you do something more advanced, such as with a keyboard macro, it will always be correct. It's precise. It's not "Give me the last thing on the kill ring," or last thing minus two or whatever. Give me that, right, and you specify what that is. It's an expression of intent.

Prot: Plus more advanced things, like incrementing a number or whatever. I think that's super specialized.

Sacha: I don't even use that very much, but I know some people who use that to great effect. So that's one of those little Easter eggs for advanced users. If you're watching this and you're like, okay, I know about these built-ins, but there's more. Emacs has this fractal complexity. It just keeps getting more interesting the more you dig into it. Okay, so, registers. Registers can store text that you're copying, but they can also store other things. I think, like, do you use them for window configurations, Prot?

Prot: I have used them for framesets: frames and their window configurations. If you have three frames and they are split in different ways, you restore that.

Sacha: You can do all of that with just one register.

Prot: With a register, yeah. I have created another register of mine just to see how it works, where it saves a file with a specific location, but it's supposed to be in memory, not like a bookmark. I did it just for testing.

Sacha: I have that too. I use registers to files so that I can jump to things like my Emacs configuration or my notes or something like that. I use that instead of bookmarks so that I can just have a keyboard shortcut go straight to that register. I can do the [jump-to-register] and then I can just easily press one more key to get to the file that I want. So registers, again, if you're not used to Emacs, this is a built-in that's got a lot of features for helping you save text to things, especially if you're going to use them in keyboard macros because you can say, okay, insert text A and then insert text C and then insert text B. But you can also use them for other things like frameset, like the way that your windows and your buffers are arranged, or files that you want to go back to.

9:58 Narrowing

Sacha: Another built-in that I find really helpful for managing my focus and distraction is narrowing. I get distracted by all the other stuff, or I worry about accidentally revealing private information when I am streaming, or something else. So instead I narrow it to just the task that I'm working on or just the function that I'm editing. That's super useful not only for keeping me focused, but also for making sure that my changes don't affect more text than I mean to. If I'm using substitute.el... You can select the region, and a lot of the functions in Emacs will operate only within that region. But reselecting the region several times, if you end up needing to do multiple operations, it's a bit annoying. So instead, I'll just narrow and then it can work on the whole thing.

Prot: Yes. When you narrow, you can also be less careful, in a sense. Like, you do a query-replace, when you do !, it means yes to all, but if you are in a narrowed region, yes to all means only within that portion of the buffer. So if you take care to narrow to where you want to be, then okay yes to all, you don't even have to check.

Sacha: And I think this is underappreciated enough that, in fact, if you try to use… Is it C-x n?

Prot: That's the prefix key. C-x n for narrowing.

Sacha: The first time Emacs will say, are you really, really sure? It's one of those disabled commands, right? You've got to enable it for yourself. You've got to say, "Okay, I know what I'm doing. I'm not going to panic if the rest of my file disappears." I know it's there. I'm just choosing to focus on it. I think it's actually available off the menu as well, but I haven't used it off the menu bar.

Prot: Yeah, I don't use the menu, so I cannot tell. But I remember that prompt, "Are you really sure?" It's disabled by default. Please make sure you know what you want.

Sacha: Keyboard shortcut. That's the way to do it anyway.

Prot: The thing is that I do use it extensively.

12:04 org-narrow-to-subtree

Prot: Narrowing, of course, is generic., Org also has its own narrowing. The most common one is [org-narrow-to-subtree].

12:13 narrow-to-defun

Sacha: Narrowing to defun feels easier than trying to mark the function before search and replace. I love narrowing. In fact, I narrow to functions or sets of functions a lot, because I do a lot of work with with Javascript in HTML files, just a single file HTML that I can upload. It's got CSS and regular HTML in it as well. But I often just need to copy the particular snippet of JavaScript so I can paste it into the console as I'm making changes. I have a function that looks for certain text: "start of focus", "end of focus". Then it narrows to that section, which might include several functions. Then I have another keyboard shortcut that just copies the entire buffer and adds a little text at the end, so I can run whatever function I need to test. I can paste that into the browser. Narrowing either to one function or to a predefined region or whatever else is very useful.

Prot: Yes, very nice.

13:19 Indirect buffers

Sacha: Then people are like, yeah, but what if I want to narrow to two parts of the same file?

Prot: That's why you have indirect buffers there.

Sacha: It's Emacs, of course there's a way to do it. Indirect buffers is another one of those built-ins that's a little hard to wrap your head around, because you're like, okay, you're opening a file twice, but you can have it narrowed to a different part of it, or you can be looking at a different part of it, or you can even have it in a different major mode.

Prot: Yeah, yeah. And the point, like the practical one, is the different levels of narrow, really... The most common one, I mean, where it's like, okay, you focus on this heading and now you focus on this other heading.

Sacha: I'll often split my buffer if I know that I'm not going to narrow. So that way, if I need to refer to two parts of the file at the same time, I can have one window focusing on one part of it and the other window focusing on the other part of it. It might even be a different frame. And that way, I don't have to keep switching back and forth. I don't have to scroll up and down all the time. I can just look at one and then look at the other and arrange my windows and my desktop as I see fit. But if you want to do something more complicated, like more narrowing or different modes or whatever, then cloning an indirect buffer is the way to do it.

14:50 Undoing within a region

Prot: I don't know if you have this, but because you mentioned the region earlier, I will say it. Maybe you have it somewhere, I don't see it there. You know regular undo in Emacs and how it works, but when you have a region selected, undo works in the region. So you make a change here, you go make some changes up there, you come back here, you mark this region, undo only works here, it doesn't work up there anymore.

Sacha: Oh yeah, that's definitely a built-in that people will benefit from if they develop an intuition for it. If you've made a bunch of changes to your file and you notice that something's wrong in just this section, you can select the region and then undo within it to just fix those things. Those are some of the things that I've thought about for focus or distraction or getting tempted to go down rabbit holes. Do you use any of the other Emacs built-ins to help you with your tendency to dive really deep into something?

15:53 Bookmarks

Prot: So the other one would be bookmarks. You mentioned it already, but it really is worth having it there, because the nice thing with bookmarks is that not only it's a way to go to a place, but you also give it a name. So the counterpart... Like you said, okay, I have a key to quickly go to my init file, for example, my configuration file. But what if I want to have something by name that doesn't quite fit nicely in all the keys, right? Then I can have a descriptive name. Maybe it's long. For example, my notes for my meeting with Sacha, which is in mid-June, blah, blah, blah, right? I can have a long name like that, which is descriptive and gives me context. Then I use a bookmark for that.

Sacha: And that's a great built-in solution for the general problem of finding your way around. So in case you're trying to find your way around different files or different projects or different places in various files, bookmarks are great for that because you can give it a name. That means you can file more things than will fit on your keyboard. Kind of an advanced use of it, I was talking to Ben in the previous Emacs Chat about So he bookmarks Elfeed searches, and based on his naming convention, if he names his bookmark a certain way, then it becomes available for these other functions that he has. So if you have a naming convention for your bookmarks, you can do other things with it from Emacs Lisp.

Prot: Yeah, exactly. That's the more advanced power user thing. It's just data and you have access to it.

17:41 isearch

Sacha: Going back to something a little more basic for the problem of finding your way around, I think that isearch is one of those built-ins that people coming from a different editor might not think of using. "Find in page" is an annoying experience in a browser or in other editors. You have to go to the menu, you do it, and then there's things you have to click on in order to go to the next one or the previous one and so forth. But isearch lets you just keep typing and then you can just press the isearch shortcut again, C-s, to search for the next one, or you can go to the previous one very easily. So isearch is great.

18:21 Tip: Add a counter to isearch

Prot: Yeah, yeah, it is. I think one nice quality of life improvement to it, which again is several Emacs versions old, is a counter. Like it shows you are on number 3 out of 10, for example. You have a sense of where you are going.

Sacha: Otherwise, I find I just wrap around to the beginning and I take a moment to reorient myself because it has wrapped around. The other thing that I want to point out related to isearch as well is using it to help you mark a region. This is something that people aren't used to because in other editors, you highlight things with your mouse, right? Here in Emacs, we say, okay, press C-SPC to say you're going to start a region, and then just search for the end of the region, navigate to it somewhere, and the text between when you press C-SPC and where your cursor is now, that's the region.

Prot: Yes, exactly.

19:26 C-x C-x (exchange-point-and-mark)

Prot: On this note, C-x C-x. By default, it’s exchange-point-and-mark. Which, if your cursor is here and where you started is up there, it moves the cursor up there and now where you started is down at that point. You can expand the region both ways. You can keep switching and expanding.

Sacha: I have never thought about using it for expanding the region. I usually just use it to confirm that, yes, I am actually selecting the parts that I meant to select. Because by the time, of course, I've found the thing that I wanted to end the region with, I've forgotten or I'm not entirely sure I have the right start. So I was using C-x C-x to quickly verify and have everything nicely highlighted. But expanding the region, yeah, that's a thing you can do with it.

Prot: Yeah, yeah, of course. Now it's obvious, right? But it's something that you may notice by mistake, by accident.

Sacha: [interrupted by life] @charliemcmackin4859 says, "I love that you can make those marking tricks part of a keyboard macro."

20:55 Popping to marks - going back to where you were

Sacha: Oh, the other thing I want to say with marks is you can also navigate by mark. C-x SPC?

Prot: C-u C-SPC. I think it’s pop-to-mark is the concept.

Sacha: Popping to mark. We'll just go with the concept because people can search for the key binding. Which basically means for all the places where you were before you went off searching for something else or doing some other command, you can go back to those places in sequence. I think there are even some commands to let you easily navigate through all the places you've been previously. That is a thing that you can do with Emacs built-ins. It's called popping the mark. It lets you revisit places.

Prot: Yeah, yeah. Another point related to this and also related to yank that we said earlier...

21:49 Selecting what you just pasted

Prot: Imagine you have copied something and you are pasting it now in your Emacs. Then what you want to do is select it, maybe to do something with it, such as to make it all up case or whatever, right? Instead of selecting it manually, you can just do C-x C-x. Because when you paste something or when you do I search or whatever, it has the effect of updating the mark. Then you can work with that.

Sacha: Yeah, that one I use fairly often. Also, that way, you can easily see what it highlights, the part that you've just pasted, and then you can do your other replacements or uppercasing or whatever else to it.

22:33 Indenting pasted or selected text with indent-rigidly

Prot: The nice part for this is the indent-rigidly, C-x C-i by default, where you can now have a region of text including an implicit region between mark and point, and you just shift it around, literally left or right. Try it. It's very nice.

Sacha: C-x C-i. I think you can even use the arrow keys to move things, so you can just nudge it until it looks right, which is great because sometimes, when you paste things, the indentation isn't the same as all of the rest of your stuff. You might want to put it all the way into an Org list or whatever else, code block, whatever.

Prot: Okay.

Sacha: So C-x C-x, very handy even after you paste.

23:24 Popping to mark after xref or imenu

Sacha: Oh, @hmelman also points out the fact that things like xref or imenu push the last location before jumping means popping the mark is an easy way to go back from various navigation mechanisms. In general, if you have navigated away from something using some magical Emacs command that has taken you far from where you are, you can always find your way back home or back to where you were by popping the mark. I think there's even a distinction between popping the mark in your buffer versus popping your global mark. You can go to a different buffer that you were just in if you wanted to.

24:05 Adding other packages like consult

Prot: Very nice. Many of these are also augmented by packages. When you install a package, it doesn't introduce completely new functionality. It adds to existing one. For example, the consult package, which is very useful, very nice, has something to do with what we just mentioned. Like, navigating the mark in a visual way, so you get to see it.

Sacha: @hmelman points out that local and global marks are useful to navigate through. Check out all these other packages for adding extra functionality around that.

24:44 Tip about indicating isearch wrapping

Sacha: @matthewjorgensen9115 says, "thinking about isearch wrapping around search, gwhen you get to the bottom of your file, when you're isearching and there's no other matches to be found, it will by default wrap you around to the beginning of the file so you can keep searching from there." Matthew says you can either have scroll to position to know the direction (it also indicates the position in your mode line), or you can have your mode line flash to see it move from last to first. I don't have that configured. I should look into how to get that configured because it's like all these little things, right? But sometimes you don't need to make a big navigational jump. You just need to move forward by a little bit.

25:26 Navigating by sentence or s-expression

Sacha: Emacs has built-in shortcuts for navigating by expression, maybe things inside the parentheses or things inside the quotes, as well as natural language shortcuts like navigating by word or by sentence. Those are some very useful built-ins that are well worth learning the keyboard shortcuts for.

Prot: Yes, indeed. Of course, we call them S-expressions and the terminology of the commands alludes to Lisp, but they work in other programming languages as well. For example, there is the forward-sexp, but it works in other languages which don't have this Lispy syntax.

Sacha: So if you skipped over that part of the tutorial or the manual, go back and read it because it can save you some time. In a pinch, it will also help you make sure that your parentheses are matched up correctly and you go to where you expect them to go. There are other ways to make it easier to match up parentheses or braces or brackets or quotes like [ show-paren-mode ] or whatever. Sometimes I just go forward and back to see whether I end up in the right place.

Prot: A small trick here, if you are writing specifically Emacs Lisp, there is a very common mistake of adding an extra parenthesis, and it says "end of file during parsing", or one less parenthesis, what you can do with a combination of keyboard macros... You go to the beginning and you do C-M-e to go to the end of the defun, and then, in a keyboard macro, you keep doing that. Next, next, next, end, end, end, right? Until it stops, and you know where your error is.

Sacha: Oh, and I should tell people, if you give the execute-kbd-macro a negative argument, it'll run until error. So you just do that and it'll drop you where it ends. You don’t have to manually press e 500 times.

Prot: Exactly. The "run until error" happens when you are in a narrowed region as well. Error here means end of region, end of buffer.

Sacha: I should point out in the specific case where you're trying to hunt down a stray parenthesis, you should also just use check-parens, which will tell you.

Prot: Of course.

27:45 Navigating to other errors

Sacha: And for other errors not just limited to missing quotation marks or parentheses, it's well worth taking the time to set up flycheck or flymake or whatever error checking thing you want to use, because then you can navigate to the previous and next errors as easily as you would with keyboard shortcuts. If you get the hang of doing that, you can also use the same mental model to navigate through... If you're doing a keyword search with grep, then you can use the next-error, previous-error to also go to just the next match or the previous match.

Prot: That's very useful.

28:29 Tags

Sacha: I am not using tags nearly as much as I probably should for navigating symbols.

Prot: Tags, yeah, in the context of programming. Me, I haven't used that, no.

Sacha: Oh, yeah? I guess because you primarily work with Emacs Lisp, it's easy enough to find the definition from there.

28:47 Imenu

Prot: But imenu is the other one, along those lines.

Sacha: That's interesting. You don't use the menu bar, but you use imenu.

Prot: Yes, imenu is useful because, of course, it's with completion. Now, I should say here, of course, that the default imenu has this concept of going in steps, but you can flatten the list, which is more interesting for the purpose of completion. I believe what I'm saying is the case, but I don't remember anymore. But you can have a flattened list, at which point you navigate the file with completion.

Sacha: I should try that because I really like the way that Org, when you're navigating by the outline, you can also configure it to flatten the list so you don't have to complete the heading and the next setting and all that stuff. @hmelman says you don't actually need flymake for the error navigation thing. You can just use next-error and previous-error which works with compile and grep and occur and a bunch of other things that have the same convention. So yes, if you use the M-x compile command to run whatever your compilation step is, it will parse the output of many compilation systems, programs, and it will let you jump to the next error. It will also even show you the errors, I think. Anyway, so you don't need flymake. Flymake just gives you the squiggly underlines. But you can use next-error right away.

Prot: Yeah, yeah, yeah. Flymake is more narrow. Yeah, correct.

30:19 Projects

Sacha: I think projects and project-based navigation is another big chunk of Emacs built-in functionality that is useful for people who have a hard time finding their way around. You don't have to manually find each file. You can set up shortcuts so you can say, I want to go to this project. Then from within this project, I can find a file very easily.

Prot: This is indeed very powerful. The thing is you don't have to also think in terms of the structure of the project, like the tree structure of the project, because if you find the file in the project, it will flatten the structure for you, so then you use completion to find it or find the directory where something is. Of course, you can still use the tree view as well.

Sacha: This is great because for example, in Java projects, the directory structure gets very deep because they have to be their domain name and package names and all that stuff. Just have either project or projectile index all of your files for you, and then you can jump to a file by name anywhere in your structure. You can tell it also to ignore certain files, which is handy so that you don't have to go into your node-modules. That would be silly.

Prot: Yeah, that would be a nightmare.

Sacha: Do we have basically the Emacs built-ins for finding your way around well covered here, or other other recommendations that people should go check out?

Prot: These are already very useful, yeah. Most of these, if not all, are augmented by packages. So the core functionality is there, and then you can do more stuff with them.

32:10 Putting projects in tabs or frames

Prot: For example, with projects, you may want to have an arrangement where you put them in separate tabs, and then you use a package like tabspaces so that each tab has its own buffer list, or my package beframe so that you put them in separate frames. Each frame has its own buffer list, so that basically when you search for buffers, you only see those related to the project.

32:35 Tabs

Sacha: I am not using tabs nearly as much as I probably could, so that is one of my underappreciated Emacs built-ins here. I'm getting the sense that people use tabs to say, okay, this is the set of windows related to managing my mail, or this is a set of tabs related to this project. This is a set of windows related to this project, or this is a set of windows related to managing my notes about something. Is that what you use tabs for?

Prot: I seldom use them. I use them specifically only within the context of popping into a Magit interface. So I have my project that I'm working on. Let's say it's split in three windows. And then I want to leave everything intact and just go into Magit to do some Git operation. I configure display-buffer-alist so when I do Emacs Magit, magit-status or whatever, it goes in a new tab. Then I leave my work where it is. I do the git thing, then I quit those. I'm back to my layout.

Sacha: I know you're a good advocate of checking out display-buffer-alist and all the wonderful things it can do. I should definitely look into having it set up a tab because that sounds a lot nicer than trying to remember, okay, I need to save my window configuration to register and then do this thing. I have it set up actually so that I can winner-undo in order to get back to my previous configuration. But of course, if I need to flip back and forth between two different views, like Magit and my project code, then a tab would work much better for this purpose, I think.

Prot: Yes, and it scales better as well, like if you need to have three tabs or whatever.

Sacha: Or a new frame. But sometimes managing frames gets a little annoying too.

Prot: Of course, of course. There are pros and cons.

34:41 Navigating frames

Prot: Speaking of frames, one nice thing is that there is completion again to select frames. So I forget how it's called. [ select-frame ], I think, is the command. If you have lots of frames and you don't know where they are, you can use completion for that. If you want, you can also name frames. I believe it’s rename frame. [set-frame-name] I forget now the command. Basically, you can give it a specific name rather than it changing the name all the time. So you can say, OK, this is my super important note for our livestream, right? That's the frame for you. Now you can find it.

Sacha: I should look into that. I also underutilize frames because for the most part, I have a keyboard shortcut like Super 1 which jumps back to Emacs, raises my Emacs window. But it doesn't work so well if I have multiple Emacs window, like multiple Emacs frames. If I can figure out how to get mentally through that or if I switch to EXWM as my window manager, then I'm sure that managing multiple Emacs frames will be a lot easier. But at least tabs, I can probably use within that one frame in order to manage different windows.

Prot: I would say tabs is the first thing you want to check. Frames is a little bit more... You have to change your mental model a little bit.

36:07 These navigation shortcuts work for prose, too

Sacha: @hmelman has one more tip to include in this section on finding your way around. You can use these S-expression commands in prose too. Like for example, C-M-u or backwards-up-list moves you out of a quote or a parenthesis and then you can C-M-e to go to the end of it. So even if you're writing, for example, a novel, and you're saying, okay, I want to get out of this quote and go to the next sentence, you can either isearch to the start of it, or you can go up out of the quote and then go to the end of the quote. Also very handy to learn the commands for killing an S expression [ kill-sexp ], which again also works with other stuff like quotes or parentheses, because then you can copy and paste things or you can kill it. You don't have to paste it back. It's just you delete it and then you type something else in. It's fine.

Prot: Exactly, exactly. And one of those is the mark-sexp, which is very useful.

37:09 follow-mode

Sacha: Oh yeah, oh yeah. And @matthewjorgensen9115 shares: follow-mode allows the same file with multiple frames like a book. So follow mode can work with two, three or more windows. You have an ultra wide, right? So like, okay, you can have several columns following the same file and you can scroll and all of them will scroll in sync.

Prot: Yeah, yeah. It's quite nice. Quite nice.

Sacha: I forget, does follow mode work with different files?

Prot: With different files? I don't think so. Like kind of a scroll lock for all windows?

Sacha: Yeah, yeah, yeah.

Prot: I don't know. I don't think so. I haven't tried it.

Sacha: Worth looking into. [scroll-all-mode]

37:50 Ediff

Sacha: If you do find yourself needing to compare one file with another manually, then maybe like ediff?

Prot: Ediff would do that. You would have them side by side. But the thing with Ediff is that you don't get a scroll lock for both. It's only navigation through the differences. So that wouldn't be exactly that.

Sacha: For the purposes of comparing, Ediff will let you compare two files, but you can even use it to compare two buffers. However, Prot does have some recommendations in the one on the defaults that you shared before on how to make Ediff more manageable.

Prot: Yeah, I think by default it's not intuitive, because by default, when you do Ediff without any configuration, it will display its panel in a separate frame. If you have never used many frames, that's already your first problem. Like you don't even know what happened. The second problem is that the layout will be one above the other, which depending on your screen, you have like a wide screen, so it's not as easy of a layout. Then you have to figure out where the other frame with the panel is. Basically two variables where you change them and you have the panel at the bottom, the control panel and then file A here, file B there. And of course you can do it with three files as well.

Sacha: I will find it and put it in the show notes. Matthew also points out the following also works with centered-cursor-mode [(it’s a package)], which will keep the cursor position in the middle of the frame. So I can't remember whether there's also like a scroll lock or whatever.

Prot: scroll-lock-mode. Yeah, there is `scroll-lock mode.

Sacha: Or there was another Emacs built-in that someone mentioned that scrolls it one line at a time, keeping it centered, I guess, which the person found very useful because their cat was sitting on their laptop. So moral lesson is: learn about the Emacs built-in because you never know when a small mammal will be obscuring half of your screen. You can still use Emacs. Which actually is an interesting segue into this thing about discoverability because Emacs is quite unlike many other editors. It is very well documented and if you can figure out how to navigate and find that documentation and even how to make this fun for you, then you can do all sorts of interesting things with it. Okay, so self-documentation. I love telling people, okay, you can just press C-h k or describe-key to describe anything. You can C-h f any function. You can, you know, C-h v any variable. describe- whatever is great. Of course, adding C-h to the end of the keyboard shortcut that you've started but you've forgotten how to finish, especially if you've turned on which-key mode, is great for listing the actual shortcuts that start with that sequence.

Prot: And even without which-key, it will put all those shortcuts in a Help buffer, and it will show the key and the name of the command. Of course, you can click on the command to read about it.

Sacha: Someday I think it would be amazing if Emacs comes with a completion interface that's easy for people to understand and get started with, but in the meantime, if you don't already have completion set up, that is well worth taking the time to figure out.

Prot: Yeah, yeah. The built-in one has improved tremendously. I mean minibuffer.el here has improved tremendously over the various recent versions. But you still need to be aware of all the user options to configure it. So to get, for example, a single column view instead of a grid with 100 options... That requires some effort. Out of the box, if you really want something that is built into Emacs and does completion in a way that is fairly easy to understand, it would be icomplete-vertical-mode or fido or fido-vertical-mode.

42:12 Calling functions by name

Sacha: Another thing that Emacs does differently that might be good for people to learn about is that in Emacs, it is totally okay to not remember the keyboard shortcuts for everything or not use the menus for everything, because not everything will fit in the menus either. If you kind of remember the name of the function, you can use M-x and possibly completion to go run that function, which is helpful because sometimes knowing the words to call a function is a lot easier to remember than remembering the shortcut for it.

Prot: Exactly. And I would say completion...

42:52 Completion

Prot: If you have to configure one part of Emacs, it's completion. If you improve that part of it, it will help you everywhere. Like we were saying earlier about bookmarks, it helps you there. The kill-ring, it helps you there. Finding files, it helps you there. Switching to buffers and so on. Like what we are now talking about. It's always useful.

Sacha: When you set up a completion, also learn how your favorite completion system lets you put in things that look like they should match something on the list, but you actually want just the partial part or just the blank part. For example, in some systems, you press M-RET or M-p to send what you already have there instead of selecting one of the completion options. This is helpful because sometimes you'll want to name a file something that is a substring of another file and you want to be able to say, yeah, that is actually what I meant, not the completion part.

Prot: Yeah, yeah. I think that's the only rough edge with most of those, yeah. Where you have to be mindful of that or, you know, I have to select the prompt or I have to type a special key for this edge case. Yeah.

Sacha: Once you get that sorted out and you've drilled it into your fingers, it's very, very helpful to have completion sorted out.

44:13 Manuals

Sacha: Emacs also comes with extensive manuals. You like to write very thorough manuals for your packages, which I also appreciate. Flipping through manuals for fun is something that we've discussed in previous... This is such a great practice. You learn something new every day. I was going through the Emacs manual in preparation for this conversation and I was just highlighting things that I need to dig into.

Prot: It's very useful and again to point out completion. C-h R is how you can search for the manual of a package. Like for example, I'm interested in Org. C-h R, Org. I find Org from anywhere, right? C-h R and then I will search for something else, right? Elisp, for example, to go to the Emacs Lisp reference manual. Again, very useful. From inside the manuals, g to go to a chapter, also known as a node, i to go to a topic, an index, and m if you want, but g and i. Just think of g and i. Very, very useful. m is also useful to navigate the menu of the current node.

Sacha: I use s also for search.

Prot: And there's for research throughout, yes.

Sacha: Yes. I have not been using C-h R. I have been using C-h i to look at the whole list of info manuals and then using m or isearch like a newbie.

Prot: That works. The problem with that is that if you have already gone into a manual, C-h i will take you back to that manual. So you have to click it and then start again.

Sacha: Okay. Alright. Well, I'm learning new things.

Prot: Nice.

45:57 Menus

Sacha: Okay, you mentioned you are not a fan of... you don't use the menus and I know a lot of people...

Prot: But I appreciate that. And in one of my... oh, in a couple of my packages I have menu entry.

Sacha: Yeah, and I know a lot of people turn the menu bar off in their "this is how you configure Emacs" sort of tutorials. But if you are new to Emacs, and even if you're an intermediate user, I strongly recommend, sacrificing that tiny sliver of vertical space for the menu bar, because it's a great way to discover commands that are related to your particular major mode or other things. It's just fun to go through it and see what's been deemed worthy of including in one of those menus. There are some efforts now to get the right-click mouse menus to also have lots of interesting options, but definitely the menu bar at the top, which can also be accessed if you use F10 if you don't want to use the mouse. The menu bar is even working on terminal, which is nice. So yes, menu bar at the top has a lot of useful suggestions for discovering things.

Prot: Yes, yes, excellent. The part you mentioned about key navigation, that's also good. You may be like, don't want to use the mouse. There you have it. You don't have...

Sacha: And speaking of key navigation, if you press C-h k, which is describe-key, it will work on menu items as well. If you're finding yourself always going to the menu to do this thing, sometimes the menu items are not named the same as their commands, but you can use C-h k to find out what that function is and what keyboard shortcuts it's bound to. Then you can call it with M-x directly, or you can memorize the keyboard shortcuts.

47:46 Automation - abbreviations

Sacha: Okay, shall we move on to automation, for which Emacs has a ton of built-in things? Using abbreviations and things like that is actually something I picked up from reading your config, I think, because you use abbreviations a lot.

Prot: Yeah. Very nice. Very useful. Even for basic things. For example, I want to write, you know, my fancy French expressions, like, this is so déjà vu, you know? I want to have the accents correct. I just write deja vu with English, and then I have the French equivalent with all the fancy accents. Stuff like that you can do, like... something you keep misspelling the whole time you actually do it, right, something that is with an annoying spelling, like annoying capitalization like LaTeX. Nobody knows how that is written. You just write it latex, all lowercase, and then expand to whatever it should expand. This sort of thing is very useful. Of course, you can just have some short text which expands into very long text.

Sacha: We should also point out if you type something that is normally an abbreviation like LaTeX, but in this case you actually want to write the word latex, then how do you do the abbreviation without it being expanded into whatever that is?

Prot: Of course you would rather avoid that situation with your abbreviation. It wouldn't be like that, but otherwise you will have to undo. When you do SPC and it expands, you undo. That is a little bit annoying, for sure. But I would say, just make sure to have abbreviations that are not ordinary words. They are a little bit contrived, so you don't get false positives. A good use case here, like what I have in my configuration, like you can have your abbreviations behind a character such as the semicolon. Then of course it's very unlikely that you will have semicolon later.

49:56 Quoting the next character with C-q

Sacha: The other thing that you could potentially do is use C-q to quote the next character literally. So here for example, I have ot expand to the current time, but if I say ot C-q SPC, this helps. And in general, this idea of C-q to quote the next character is also useful in other places where you might, for example, need to add a literal new line to a search or something like that, or a literal tab.

50:31 Mapping abbreviations to code

Sacha: The other thing that I want to add to abbreviations here is your abbreviations are not limited to just text. You can use them to run things, which means you can use them to run things that expand to text, or I think you might even get away with using them to run commands. So it's pretty limitless.

Prot: Yeah, yeah. Of course, it's how determined you are to write custom code for that.

Sacha: Or how resourceful you are in finding other people's custom code that you can copy, at least. Good motivation to learn Emacs Lisp. I do not remember if Yasnippet is built-in. It feels like it's built-in.

Prot: No, but it's one of those that basically everybody uses. Yasnippet or Tempel.

Sacha: A couple of questions from chat. When highlighting parts of the manual, how are you doing this? In bookmarks, bookmark-region, using Org Remark, other ways? I was doing this at the playground the other day, so I just had it in my iPad and I had it in one of those graphical note-taking things and I was highlighting with the Pencil. But I've heard good things about Org Remark, which is a package.

51:51 Taking notes with org-capture

Sacha: You can also use just org-capture if you’re reading the manuals from within Emacs, which you can. If you org-capture, you can even select sections of the manual and it'll automatically save that in the capture template along with a link back to where you were looking. This is great.

52:08 Navigating back to captures or refiles

Prot: Since you mentioned org-capture and we talked about bookmarks earlier, when you do org-capture or org-refile, it stores a bookmark. You can go back to the last capture, the last refile.

Sacha: Yeah, yeah, which is handy. Also, you can use org-refile to navigate your Org files. In addition to using it to jump to the last thing that you filed because you were like, "Oh, yeah, wait, I forgot. I want to add more to that note," you can also use it to jump to any of your projects, for example, or any of your notes, assuming you’ve set up your org-refile-targets appropriately. Okay, @RandCode has question. Does Emacs have a grammar checker like Harper's LSP? I know there are packages that people can use to work with Harper and other things. Do you know of any other built-in things?

Prot: Built-in, it's flyspell, but that's not grammar. That's spelling.

Sacha: Okay, all right.

Prot: I cannot think of something. No, I don't think there is for grammar. So Harper or anything like that would plug into Flymake.

Sacha: @greggr0th has a question. What are your favorite completion plugins?

Prot: Yeah, I think it's really vertico. I prefer it over the built-in options, over icomplete. So it's vertico, and then with that, I would say, at minimum, orderless. So vertico and orderless, at minimum. But then, of course, if you want a little bit more, which is very useful, Marginalia, Consult, Embark, maybe I'm forgetting something, save-hist, it's built-in. But yeah, those, those for sure.

53:49 dabbrev

Sacha: @hmelman says dabbrev for dynamic abbreviations is underrated. You don't need to predefine them. You just type the start of a word or symbol and type M-/, and it will search the buffer for something starting with what's on the left side of your point and then expand it. I can't remember if it's dabbrev or hippie-expand, but you can also set it up so that it can try words from other buffers or other things that you've got or contacts or whatever. Anyway, so dynamic abbreviations. If you search for dabbrev and if you look also for hippie-expand, you will find lots of things that you can configure to fit your particular workflow. So you can expand abbreviations without having to define them.

Prot: Yeah, yeah, yeah. Super powerful. Super useful. I use it more than tab completion, you know, like with core. I use dabbrev more. It's very nice. Yeah.

54:44 Keyboard macros

Sacha: Okay, so we've mentioned keyboard macros very briefly, but this is another very powerful chunk of things that people might not be used to if they're coming from an editor that is not Emacs. So keyboard macros, what's kind of like the thing that we can use to explain? How do we explain it to people who are new to this?

Prot: In its simplest form, you record what you type and you can play it back in its simplest form. But the thing with Emacs is that you don't just record typing motions, typing actions. You also record all the Emacs motions. You can have a keyboard macro that includes stuff such as move to another window or create a new split or whatever. You can do more advanced things like that. This has very nice qualities to it where it's like, oh, I just want to copy all these symbols and move them to my shell buffer and then I will do something with them, pipe it to something like a program outside of Emacs. So it has a lot of nice applications like that.

Sacha: I think that if people can get the hang of: very carefully set up their keyboard macro, think what's a series of steps that I can do so that I can do the change and then move my cursor to the start of where the next change should be... For example, I'll start the keyboard macro, I'll delete the word, I'll type in something new, or maybe I'll paste in a register I'll use isearch to find the next point at which I need to do something. If you define your keyboard macros like this, then you're giving yourself the ability to interactively confirm whether you're still on the right track and then make the change because that way, it's not just like a search and replace and you're hoping it all works out. Although the recent search and replaces are great because they show you the changes. But for something that's more complex, especially if you're not used to regular expressions, keyboard macros can help you interactively do it in small steps.

Prot: Yeah, exactly. Of course, search and replace will be more tricky if you have to go through many files and perform multiple edits in each, because then the concept of regular expressions breaks down. You don't want to think in those terms where it's like, I will have to make a change somewhere towards the top and then somewhere in the middle and then somewhere towards the end. Keyboard macros combined with Dired combined with going to file... Very nice. Just to say another thing about keyboard macros is... Let's say you have written your very nice keyboard macro. You're recording it, and somewhere towards the end, you make a small mistake. Keep going and then C-x C-k C-e to edit your macro. It's a text buffer. You just remove what you don't want.

Sacha: You can save these keyboard macros as well. You can use them in a future Emacs session or even turn them into your first Emacs Lisp function. You can give it a name and you can run it that way.

57:52 Editable grep and occur

Sacha: In the next three minutes before the kiddo runs out for lunch break, I also want to mention, since we talked about making changes in multiple files, that grep and occur are both editable. You can do your grep and you can search for things. And then you can say C-x C-q which turns it from read-only to something you can change, then you can do your search and replace in that, and you can C-x C-q again and those changes can get put back into all those different files.

Prot: It's amazing. On this note, specifically for grep, if you edit many files with the grep edit mode that is built into Emacs 31, it will not save them for you. So C-x s, instead of C-x C-s, allows you to save multiple buffers. And every time, it gives you a prompt and you can type d to see the diff. Like, okay, what exactly did I change? If you have many unsaved files, d to see what you're about to save so you never make any mistakes.

Sacha: Mm-hmm. Taking advantage of these diffing tools is great also. Even if you're new to Emacs or you don't have a programming background, if you find yourself making changes to lots of files, I strongly recommend learning more about version control systems like Git and then using something like Magit or even the built-in VC. If you use VC, you can use it and you have set up something like a git repository. You can use `C-x v =` to diff to see the changes between your file and the previous thing that you had saved. Which makes sense so that you can see, okay, these are the changes. Also it means that you can experiment with different changes. You can experiment with different ways of writing a paragraph or whatever, and you know that all of your previous versions are saved and you don't have "really, really final version two." You don't clutter your directory with a lot of copies of the same file.

Prot: But even if you don't have any of the version control system set up, a very simple thing is diff-buffer-with-file. So you have a file you are working on and now you make some edits. The buffer, what is in memory, is different than what is on disk. You can compare the difference between the two.

Sacha: Okay, I'm going to try to wrap up here because the kid is going to run and say hi very soon. Thank you so much for joining me. Of course, there's a lot more to talk about the Emacs built-ins, but I hope we've given a quick tour of some of the things that are definitely worth learning more about and the situations for which they are absurdly useful. Thanks to everyone in chat also for coming and hanging out. I will post the show notes eventually and get the transcripts sorted out. Thanks.

Prot: You're welcome. You're welcome. Take care. Of course, good luck with everything. Didn't she show up here?

Sacha: If she shows up, she will. It's inevitable.

1:01:01 Emacs Carnival June 2026: Underappreciated built-ins

Sacha: Also, if folks are interested, even if you've never blogged before, the Emacs carnival theme for June 2026 is "Underappreciated Emacs built-ins," which is why we had this conversation. Feel free to write about something and either send [Ross and] me a link, or you can even send me the post and I'll post it on my blog with your name on it and other things like that so you can share your appreciation for these built-ins. All right. Okay, I hear movement. I gotta go. All right.

Prot: Take care, Sacha. Take care, folks. Goodbye.

Chat

  • protesilaos: ​Looking forward to this! Talk to you soon.
  • gr1maldi: ​​Yo, and stuff.🙂
  • charliemcmackin4859: ​​I just checked, there are 11 items in my kill-ring at the moment. Some of them are several lines long
  • charliemcmackin4859: ​narrowing to defun feels easier than trying to mark the function before search-and-replacing… I love narrowing
  • charliemcmackin4859: ​…and I love that you can make those marking tricks part of a keyboard macro
  • hmelman: ​​both local and global marks are useful to navigate through
  • pratikmishra4073: ​​just tried indirect buffer. didn't know it existed
  • hmelman: ​and the fact that things like xref or imenu push the last location before jumping, means popping the mark is an easy way to go back from various navigation mechanisms
  • matthewjorgensen9115: ​​thinking about isearrch wrap around search losing your place. either have scrroll to posisiotn to know the direction and how far it was away, or have mode line flash to say it moved from last to first
  • hmelman: ​Don't need flymake for that just M-g M-n (next-error) which works with compile, grep, occur (I think).
  • hmelman: ​One I keep forgetting about, you mentioned using sexp commands in other languages, works in prose too. C-M-u (backwards-up-list) moves you out of a "quote" or (paren) and then C-M-e to the end of it.
  • matthewjorgensen9115: ​​follow mode alllows the smae file with multiple frames, like a book. follow mode can work with 2 3 or more windows
  • matthewjorgensen9115: ​also works with centered cursor mode which will keep the cusor possion in the middle of the frame
  • RandCode: ​​Damn I am late, hello everyone! 🙂
  • matthewjorgensen9115: ​when highlighting parts of the manual how are you doing this? in bookmarks, bookmark region, using org-remark? other ways?
  • RandCode: ​​Does emacs have a grammar checker like harper's lsp?
  • greggr0th: ​​What are your favorite completion plugins?
  • RandCode: ​​Also, looking fresh Prot ;)
  • protesilaos: ​​Thanks!
  • hmelman: ​dabbrev is underrated. You don't need to pre-define them, just type the start of a word/symbol and type M-/ and it will search the buffer for something starting with what's left of point and expand it
  • RandCode: ​There is so much to learn that I feel like I have been missing out on all of emacs somehow lol
  • RandCode: ​Since you mentioned built-in completion framewworks, how does the built-in (vertical) completions compare to corfu btw?
  • charliemcmackin4859: ​not grammar, but if you have a dictionary server running (like dicod on linux) emacs can be made to communicate with it to give definitions at point
  • RandCode: ​Ohh, that is a cool! ^
  • matthewjorgensen9115: ​​virtico multiform mode allows custom settings command, for example for files I use grid and alphabetical, but vertico recommendations normally. This allows more value of completion knowledge
  • RandCode: ​Thank you so mcuh for this wonderful stream everyone!!!
View Org source for this post

2026-06-08 Emacs news

| emacs, emacs-news

It's Emacs Built-ins appreciation month! I'm coming to appreciate the menu bar more. What built-ins do you appreciate? Write about it and send Ross a link!

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

Emacs Chat 26: Ross A. Baker

Posted: - Modified: | emacs, emacs-chat-podcast, emacs-chat

: Added transcript.

I chatted with Ross Baker about Emacs (including running Emacs 28), his Emacs config, and life.

View in the Internet Archive, watch or comment on YouTube, read the transcript online, download the transcript, or e-mail me.

Related links:

Chapters

  • 0:00 Opening
  • 0:46 What Ross does
  • 2:06 How Ross got into Emacs, used other editors, and then came back to Emacs
  • 4:58 Config focusing on built-ins
  • 10:12 simple-orderless
  • 14:29 Size indicator
  • 16:40 Graceful degradation
  • 17:48 emacs-lock-mode
  • 19:52 exiting Emacs: yes-or-no-p
  • 20:46 yes-or-no-p
  • 21:45 Processes
  • 22:18 Moving keymaps
  • 24:23 Writing in Org Mode and Markdown
  • 27:49 Ethersync?
  • 29:16 Managing Github with Forge
  • 35:49 Committing with work addresses vs personal
  • 37:13 Emacs tinkering as stress relief
  • 41:06 Under-appreciated Emacs built-ins
  • 42:20 gptel
  • 46:04 Getting older
  • 46:46 Lindy's Law and tool longevity
  • 49:51 Nix is good at managing package versions and customizing them; Matthew Bauer (Bauer IDE)
  • 53:25 Custom fonts
  • 54:30 Starter kits versus configs
  • 55:34 Nix vs Guix; Mac
  • 56:26 Non-work interests: Org for documenting; ox-hugo and multiple languages

Transcript

Expand this to read the transcript

0:00 Opening

[opening stuff] Emacs Chat 26 is Ross A. Baker. You can find him at rossabaker.com. Today, we've got a lot of interesting things to dig into, including his two-part Emacs configuration, plus of course, all the things that he does. The goal with Emacs Chat is to show some of the things that aren't obvious from the configuration, like how the different pieces actually work together or what the workflow feels like. But before we dive into that, Ross, can you tell us a little bit about your background? What's the context here? What do you like to do?

Ross: Oh, sure.

0:46 What Ross does

Ross: So for work, I'm a backend engineer. I'm somewhat well known in the Scala community. I've done that for a long time on an open-source basis. I've taken an interest in Rust here recently. Those are the two primary languages I work in. I work for a financial company. We maintain the apps for small- and regional-sized banks in the United States. Fairly fun work there. It's kept me quite busy here lately. For other things I like to do for fun, like to go for a jog, like to push away from the computer now and then. So I go jogging every day, try to run about nine miles every day. My two big de-stressors are the running and the fiddling with my Emacs configuration, kind of opposite sides of the coin. But I need them both to stay happy, I think. That makes sense. Also a soccer coach. My kid is in high school and coached his recreational team. They have a lot of fun with that as well.

Sacha: Yeah. One of your blog posts mentions that you've been publishing your youth soccer webpage in ox-hugo.

Ross: That's right.

Sacha: Emacs can be used for everything.

Ross: It can, yeah. That's right.

Sacha: We're also very curious about how people get into Emacs and what makes them stick with Emacs.

2:06 How Ross got into Emacs, used other editors, and then came back to Emacs

Sacha: In your story for the Emacs Carnival in Take 2, you shared how you got into Emacs. Well, you were introduced to Emacs in 1997, but you actually left. You used other editors for a while because of work, and then you came back to Emacs. Was it primarily for Haskell and Clojure, or were there other reasons that got you interested in it?

Ross: Yeah, when I was at the Haskell shop, it was something that a lot... When you get out into the workplace, there's very few Emacs users, relatively speaking, in most workplaces. But when you're in a Haskell shop, that's what almost everybody uses. So being surrounded by that, that was a good reason to get back into it. I'd been dabbling in it a little bit before that, even. I had a really good time with it originally. I got into it like so many people did back then. I got into it in college, showed up, and that's what the professor was using. The first language that we learned there was Scheme, which is a Lisp dialect, so it's a natural fit there. Back then Emacs and Vim were the two dominant editors at that point, so it was pretty much one or the other. If you were learning a Lisp dialect in school, the professor was going to guide you toward Emacs. I got that initial shove and fell in love with it there. Then I got out into the workplace, and in the workplace back then, it was very rigid. You would have to use the commercial editor that was integrated with all the IBM software, so I had to use these specific things and I couldn't use Emacs anymore. I did dabble in Vim a little bit as well and I liked the efficiency of editing that came from both Emacs and Vim. Vim was easier to emulate than these other editors that I had to use. That had me on a Vim path for a little while. But then scripting it just wasn't as satisfying as Emacs. It was always really calling to me. I felt like I was in exile while I was outside of Emacs. Then, when I had a chance to start picking my own editor and customizing things again and getting up to speed with other people who were using Emacs, it was just natural to come home, and here I am again.

Sacha: Nice. Many people haven't had the experience of working with other Emacs users in the same company. So what is it like? Were you swapping lots of config around, pair programming, that sort of thing?

Ross: Yeah, pair programming, sharing config. I am fortunate at my current workplace, even though it's a much smaller percentage than it's been in some other workplaces. It's also a large company, and we have an active Emacs channel there within the company Slack. A lot of people are interested in it there, so I've got my little inside community in addition to the outside Emacs community as well. Fortunately, I still get that even to this day, so that's pretty fun.

Sacha: You're the second person has described the wonders of having a company internet channel on Slack, just about Emacs. Yes. Very awesome.

4:58 Config focusing on built-ins

Sacha: I'm wondering, with your current company, is that the reason why you have so many "gotta run with just the built-ins", "gotta run even if you've got Emacs 28"... Is that the reason for those kinds of considerations in your base config?

Ross: That was kind of a premature optimization that worked out very well for me. I used to run a very extensive config. I'd look at all the classic configs that would go out there and install all the packages from MELPA. I'd try them all out. I'd just accumulate these things. I went through some Emacs bankruptcies. Then people in the community started talking about, okay, Emacs 29, it added use-package out of the box. It added... I can't remember when project.el came along, but it added these things that started... You used to have to get them from outside, or you used to have these other libraries, and Emacs got a lot better out of the box. I started to say, okay, I'm going to do one more bankruptcy. I'm going to see what I can do with built-ins. I started experimenting down those lines, even though I was always using that extended config. I was challenging myself. How much can I get from a built-in config and then just have a little bit of extra for those gaps? Because there are gaps. I do love Emacs built-ins, but I am more comfortable with the regular one. But I challenge myself that way. This month, I got put on a project where I have to work in a sandbox environment. So it's not regular operating procedure, but I have to do all my work in the sandbox environment. There's no network egress. I have to say, okay, if I want packages in here, I have to talk to the admins of that system and say, I want these packages. I lobbied for Emacs on it. They thought, well, that's kind of weird, but it's just one more line of apt-get in the Docker container, so they're fine with it. It was an old version of Debian Bookworm. I was running Emacs 28. I'm like, okay, well, I've got this built-in configuration. This is its moment to shine. I tried to run it on there. I was able to copy the file up there. I tried running it on there, and I run into things I’ve been using setopt. I’ve been using one of the XDG packages for setting your X desktop group directories, so to have a standard place to put your config files versus your cache files versus your state files. In Emacs 28, they had most of those variables, but one of those variables didn't exist yet. So I felt a few paper cuts that way. Up near the top of my config, I've got a compatibility layer. The compatibility layer, there's a nice compat package out there. I can't remember. I think Omar, who you interviewed recently, I believe he's one of the people behind it. And tarsius, I think he's involved in that too. I could be misquoting on that. Maybe I'm misattributing that. But anyway, there's this wonderful compat package out there. If you're a package author and you want to have your Emacs package running on older versions, it's great for that. But the whole point of this is I don't have any external packages. So where I need this compatibility layer the most, I can't use this lovely compat package out of the box. So I had to reinvent a few shims. I think I could bring that up. Am I sharing my screen?

Sacha: Yes, you're sharing your screen. That was one of the things that immediately struck me about your config. You're so hardcore about not using external packages that even your adapting to older versions, you're re-implementing things yourself in order to be able to stick with your constraints. I think that's hilarious, by the way. You started it off with it as a personal challenge because, of course, people are allowed to set arbitrary challenges for themselves, and then it turned out to be surprisingly useful for you in this limited environment.

Ross: Yeah, that's one that really saved my bacon.

Sacha: Yeah, this is great. So even things like setopt… Then you have keymap-set. You’ve got some replacements for these modern niceties to make it still work in Emacs 28.

Ross: Yeah, I leaned into the new keybindings. There’s keymap-set, keymap-global-set, keymap-global-unset. Those are roughly the same as what you had in older Emacs versions but you don't need to pass the keyboard macro around all the things, so it's a little bit more concise. There were a few more advantages to it and I'd already been on Emacs 29 or Emacs 30 everywhere else. I'd already leaned into those, and then I got into this environment. But as you can see, they're fairly easy. This is not a 100% full fidelity. There's a few nuances that get missed in doing this, but for the most part, it works pretty well. I'm not aiming for perfect here. I'm aiming for "this works well enough at Emacs 28 for the life of this project, which should last about a month." And otherwise, I've got the nice full glory Emacs for my daily driver. It's straddling that divide fairly well.

Sacha: I just looked up when Emacs 28 was released. This is 2022, so four years ago.

Ross: Yes.

Sacha: A lot of Emacs has changed since then. But of course, Emacs being Emacs, there's a lot of effort put into making sure the old stuff keeps working, which is handy for these cases. That's great.

10:12 simple-orderless

image from video 00:11:23.700Sacha: So you have a lot of these shims, and one of the things that you've ended up re-implementing along these ways is a version of orderless that works without having to take the entire orderless package in there. Can you tell us a little bit more about what you like about your setup?

Ross: I wasn't happy with any of the built-in completion styles. Well, some of them are okay, but the overall... I had used orderless in my more extensive config. Orderless, for people who don't know, is a way of completing things. Let's see if I can show it off. So I can do... If I do "file" and "find"... Well, I thought it would work.

Sacha: Do you need a space?

Ross: Yeah, I don't know why the space wasn't completing. So I can do "file". "find file". I could do the space. I could do it in any order as well. Or I saw there was an "ido" in there. If I do it in reverse order, that's the idea of orderless is if I'm using the space, I got thrown off there. It was auto-completing a hyphen on me I didn't expect. Anyway, if I remember some tokens and things, let’s say I’m looking for ido-find-file, but I type "find" first and then I do... What orderless does is it takes the input and it splits it by space and it will find them in any order. It's a nicer completion style than I think any of the ones that come out of the box are. I got used to it. But if I'm in this lean config, orderless is something... It is not a built-in. That's something that I was leaving behind. That was one that was really starting to itch. Then I found this blog post by James Dyer where he'd implemented a very slimmed-down version of orderless. It wasn't the full features that you get, but it was something that was good enough that captured the basic principles of it. I took that. I found a few bugs in it, and I found a few more things. It was a very, very simple version of orderless, and I wanted a couple more bells and whistles. The completions weren't quite right to my tastes. I took that blog post. I ended up with a middle ground. It's not as good as the full orderless, and it's a little bit more extensive than the blog post that I found. But I'm able to run that, and I don't really miss the full features of orderless that much. There are all sorts of cool things that it does where you can say, okay, these are regexp tokens. These are literal tokens. These are NOT filters. You could do all sorts of combinatorial logic with it with various syntax. You can customize the syntax for it. It's all great, but I wasn't using those extended features of that package that much. I am happy with this lighter-weight version. That way I'm able to use it even when I'm off here in the security sandbox. I'm able to do it there too. It exposes the underlying tension of this setup. I would recommend 100% use orderless. It's better maintained. The maintainer is a lovely person. It's more full-featured. You can customize it. I ran into a little bit of a hiccup here and it's my own config. This is something, it's going to be more professionally maintained if you're using orderless. So if you're not adapting to my built-ins only method, I would 100% recommend using orderless instead. But because I have this constraint, I'm building this up. What I built up is kind of nice. It's one of the more interesting parts of my package, or of my config. I could spin it off as its own package, but if I spun it off as its own package, it's just a strictly worse version of orderless at that point, so what's the point? That's one of the tensions that you have in these built-ins, is anytime that you build something that is really interesting, you want to spin it off and share it, but at that point, you've defeated the purpose of being built-ins only.

Sacha: I think the idea then of looking at the packages that you really like and if you find that you're only using a subset of their functionality, being able to strip it down or take advantage of somebody else's work and stripping it down to the subset that you use makes it a lot easier for you to put it all together in your batteries included, built-in only configuration.

Ross: Right.

Sacha: It's not super long. It can be understood if you go through the function. So that's great. Are there other things like that that you find yourself wanting to extract from other packages?

14:29 Size indicator

Ross: I did this really weird little thing called size indicator mode. I'd already spun that off. I don't know if it was worthwhile or not. One thing is all of your list commands, they run things in binary bytes. When we say a kilobyte, what does a kilobyte mean? Does that mean 1,000 bytes or 1,024 bytes? Most of the commands that you run, they're going to be in these binary units. What you get out of the box in Emacs is the decimal unit. Their definition is 1000 instead of 1024. I thought, well, that's kind of weird. I built this size-indicator-mode where it goes and it translates things so it's unified across the way the coreutils work. It's the 1024 base instead of the 1000 base. Trivial little package, but it was a lot of fun I threw it out there. It's up on my Codeberg if anybody wants to pull that in.

Sacha: Yeah, so it just reduces the friction of having to think, okay, is this in this unit or is that unit? It'll always be in the units that you like to use when you're talking about files.

Ross: Exactly, yeah. It keeps things consistent that way. That's a package that I spun off. Is that something that... It's a very lightweight configuration. It probably could have stayed here in my built-ins. I doubt anybody else has that itch, but I shared it out there and a lot of people thought, ooh, neat. I think a few people did install it. I'm glad I spun that one off, I suppose. There's always that fuzzy line. Where does it grow into something that you think other people are going to be interested in, versus what are the ones that you should just keep in-house and they can always copy it out of your config if they're interested? It's a hard line to walk in this style. I haven't exactly found the balance yet, I don't think.

Sacha: A lot of your config isn't so much new functionality as it is just filing off the corners or making something a little bit nicer to use. For example, when I was going through your config, both the base config as well as the extended one where you have more packages and things set up, I was like, oh yeah, okay. You fiddle with your visual-bell, but you also, in your extended config, set it to mode-line-bell instead. That sounds interesting.

Ross: Right.

16:40 Graceful degradation

Ross: I go for graceful degradation. When I was doing web pages as far back as the 90s, when I was first into Emacs, everything was about graceful degradation as you had these new browser features. You're trying to use these new shiny things. I'm old enough. I've been doing web pages since before there were cascading style sheets. But anyway, as we were starting to do CSS and as we were starting to do JavaScript, it was all about progressive enhancement: do the shiny things for the browsers that can support it, but also have this nice baseline of functionality for those that can't. I've tried to do that with this base level config. I've got the visual-bell that's built into Emacs and it flashes the screen. It puts up this annoying triangle sign. I don't like that that much. This one, if I can make the bell ring... Oh, this would make the bell ring. Why is it not?

Sacha: I guess C-g doesn’t just automatically make it... Oh, C-g works for me, so I don’t know.

Ross: It usually works for me, too. I don't know why it's not triggering a bell here.

Sacha: That's OK.

Ross: Curse of the demo.

Sacha: Yeah, yeah. Anyone interested can go look it up.

17:48 emacs-lock-mode

image from video 00:19:01.733Sacha: Then you have a couple of other things around, for example, making it easier to not kill a buffer. I hadn't known about emacs-lock-mode either.

Ross: Oh yes, Emacs lock. Yeah, so there’s this emacs-lock-mode and it is not the same. It's easy to confuse this with the lock files. You know those files that you get the hash signs, like you get ".#name-of-the-file#". That's something from when Emacs was used more on multi-user environments. Whenever you had a modified file, it would create these lock files, and it would prevent two users who were editing the same file on their own Emacs from stepping over each other. How often in modern times are we working on a multi-user system? If it is a multi-user system, are they both using Emacs on the same file? That's something that was very important in the late 90s and is not very important now. This is not those file locks. This is a buffer locking, and with the scratch buffer... I've got this turned on. Evaluate it. Make sure it worked. Let's go to our scratch buffer. Here's my scratch buffer. I don't want to accidentally kill it. If I try to kill it, it's going to say "Buffer *scratch​* is locked and cannot be killed." I'll use this for notes all over the place. I've accidentally killed things too many times. The scratch buffer is not typically backed by a file, and I've lost too many things. This way, I know this scratch buffer is always going to be a persistent place. There are other approaches to it. I think there’s a persistent-scratch package that's out there. But again, that gets me out of the built-in zone. That might be a progressive enhancement, something that takes your scratch buffer and backs it with a file. That would probably be a good thing to do. So that's one of the packages I'll be looking at adding in the other config. But emacs-lock is built in. It's one of those things that's so obscure you can't even find it in the Emacs manual. It's just out there. I don't remember where I picked it up. I think just scanning somebody else's config I picked it up somewhere, but I couldn't find it in the manual at all.

19:52 exiting Emacs: yes-or-no-p

Sacha: I was going to ask you where you found it. You occasionally read other people's configurations for interesting ideas. And then you have a bunch of niceties. Actually, before I go into that, @Ray-On-Emacs has a question. "How do you exit Emacs then? Or do you never exit Emacs?"

Ross: I almost never exit it.

Sacha: I think the emacs-lock-mode for the Scratch doesn't kick in if you're closing Emacs as a whole?

Ross: Correct.

Sacha: If you're closing Emacs as a whole, it will happily still discard your Scratch buffer, but as Ross says, you could also not exit Emacs.

Ross: Yeah, I've got the flippant line in here: ¨Exit Emacs? Surely there's been a terrible misunderstanding,¨ But I do configure the way that I do it. I want to make sure that the confirmation of it, it's the yes or no.

20:46 yes-or-no-p

Ross: I don't want to accidentally hit that key binding, so I will use the full fledged yes-or-no-p`. That's one area that I diverge from a lot of people's common things. One of the very early things a lot of people set in their config is they’ll rebind this yes-or-no-p to the y-or-n-p so that way, they only have to type the one character. Emacs is fairly thoughtful about which ones that it makes you do "yes" or "no" versus the "y" or "n". The things that are quick and inconsequential, those are the ones where it gives you the prompt that it's just a "y" or "n" answer. The ones that are going to be more destructive and you really want to stop and slow down and think about, that's what the yes-or-no-p is for. People stomp all over that in their configs, and I think that's one area where I'm a little bit out of the mainstream. I like the defaults on Emacs there. It is thoughtful about which ones it prompts you for that on. But if I remember right, confirm-kill-emacs was one that was just a "y" or "n". That's one of the more dramatic ones that's out there. So I did customize that to make sure, yes, I really mean that.

21:45 Processes

Ross: Then there's some annoyances where if you've got a bunch of inferior processes running after I've already confirmed that I want to kill Emacs, well I just said I want to kill Emacs, so I didn't want to be prompted about the processes. I do quit Emacs enough I've customized how it shuts down. I don't do it that often.

Sacha: I imagine if you really want to stop yourself from closing Emacs, you might just change the key binding and make you M-x it instead in order to exit it, so you really absolutely don't run into that.

22:18 Moving keymaps

Sacha: In fact, your config has some of these lambdas where you are telling yourself, okay, this keyboard shortcut has changed. You have this thing in Magit, I think, where you're like, I moved the key map and now it's somewhere else. I thought that was interesting too.

Ross: I'm trying to remember what that one was called.

Sacha: There you go.

Ross: Yeah, the crab-juice--moved-to. I'll bind my old key map as I'm trying to move things around. I used to use Spacemacs for a while. I used Doom Emacs for a while. I've looked at a lot of the other configs and I've said, okay, this architecture makes a little bit more sense. I want to rebind my prefixes that way, but still, for the ones that are deeply ingrained, it's sort of like a deprecation warning, except for key bindings. It looks like I used to run on C-c g. So if I try to do that, it's going to say, nope, moved to C-c v c. And now I can do that. C-c v c, and there’s my Magit command.

Sacha: Yeah, I like that you actually ended up mapping the whole keyboard shortcut instead of just the C-c g one because, of course, your muscle memory is getting you to put in the whole C-c g and then something. This one lets you have the full keyboard shortcut before it tells you the message.

Ross: This is using user error. So I thought when I hit that one, I thought I would flash my mode line, but the mode line is not flashing. I know it flashes on my other machine. It flashes on my work machine. It doesn't flash on this one.

Sacha: The challenge is getting a config to work in many different environments. You've got your work machine, you've got this personal machine, and then you've got the sandbox one that's got a really old version of Emacs on it. Okay, so a couple of other things that you've mentioned.

24:23 Writing in Org Mode and Markdown

Sacha: You do a lot of writing in Org Mode as well, right? You've mentioned using the literal programming part of it a lot. You do a lot of work with Markdown. Do you have any interesting workflow tips for people who are finding themselves writing with either Org Mode or Markdown in a work environment?

Ross: That's always a tension as well. I would rather be in Org Mode. Org Mode has more bells and whistles. You can program more things in it. It's a programmable Markdown in a sense. I'm much more comfortable in Org Mode in general. Now, I don't use Org as a personal organizer as much. I would like to. I've dabbled in it a little bit. I've seen some of your previous interviews and people doing mind-blowing things with that. I'm jealous of what they're doing. I would love to get to that level. I'm still a relative newcomer to Org versus how old I am at Emacs. I'm a relative newcomer to Org. So I haven't embraced that yet, but I do use it as my general, if I'm writing a document by myself, it will 100% be in Org. This document that we're in, it's my entire website. My Emacs config is in here. My Nix configuration for how my systems work is in here. I like to do barbecue. Some of my barbecue recipes are in here. Just general blog posts about things that have nothing to do with technology are in here. It's all one big Org file. That style is emphasized. I'm using ox-hugo to take this document and export it to the website. They encourage having one big large file for that. I followed suit on that. That's why I have just this one giant document. In the work context, if I'm starting a small document, I'll start it in Org Mode. But then when I started in Org Mode, if other people want to edit it, we got a small Emacs community, so depending who I'm sharing it with, that might be fine. There's a couple people I can pair with on that. If I'm working with them, everything is great. But that's not something... There are Org implementations that work in other editors, but it isn't as good anywhere else as it is in Emacs. That's what everybody's going to typically use. And if they're not using Emacs, they're not going to be that warm to Org. I hate to say the dreaded two-letter acronym, but with AI, you're seeing a lot more Markdown. People are starting to program in Markdown. Markdown is bigger than it's ever been before. It's just unavoidable at this point. So what I'll do is I'll start a document in Org and then I can export the Org document to Markdown if I'm going to put it into GitHub or sometimes I'll just use Google. It really depends on how the collaboration model is. If I'm going to be collaborating with a lot of people up front and iterating real quickly, I'll do that in a Google Doc and I'll export that to Markdown. If I'm writing it myself as a first draft, I'll start it in Org and export that to Markdown. Markdown ends up being the target in the workplace for anything that's permanent though. I don't love it. I wish Org had won. All my personal projects, they'll have a README.org on them rather than README.md, but it is what it is and you've got to play nice with your co-workers too.

Sacha: Yeah, I find myself having a hard time remembering to switch the link syntax. I have a "do what I mean", just insert the link. I don't care what syntax it's in, just make it work.

Ross: Nice.

Sacha: You mentioned sometimes in your Zoom calls when you need to exchange notes with people faster, then you have to use Google Docs for that one because that's what they're familiar with. But there might be some easy ways for you to ship that back and forth between Org and Google Docs.

27:49 Ethersync?

Ross: One thing I'm really looking forward to is there's this project. I can't remember what it's called. Ethersync. Yes, thank you. I've seen some various attempts at that and I had a little bit of success with them, but none of them have lasted. I'm really rooting for that team. I feel like Emacs got rejuvenated. It used to be, okay, it was hard to use Emacs because if you're in a niche language and you're using a niche editor, you had to find a community that used both of those to have decent support. Then LSP came along. You have your language servers. So now I can write in these niche languages that not everybody's writing Emacs, but I still have a good experience thanks to Eglot and thanks to the language server provided by those communities. Emacs became viable again for doing a lot of development. And I'm hoping that Ethersync kind of becomes like the LSP of collaborative editing, where it's not something where it's only Emacs users sharing with each other, but it works across editors and people can collaborate in real time that way. That would replace that Google Docs use case I have. The only reason I use Google Docs is we can see each other typing and edit things on the fly together. So I'm very excited about that Ethersync project. I hope that takes off.

Sacha: Yeah, I think that will probably be more feasible than hoping people will switch to Emacs and then use CRDT. There are other interesting collaboration things in your config.

29:16 Managing Github with Forge

image from video 00:30:35.700Sacha: You've mentioned Forge. You have some things in here for cloning to different directories depending on the repository, committing with different addresses, confirming before merging pull requests. Can you tell us a little bit about these quality of life improvements for you?

Ross: Let me see if I can come up with an example here, first of all. So this is Forge for people who have not seen it. Let's do...

Sacha: So when you don't need something like real-time collaboration, for the people who are watching, Forge lets you manage your Git repositories with the pull requests and other changes and things like that, right? I don't use it yet, so... Yes.

Ross: Yeah, so it's essentially a GitHub client. So I was looking... I'm here in my Forge test directory. I'm trying not to share any of my work repositories. I use this primarily at work. I just set it up on this machine last night. Still probably a couple of rough edges. I can list the topics. And if I list the topics, I can see I've got pull request 20 open. I can hit enter on it and I can see, okay, it's open. It's in state pending. This is where it's going. These are the commits. I can look at the commit and see, okay, what is this person doing? Oh, they're trying to add another line to this file. And if I say, okay, that looks good. I can do, what is it? I can look at this and I can say... This works better if it is in a full screen editor. Let's do... I thought I was tracking this repo already. I had this working last night. Curse of the demo again. Anyway, I'm able to approve pull requests from this. I'm able to... Reject pull requests. I'm able to comment on pull requests. I can look at the diffs. So all of my integration with GitHub is done through this. I'm in an environment right now, I'm a staff engineer. I participate on a lot of teams. I get over a thousand GitHub notifications a day. The GitHub notifications that are built into the browser are just not sufficient. That's something I was able to pull it in with Forge. I'm able to tag things. I'm able to mass mark the things. I get a lot of infrastructure things that they're important, but they're not important to me. I get notified on them all the time through the various automations. I'll get them. I'll get a hundred of those at a time and I can just mark a region of those and knock out a hundred and say, okay, that's off my plate. Moving it into Emacs, as awkward as this demo is, it works great on my work machine. I'm able to keep up with things so much better than I was before. Let's see. I should be able to, if I want to look a little bit deeper and see things in the GitHub, at least this works.

image from video 00:32:21.833Ross: I can open it and see this directly. Then if I want to merge it from here, I can. Or I should be able to merge. Now I can do a regular merge or a squash merge or a rebase just the same as I have this button here. That's all built in here. Let's go ahead and merge this pull request.

Sacha: All right. That little detail about you dealing with like a thousand notifications a day? It makes the guardrails that you added to Forge in your config even more interesting because you can stop yourself from accidentally automatically merging in things that need more review or whatever, which of course is difficult to demonstrate at the moment because work stuff, private. But if other people are listening and thinking, they're dealing with a similar volume, you can modify Emacs to stop you from making mistakes like that. You can add just enough friction for the cases where you need to pay more attention. And @PuercoPop, there's a gh-notify package specifically for high-volume GitHub notifications. I'm not sure... Have you come across that one yet?

Ross: I'm curious what that looks. The term "notify" concerns me, like if it's helping me manage notifications in bulk, I'm interested. If it's going to pop up something every time I get a new notification, I'm very much disinterested. I don't know whether to be excited or horrified, but I'll take a look.

Sacha: I think because @PuercoPop is recommending it specifically in the context of high-volume notifications, it might provide you that inboxing where you can filter. I haven't looked into it myself, but I'm getting the sense that this is a problem that many people who use Emacs face and who solve it a very Emacs-y way.

Ross: Yes. Forge has all these nice things built into it already, but I wanted to customize the workflow a little bit. It's right here in the comments, the things that it does. It makes sure that it's mergeable, there's no merge conflicts, makes sure that all the status checks ran, makes sure that all the approval is done. One thing that the Forge does not do is it does not show you comments on your pull request. There's a code-review package that's out there. It's been through a lot of forks. I'm still integrating that into my workflow. I've got a fork of a fork of a fork that I have. This is life in Emacs, for better or for worse. I've got a fork of a fork of a fork of a fork so I can see those comments. I haven't fully integrated it with Forge yet. That's a work in progress. But anyway, I didn't want to be merging these things and ignoring if somebody's taking the time to give me feedback. I don't want to merge things because sometimes people will approve things, but they'll say, hey, just a little nit to pick. You got a typo here. Don't want to slow down progress, but you might want to take a look at this. If I'm just sitting here entirely inside of this, I'll never see that. So this also checks for unresolved threads. I've got some embedded GraphQL inside of here that makes it all work and we grab that data from the GraphQL and then I'm able to just do this inside a list and prompt on these things and if it finds there's anything that isn't right it gives me these safety checks along the way and yeah it's really nice.

35:49 Committing with work addresses vs personal

Ross: One other issue that I had was we had this requirement at work where we needed to start committing with our work email addresses rather than our personal addresses. I use my same GitHub account for work and personal. I needed to get that moved over. To do that with GitHub, you need to do those merges via the API. I've got things configured. All of my work repositories are partitioned off into their own subdirectory of my projects directory. I've got a git config that sets my email address to that. So if I'm doing things locally, it works. But if I'm doing these API merges that are necessary for certain repositories with certain safety checks, I needed to be able to thread that along. I've got a bug fix in here for that, where I'm threading along that email address that reads my git config and passes that along to the API endpoint. Otherwise, it was committed as the wrong identity. There's a few things here that I'd like to contribute upstream to Forge. Some of it is very bespoke to me, and some of it I think would be useful to everybody. I need to tease that apart still.

Sacha: I like your technique of separating things into different subdirectories and so that all of your work stuff goes in the work directory or all of your personal stuff goes into projects or whatever. Then you can change your settings based on the location of the project. Even cloning a project will automatically pick the right directory to put it in. I saw that in your config. That's pretty clever.

37:13 Emacs tinkering as stress relief

Sacha: I'm curious because a lot of people find it challenging to balance the workflow improvement I get to tinker with Emacs versus actually getting work done, the time balance between those two. It's a little hard to figure out sometimes. What is this like for you when you're sitting down, you're doing some work, and you realize "There's probably something that I can write to make this smoother?"

Ross: I've been doing Emacs off and on for about 30 years now, and when I get that balance right, I'll let you know. I don't have it right yet. I know I spend more time tweaking things than I probably should. It's a stress reliever for me. I get tired of doing the other things. I still love computers. I've loved computers since I was six years old. Got my first computer then. My aunt got me a book on programming when I was six. I started going through that book, and I was off to the races on that. I relax by doing computers. Some of the open source chaos is a lot to deal with, and using the same languages that I use at work that feels too much like work, so being able to withdraw and just tweak things... "Okay, this irritated me." It's a combination... From a pure productivity perspective, I overdo it for sure, but I guess the stress relief if I would burn out otherwise... Maybe I'm getting it right after all. It's hard to say.

Sacha: Besides, you might also be able to say to yourself, well, I do have some Emacs co-workers. I'm sure they can benefit from this too.

Ross: I do.

Sacha: You're helping them out too. Okay, I want to dig into some of the things that you have around improving Emacs' capabilities as a self-documenting editor. You have some configuration snippets that make getting help easier. I hadn't come across them before, so I wanted to make sure other people knew about them too. Like your thing about making apropos look at all the things and sort by scores. It can sort by scores? What kind of scores are we talking about? How does this work?

Ross: One thing that I have done, a little bit off-topic for the question that you've asked, but I have linked everything very aggressively to the info manual where I found things. Sorry, I got caught in a recursive edit here. So let's open this. What was that doing? I'm also struggling because I've been very busy at work lately. I'm used to the Mac key bindings again. I'm back here on my Linux machine. I haven't adapted to the Ctrl versus the Cmd. So yeah, all apropos commands will sort their lists or results in alphabetical order. If sort by scores is non-null, they try to guess the relevance of each result. My comment looks like it's a little bit obsolete here because it looks like for the documentation, I do like the sorting by scores, but for regular apropos, I did not. I think I tweaked something and didn't update the documentation.

Sacha: That's okay. I was just curious about it. Then you also have some things like, if it's an autoloaded symbol, then go ahead and load the library so that you can get help for it. If there's a shortdoc example, include that as well in the documentation of a function. So if people are reading configs for ideas, I thought I would call attention to this part because it sounds really handy.

Ross: Yeah, I found these. I've just been going through... Part of my relaxation...

41:06 Under-appreciated Emacs built-ins

Ross: This is such a dorky thing to say, but part of the relaxation is I'll go through the Emacs manual looking for things. The overall structure of this document follows the Emacs manual fairly closely, and that's not by coincidence. I've just been going through chapter by chapter. Okay, well, I started with Emacs 19 or whatever. Emacs 31 is around the corner. I better at least catch up to all the goodies that are in 30. I'll read the manual, and I'm finding a lot of these things there. That's why I have so many links back to the manual inside of my code, just because I'm going through that. That's where you can find a lot of these hidden gems. I'm hosting the Emacs Carnival this month, and it's the underappreciated Emacs built-ins. I said, if you want to find any of them, go in the manual. They're there by the bushel.

Sacha: It feels almost like a book club. We're going through the manual together and finding all these gems that I wouldn't have come across otherwise, because Emacs source code is too big and all that. I've been really appreciating the Emacs Carnival submissions thus far. Of course, there are lots of other things that are not in Emacs that you've also been exploring and checking out.

42:20 gptel

Sacha: Am I allowed to ask about the gptel stuff?

Ross: Of course.

Sacha: I was curious about how the quick lookup stuff has been working out for you. What kinds of things do you like to use that for?

Ross: That's one that it was pretty exciting and I haven't really fully worked it into my workflow yet. I tried it. I liked it. I haven't internalized it. I was trying that one night. what what is capable of is you can just highlight something and do. It's almost like a quick Google search, except it'll bounce it off the model of your choice. It will pop up things a little bit faster that way. For the most part, I'm just using stock gptel, where I've just got the chatbot window. I'll copy a region and I'll put it into gptel. I'll run it off the model, say hey, I got a question about this, help me with this compile error, help me with that, and so forth. I don't... Talking about AI is always difficult because it's such a controversial thing and to use it at all, you offend a lot of people. I'll say, I don't really buy into the agentic workflow. I'm happy just using things as a chatbot and little snippets here and there where I'm still firmly driving. So the people who are fully bought into it, they don't think I'm using it right. Then there are a lot of ethical concerns that I share. I don't have the gptel on this. I use it for work. I don't use it personally. That's just the way I've been able to compartmentalize all my concerns with it. But just being a technologist, being a principal staff engineer, I do need to get up to speed with these tools. So I have had to get used to them and keep up with what they're capable of and what they're not. At least for my... Setting aside all the concerns around environment and whatnot, all the other concerns that we have with it , I find that GPTel is that sweet spot where I've just got this pair programmer where I can run things off, bounce a few questions off it, get things, but it's not getting write access to my file system. I have a security background. Worked at a security company for several years. Just the access that people are giving to these agents, I find absolutely terrifying. There's a lot of work that goes into using that properly, I think. I get most of the benefit. I feel like I'm de-skilling myself a little bit less than I do when I try the agentic workflows elsewhere. So I love gptel. Now gptel, it does have this interesting agent mode. I haven't tried it yet. Again, I have some security concerns around that. I need to figure out how to make sure that whatever I give it write access to... It's not getting too much write access to anything. But that is a project that's on my radar as well, to try to do things that really do benefit from this unattended work. I'll dabble in that as well. There's a whole gptel ecosystem. Karthik does an amazing job with that.

Sacha: I like that you have a very considerate approach to it. I also like the humor with which you describe this and other things in your config. You aren't buying into the hype. You're like, this is your least unfavorite way of doing things.

Ross: Yes, exactly. There's some commentary out on one of the nuclear test sites about "No deed of honor is performed here." I've quoted some of that in this part of the config too, just kind of my protest of doing this. I've got to do this and there are certain ways... If I have to do this, these are the ways that work for me. I'm getting some benefits out of this, but also I don't entirely feel great about this either. That's kind of how I've compartmentalized that.

Sacha: Yeah, that makes sense.

46:04 Getting older

Sacha: One of the other things that you joke about a couple of times in your config is getting older. So with things like your repeat-exit-timeout and your mode-line-bell-flash-time, you’re like, okay, might change it to track my senescence. I appreciate your sense of humor. Are you finding that there are things that you like to tweak about Emacs in anticipation of change as you get older?

Ross: Well, my font size is definitely bigger than it used to be. I guess that's something that has changed over the years. I used to be able to operate on a tiny font, no longer on that.

46:46 Lindy's Law and tool longevity

Ross: I guess Emacs and aging just feels like I made a really good... I wish I'd stuck with it for the full 30 years. I'd be fumbling around a little bit less in this demo. I'm not as smooth as somebody who'd been on it for the full 30 years, so I regret that time. I've just seen so many editors come and go. And when I talk to junior developers, I do a lot of mentoring. Like, I'm not necessarily going to say that you should go down this road, but if you do go down this road, it is something. that is probably going to be richly rewarding for you for a long time. There's this thing... I think it's called Lindy's Law. I'm sure I've quoted it here somewhere. The expected lifetime of something is proportional to how long it's already existed. And with Emacs... Emacs has been around... I'm very old. I'm 47. But Emacs is a little bit older than I am, depending on how you start counting. Emacs has been around for a long time. It doesn't have the market share that it used to, but it's something that still has a viable community. You do the Emacs News every week. You know probably better than anybody else how viable the community is right now. It's still an exciting place to be. I don't see that changing anytime soon, whereas I've seen so much hype over... Everybody wanted to get on Atom, and now Atom is a basically dead editor. Sublime had this rise and fall. So many other editors. Now I see people... VS Code was dominant for a while, and now I see a lot of people abandoning VS Code. It's still the dominant editor, but you can start to see people moving away from that. Emacs is always going to be here. So just as I've aged, I appreciate that Emacs, that same thing that I was using back when I was 18, a freshman in college, it's still working for me at 47. And by the time I hang up my keyboard, pretty sure I'm still going to be using it. It's done a remarkable job aging gracefully. Would I want to use the Emacs 19 today? Absolutely not. Am I fully comfortable using Emacs 28 in the sandbox environment? Yeah, there's certain things that I miss. But yeah, Emacs 30 is great. Emacs 31 is around the corner. It's kept up with the times. We just talked about AI. Emacs and AI, for all my concerns about AI, Emacs and AI are a great fit for each other because so much of the AI stuff that we're doing is text-based. Emacs is the best text processing platform that there's ever been. They fit each other so well.

Sacha: Yeah, yeah. And I find it very amusing that with you at 47 years old and I'm 43, assuming math is right, There are people in the Emacs community who would consider us still young whippersnappers.

Ross: That's right, yes. Different demographics around here, that's for sure.

Sacha: As well as, of course, the other end where you have high school students and fresh grads still enjoying it, still exploring it. And so it's great that we can customize this with larger font sizes or different key bindings or other ways to catch us from making careless mistakes to adapt to us and the things that we're working on. So all this is very interesting.

49:51 Nix is good at managing package versions and customizing them; Matthew Bauer (Bauer IDE)

image from video 00:53:01.300Sacha: Oh, actually, on a different tangent, one of the things I was curious about is a lot of your configuration is set up to work well with Nix. Since a lot of people in Emacs are curious about reproducible configurations and systems, could you tell us more about Nix and your experience with it in Emacs?

Ross: Yes, so I'm using that as some people use straight.el to pin their packages. Some people, they don't bother pinning their packages at all. I'm using Nix for people who are unfamiliar. Nix is... Boy, the elevator pitch for Nix. It's a package manager, but it's more than an Emacs package manager. It can manage all of your packages for you. So I'm building Emacs with Nix. I'm declaring all of my packages that way. Then that's specifying... I have a very repeatable build of Emacs and it has this version of these packages. One thing that Nix is very good at is it's very good at customizing certain things. So if you want to run a patched version of a particular package, you're able to specify, okay, I want this package, I want to use this package definition, but I want to overlay these files on top of it. Nix excels at that. I'm running a lot of customized versions of various packages, things that I've tried to submit upstream, and the Emacs package might be abandoned, or they might be a slow maintainer. I need to use it today, and they'll get around to it, and they'll merge it in a month. So on a temporary basis, I'll want to run a patched version. Nix makes that workflow very smooth for me where I'm able to run patched versions of certain packages, like I'm running a patched version of Forge like I showed off. Some of the things I want to contribute upstream, I've got those pulled out. I just need to sit down and actually submit them upstream. But I've got those ready to go and I'm able to run those out of the box. It's able to run... It's not just managing Emacs. That's the real magic of it. If I need certain binaries to support my Emacs config, I can declare those, and that all comes together and if I pull down Emacs packages, those are all going to be there together. There's a really fantastic example of this. Matthew Bauer has something out there. It's Bauer, I-D-E. B-A-U-E-R is his last name. He has one of the very inspiring configurations to me where he builds everything in Nix and he bundles all of his binaries that he needs in Nix and then he configures his Emacs variables to point, not at the git that happens to be on the file system, but to the git that he installs via Nix. So he knows that the entire thing is self-contained. That's something I've taken a lot of inspiration from. If I'm on a machine that has Nix, I'm able to run this. If I want to run my standalone config, I can run this command and I can run this command on any machine that I have Nix installed on. It will run very fast here. Should run very fast here. and this popped up and this is my base config and I could have run this on any machine or the my packages are named. It's an old Simpsons joke when Homer is stuck in New York. So that's the khlav kalash and crab juice. I think I've got a link to the YouTube video somewhere in my config. And there's the fully built in one. That's something I can get on a new machine. I install Nix. All of my dot files are there. If I want to just run Emacs or if somebody else wants to run my Emacs, anybody can take that config and run it.

53:25 Custom fonts

Ross: Now if you do that, a word of warning. One thing that I've done is this font that you see is a custom font. I took the Iosevka font and I customized a lot of the glyphs on it. When I do that, I build that in Nix as well. You can use Nix to build your fonts. That's part of my derivation. My Emacs config depends on my fonts. If you try to run these, you're going to have to compile the fonts. I compile a lot of variants of these fonts. I compile a lot of alphabets. Linguistics is one of my hobbies. I love to work in these other alphabets and things like that. I'm very opinionated on these things. Even in languages that I don't speak, I like the text to look a certain way. Just one of the other ways I blow off steam. But anyway, I've got this custom font that I use everywhere. It's the font on my website. It's the font that you see in my editor and my terminal. If you pull this package, you'll get my font and you'll have to compile that and you're going to heat the room with your CPU for about 30 minutes if you do so. So beware on that. Otherwise, if you want to run my config, it's all out there if you have Nix. I don't know how practical that is, but it makes me feel good.

54:30 Starter kits versus configs

Sacha: Now I'm curious, have you heard from people using your base config or your extended one?

Ross: I've heard of people copying out of it. I haven't heard of people depending on it directly. I would generally discourage people. That's kind of the difference between a starter kit and a config. You did an excellent series here on starter kits recently. I don't see this necessarily as a starter kit. This is very opinionated to the way I do things. I hope people look at it. I hope people draw inspiration from it, copy from it. Absolutely. But I'm going to change things on a whim. If you're using this as a base layer, you're going to find my opinions thrust upon you. You're probably not going to like half of them.

Sacha: Well, your config is very nicely documented and rather enjoyable to read. So I can imagine people will get a lot by reading it for the things they can copy and paste to their config. I also particularly like how even your code snippets, you've customized it to include the license. So it's like every little bit of that is easy for people to copy from confidently.

55:34 Nix vs Guix; Mac

Sacha: Trevok has a question. Hopefully without starting a philosophical war, why Nix over Guix?

Ross: I would love to run Guix, but I have a Mac for work and Guix doesn't have a good Mac story. I'm sharing a lot, not just my Emacs configuration, but a lot of other configurations, because Nix is more broadly scoped. I'm able to share a bunch of things between those two operating systems. So the server that I run, the rossabaker.com, that runs on NixOS. This laptop that I'm on runs on NixOS, and then I have the Darwin machine. There are certain things that are compatible between Linux. There are certain things that are compatible between the workstations. And then Darwin has its own weird area. I'm able to manage all of that with Nix. I couldn't do that with Guix. If Guix gets a good Darwin story, I will switch tomorrow, because I would love to be configuring with Scheme.

Sacha: Totally different tangent yet again.

56:26 Non-work interests: Org for documenting; ox-hugo and multiple languages

Sacha: Do you use Emacs for your other interests? You've mentioned things like you use it to publish your youth soccer homepage. What about for your aquarium or linguistics or other things you're interested in? Tell us about the non-work uses of Emacs in your life.

Ross: That would mostly be just documenting things in Org Mode. Like I mentioned, it's a big Org doc, and if you read this doc, you'll see that it's a very sprawling thing. For the linguistics, one thing with ox-hugo is that integrates nicely. I know you've been learning French. I think that's cool how you're doing that. Spanish and German are my two hobbies. I've actually got a trilingual site. The English is way more populated than Spanish and the German. Those are afterthoughts. I learned Spanish in college and I learned German in high school. I just try to keep current with that, but I'm not particularly fluent in either. There was a wonderful IndieWeb Carnival that came up. It was called Multilingualism on the Web and that's when I sat down and I'm like, okay, I want to do this. I'm going to write this article and I'm not just going to write it in one language. I'm going to write it in all three languages that I speak. Hugo has these facilities for taking the same article and publishing them on all three sites and linking them across each other. And ox-hugo, that passes through. ox-hugo uses Hugo as a compilation target. ox-hugo, I was able to set the metadata on there. If you've noticed my file name in this editor... I name everything after Simpsons puns: cromulent.en.org. And then I also have... I do have them separated by language. Here's my Spanish document and then, very predictably, here's my German document. By doing this in Org Mode with ox-hugo, I'm able to link together the posts that are translated into multiple languages. And then those all appear, if you go out to the Hugo site, like the rossabaker.com, you can go there and anything that's available in multiple languages, that'll show up. You can click through the Spanish or German translation of those.

Sacha: I didn't notice any shortcuts in your config for quickly switching to another, like the Org mode source in a different language for the same post. Would you happen to have any conveniences like that, or do you just manually switch to the other file and then find it?

Ross: I just manually switch to that, but the data is all there. The file names have to line up, so that's definitely a helper I could write. If I can find time to get back into this, that would be an excellent. I love your idea.

Sacha: Yeah, because I figured, if you're going to write something, you might want to switch between languages very quickly. If you make an edit, okay, "I'm going to add this thought to it. I want to switch to the other ones."

Ross: Yeah, typically I'll just take care of that with a split window and I'll have the two up there that way. That way, I'm comparing them side by side. That's probably why I haven't had that yet, but it would still be nice to see, okay, "I do want to make a quick edit in there." It would at least scroll me to that point in the other window quicker.

Sacha: If you add more language-related stuff to your extended config, I'm very interested in what people use to look up dictionaries, look up example sentences, and things like that. @blaiseutube says, "Recovering linguist here. English, Spanish, and French for work. Japanese, Portuguese, Sanskrit, and Swedish for fun." So I'm guessing there are a lot of linguists or people who do language learning as a hobby who use Emacs. It's great because you can switch to all the different input methods very easily too. It's all text. Oh, this is fantastic.

Ross: For all the diacritics that we don't have on the US layout keyboard, the C-x 8 key binding. Autocomplete if you need an obscure Unicode character, and it'll autocomplete on all those. So, okay, I want nice little built-in there.

Sacha: Yeah, on Linux, I've just been using setxkbmap to switch my layout temporarily, but I also like just being able to set the input method in Emacs in case I just want to write something quickly, then I can just C-\, I think. Okay, I've got about one minute before the kid does lunch break. Thank you so much for doing this. Was there anything that you wanted to pass on as a key tip that you'd like people to know from your experience with using Emacs? What's something we haven't mentioned that you'd like to share?

Ross: I guess I didn't mention the things that I think are exciting outside. We talked about the built-in configs, so the things that I missed the most, I would say... Well, I guess look at my crab juice config. Those are the packages that I found that I absolutely cannot live without. Magit, a few language modes. You can get by on the built-in thing a lot better than you think, but there are a few things that are out there that are the really special ones, and I think that's the distilled essence of that. Just take a look at that package. Those are the ones that, yeah, I tried really hard on the built-ins and I failed. These are the ones I really need. I'd encourage people to take a look at that as well.

Sacha: All right. For folks who are watching, you can find all of that stuff at rossabaker.com. Thank you so much. You've got links to your GitHub and Berg. Thanks to everyone on the stream for hanging out and for sharing your questions and comments. I almost forgot to mention [@ispringle] had a tip about putting emacs-lock-mode on a keyboard shortcut so you can toggle it if you wanted to. Nice idea. Again, thank you everyone. We're going to end the stream here. I will work on the transcripts and all that stuff. Thanks again Ross for doing this, and I'll see everyone around probably in September or October because I have to be on summer vacation.

I'll update this blog post with the transcript. https://sachachua.com/blog/2026/06/emacs-chat-with-ross-a-baker/

Find more Emacs Chats or join the fun: https://sachachua.com/emacs-chat

Chat

  • Ray-On-Emacs: ​​How do you exit Emacs, then? Or do you never exit Emacs?
  • pratikmishra4073: ​i stealing that lock mode hack. i too have killed scratch buffer accidentally before.
  • ispringle: ​`(global-set-key (kbd "C-c l") #'emacs-lock-mode)` is handy for one off locks too
  • PuercoPop: ​​There is a gh-notify package specifically for high volume GitHub notifications
  • blaiseutube: ​​I keep procrastinating my return to emacs 😔
  • gr1maldi: ​​Yo, and stuff. Sorry I'm late.
  • Ray-On-Emacs: ​​Getting older! Oh boy! more tell me, please
  • dubstepandlovee: ​​fantastic chat so far! as a local agent user, gptel-agent looks like an interesting project
  • Trevoke: ​​Hopefully without starting a philosophical war, why nix over guix?
  • dubstepandlovee: ​why nix over lix
  • dubstepandlovee: ​(joke)
  • Trevoke: ​​shakes fist in F/OSS Thanks for the answer
  • blaiseutube: ​​recovering linguist here. English Spanish and French for work. Japanese Portuguese, Sanskrit and Swedish for fun.
  • blaiseutube: ​​c-x h ? I love it
  • sachactube: ​​Maybe C-x 8 RET
  • blaiseutube: ​oh! thank you
  • Ray-On-Emacs: Thank you!
View Org source for this post

Emacs PDF View: Replace current page with file using PDFtk

| emacs

I needed to replace a page in a PDF with another PDF. This was a bit of an annoying process on my iPad involving copying and pasting pages in Noteful and then re-exporting them as a PDF, but it was easy to do in Emacs thanks to pdf-tools and PDFtk.

;;;###autoload
(defun sacha-pdf-view-replace-current-page-with-file (file)
  "Replace the current page in PDF View with FILE.
Requires pdftk."
  (interactive "FFile to insert: ")
  (let ((temp-file (concat (make-temp-name "pdf-view") ".pdf")))
    (call-process
     "pdftk"
     nil nil nil
     (concat "A=" (expand-file-name (buffer-file-name)))
     (concat "B=" (expand-file-name file))
     "cat"
     (format "A%d-%d"
             1
             (1- (pdf-view-current-page)))
     "B"
     (format "A%d-end"
             (1+ (pdf-view-current-page)))
     "output"
     temp-file)
    (rename-file temp-file (buffer-file-name) t)))
This is part of my Emacs configuration.
View Org source for this post