Categories: geek

RSS - Atom - Subscribe via email

Karthik's notes on Emacs Chat 24: Omar Antolin Camarena

| emacs

Here's a guest post from Karthik Chikmagalur in response to Emacs Chat 24: Omar Antolin Camarena.

  • 16:00 - Omar's embark-on-last-message is gold! I implemented it and have already used it a dozen times in an hour.
  • 17:00 - Omar mentions his tmp package for creating throwaway buffers. I use the scratch package for this. M-x scratch will open up a scratch buffer. If you had a region selected, that will be copied to the scratch buffer. By default, it will use the same major mode as the buffer you calling it from. Calling M-x scratch with a prefix arg will let you pick the major mode you want.

    I have some additional customizations to try to automagically pick a major mode based on what I have selected: https://github.com/karthink/.emacs.d/blob/3deed38c0e02e95fdfab6812c494b1736b945a1e/lisp/utilities.el#L36

    Also related is the edit-indirect package, which I'm sure you're aware of. I think of it as scratch's dual: scratch is for when I want to edit something without regard to its provenance, edit-indirect is for editing the source (exactly like org-edit-special).

    I also try to automagically guess which major mode a piece of text should be edited in. edit-indirect edits something that looks like a lisp form in lisp-interaction-mode, even if the origin is (say) this email composition buffer: https://github.com/karthink/.emacs.d/blob/3deed38c0e02e95fdfab6812c494b1736b945a1e/lisp/utilities.el#L67

  • 21:20 - You mention that you sometimes want to insert something into the minibuffer when you're in the minibuffer, but you end up inserting into the main buffer instead. Omar agreed that there is no easy fix for this.

    Omar, Daniel Mendler and I actually discussed this years ago and came up with a separate command to do this:

    (defun minibuffer-replace-input (&optional arg)
      "Replace original minibuffer input.
    
    When a recursive minibuffer is active, insert the current string
    into the original minibuffer input.  With prefix ARG, replace it
    instead."
      (interactive "P")
      (when (and (minibufferp) (> (minibuffer-depth) 1))
        (let* ((replacement (minibuffer-contents)))
          (unwind-protect (minibuffer-quit-recursive-edit)
            (run-at-time 0 nil
                         (lambda (rep)
                           (when arg (delete-minibuffer-contents))
                           (insert rep)
                           (pulse-momentary-highlight-one-line))
                         replacement)))))
    

    I don't need it every day, but when I do it's very handy.

  • 29:40 - Omar mentions that he prefers to have lots of commands to mark specific text objects instead of hammering expand-region (or expreg-expand). There is a (now) old package called easy-kill which does this, allowing you to define marking commands for different objects at point (e.g. s for sexp, w for word, l for line, d for defun etc). It's easy to add support for more objects because I think it integrates with thing-at-point. The marking command provided by this package is actually called easy-mark.

    But easy-kill / easy-mark is actually the best of both marking styles, because you can use SPC to cycle between marking all the different text objects at point. I've further integrated this with expand-region so that at any point in the easy-kill mark process I can expand the region as well: https://github.com/karthink/.emacs.d/blob/3deed38c0e02e95fdfab6812c494b1736b945a1e/lisp/setup-editing-extra.el#L250

  • 36:00 - Didn't know Omar is the reason vertico-grid-mode exists. That's fortunate, I use it all the time!
  • 44:00 - Omar's point about improving ffap to improve Embark's default action on files is great, really speaks to my sensibilities about composing features in Emacs in a way that provides multiplicative benefits.
  • 48:00 - NOPE! I use CANCELLED as a TODO kwd in Org, but the fact that it's not 4 letters long has bothered me forever. NOPE is much better.
  • 58:30 - Re: Omar's toggle map: this is something I think many users end up writing? Mine is a transient map: toggle-modes-transient.png that grows extra columns in specific major-modes: toggle-modes-full-transient.png

    But I appreciate that Omar uses a regular keymap instead of a visual menu, that's the Embark way. Transient menus are frustratingly non-composable with other Emacs features.

  • 1:00:00 - isearch-delete-wrong is actually built-into ISearch? Pressing C-g once should delete the non-matching part. It's possible he's customized C-g to quit Isearch right away.
  • 1:07:30 - I didn't understand Omar's practice of using embark-dwim to preview the result of any minibuffer command, like org-ql-find. Is this something you were able to reproduce?
    • I've been using dot-mode for almost as long as Emacs, to the point where I've often made the mistake of assuming it was an included feature. It uses simple heuristics, but works surprisingly well at capturing your intent on what the "bounds of an edit" should be in Emacs.
    • Omar mentioned that he stopped using multiple-cursors because the immediate feedback from all cursors inspired false confidence, as off-screen cursors could do something unexpected. I use a personal fork of a package called macrursors that's somewhere in between multiple-cursors and keyboard macros:

      https://github.com/corytertel/macrursors Fork: https://github.com/karthink/macrursors

      It's inspired by both multiple-cursors and meow's beacon-mode. It places cursors at the locations where the keyboard macro will be executed, but executes the full keyboard macro at each location at once, without immediate updates. This addresses the "false confidence" issue, but it does three other things that are very handy:

      • You can bound the region inside which cursors should be placed. The scope can be the paragraph, like in Omar's example, but also any other text object (defun, line etc), and you can cycle between the scopes or expand it with expand-region.
      • You can place cursors from most common actions, like at ISearch or Avy candidates (selectively or all at once), or at all text objects of a certain type inside the bounds.
      • You can "narrow" the buffer to only the cursor locations, fitting and verifying more of them on screen. When the macro runs, the selective display in the buffer persists for a second so you can scan the results:

        https://share.karthinks.com/macrursors-isearch-hideshow-demo.mp4

        Steps:

        1. Start ISearch and search for cl-defmethod
        2. Create cursors from all ISearch matches
        3. Selectively display only the cursors
        4. Show more context around the cursors
        5. Make a change (involving a kmacro counter)
        6. Finish. (The selective display persists for a second.)
        7. Examine the changes.

      It uses undo amalgamation by default so you can undo all the cursor changes except the original one in one step. Of course, your changes are stored in the kmacro ring so you can now apply them as regular keyboard macros too.

      Most of these features are probably present in multiple-cursors at this point, although I'm not sure about bounding cursor ranges with macrursors-select. But this has replaced the usual keyboard macro workflow for me, and not many people are aware of macrursors so I thought I'd mention it.

Thanks to Karthik for his notes! If you have any comments, please feel free to email him.

View Org source for this post

Yay Emacs 32: Sacha and Prot Talk Emacs: May I recommend...

| emacs, community, yay-emacs

In this livestream, I chatted with Prot about the May 2026 Emacs Carnival theme "May I recommend". It was a joint braindump of quick recommendations for people at different points in their Emacs journey, building on our conversation about newbies/starter kits and the newcomer experience all the way up to power users, Emacs Lisp coders, and package developers.

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

Related links

You can add the iCal for upcoming Yay Emacs episodes to your calendar. https://sachachua.com/topic/live/upcoming-livestreams.ics

Find more Yay Emacs posts or join the fun: https://sachachua.com/topic/live

Chapters

  • 0:00 Opening
  • 2:27 Tip: Less is more. Start small.
  • 4:07 Tip: Start with what is built in
  • 4:27 Skill: Figuring out the words to look for
  • 6:25 Tip: Be okay with starting over
  • 8:26 Skill: Learning to discover
  • 8:42 Tip: Read manuals for fun
  • 10:16 Tip: Use Emacs bookmarks to save your place in the manual
  • 10:43 Tip: Generally, investing time into navigation and note-taking workflows pays off
  • 12:19 Skill: Keyboard macros
  • 12:53 Skill: Modifying the behavior of code via hooks and advice
  • 13:15 Tip: Learn to think in terms of buffers and windows
  • 14:07 Skill: Reading the source code; Tip: Just jump in
  • 15:33 Tip: edebug is great for exploring code
  • 16:26 Tip: Reading tests can help you understand code, too.
  • 17:02 Skill: Idiomatic Elisp
  • 17:17 Tip: Write tests.
  • 17:52 Tip: When writing Emacs Lisp that expects a list, use plurals
  • 18:59 Tip: When naming, be verbose rather than terse
  • 19:46 Tip: Iterate on your workflow in small steps
  • 20:20 Tip: Make things more automatic, and use context-sensitive clues
  • 24:48 Skill: Thinking in terms of elements
  • 26:16 Skill: Reading other people's configuration and adapting ideas to yours
  • 27:07 Tip: Start with focusing on just one thing
  • 27:33 Blog posts and videos are useful
  • 28:09 Tip: Take notes as you learn, and ideally, share them too.
  • 28:54 Tip: Accept being a beginner.
  • 31:16 Group: Power users
  • 32:13 Tip: Browse through package lists
  • 32:25 Tip: Dive deeply into the packages you have: customization options, code, etc.
  • 32:41 Tip: find-library gets you to the source code, occur can help you browse it
  • 33:29 Tip: You can also browse through Customize
  • 33:48 Tip: Have fun with randomness and serendipity
  • 34:32 Tip: Check out people's workflow descriptions and stories
  • 35:42 Resources: manuals, Mastering Emacs, Emacs Lisp Elements
  • 37:29 Skill: Figuring out what's possible and making a habit of writing tiny functions
  • 37:45 Skill: Being mindful of what you do over and over again
  • 38:26 Tip: Keyboard macros can help you jumpstart custom functions
  • 39:11 Tip: Use C-h k (describe-key) to describe shortcuts or menu items
  • 40:04 Tip: You can set up M-x to show keyboard shortcuts too (Marginalia?)
  • 41:26 Resource: Emacs from Scratch series by System Crafters
  • 41:50 Tip: Old tutorials can still be useful, although don't treat them as the sole source of truth (things may have changed since then)
  • 42:55 Skill: Finding preferred resources
  • 44:12 Tip: If you find your tribe, look for ways to keep in touch with them
  • 45:00 Tip: Manage unequal RSS frequencies with folders or tags
  • 46:33 Tip: Doing more things in Emacs has compounding benefits
  • 48:31 Tip: Learn to think of it as just text
  • 49:46 Tip: Take notes along the way
  • 50:16 Tip: Explore different ways to navigate and act on things
  • 51:09 Tip: Learn to combine different building blocks
  • 52:47 Tip: Get the hang of keybinding conventions
  • 56:06 Tip: Use which-key for keybinding help
  • 57:41 Tip: Figure out your ergonomics

Transcript

Expand this to read the transcript

0:00 Opening

image from video 00:00:38.400Sacha: My typing is still going to be very loud, but that's okay.

Prot: That's part of the charm.

Sacha: Okay. All right. Here we go. Let's go live. Hello, everyone. This is Yay Emacs [32]. I forgot which number. Anyhow, I'm here with Prot because it's Emacs Carnival for May 2026, and the theme is "May I Recommend" because I like puns and couldn't pass up the chance to say "May." So "May I recommend..." is our topic, and our goal for this one is to brain dump a whole bunch of things that people might find useful in their Emacs learning journey. We've already talked about newbies and starter kits in the previous two conversations we've had in Sacha and Prot Talk Emacs. This time, we're going to focus more on *users* who are getting started with... They've decided this is going to be their everyday tool. They want to learn more about keyboard shortcuts and finding their way around, building the habits, finding their preferred resources. *Power users*, maybe, who are starting to look at different packages, these are maybe the people who are saying, okay, maybe let's try this package for working with Org Mode in addition to the basic stuff, or let's try doing email in Emacs. *Customizers*, who are beginning to get into Emacs Lisp to write functions. This is where you start to customize it a lot more to your tastes and your workflows. *Contributors*, people who are sharing their source code, maybe even turning it into packages, participating mailing lists and discussions. So this whole range of people all working on different skills at different levels. What I think we're going to do with this is we're just going to braindump a whole bunch of recommendations. You're welcome to ask questions, and I'll ask you questions as well. We'll just untangle everything and organize everything afterwards.

Prot: That's great.

Sacha: There we go. In this list of skills that people can develop, are you thinking of other skills that aren't on this list yet that do make a big difference to how people use and learn Emacs?

Prot: I need to enlarge my screen a little bit. I think what you have there is good.

2:27 Tip: Less is more. Start small.

Prot: What I had in mind also is more of a meta-point, or more general thing, like an approach style, which is "less is more," if I were to condense it. Start small. Make sure you make it work when it's small. Extend it from there. Don't start big and try to simplify it, because that doesn't work.

Sacha: I grouped that idea under managing time, notes, and attention and also breaking things down, because the overwhelming nature of things is something a lot of people struggle with, both Emacs and elsewhere. Even just that meta-skill of saying, "Okay, this is a small chunk that I'm going to focus on because I know that's what my brain can handle" versus "let's architect this entire thing" and you're six hours down the line and you're nowhere near the thing that you want it to do.

Prot: And of course Emacs invites you for that because it's like, here are like a hundred powerful tools for you to combine in ways that nobody else has thought of before, right? So it's like asking you to do that, but it's a trap. You don't want to go down that route. Or at least don't go there too early.

Sacha: Managing the rabbit hole. Yes, there are going to be a lot of temptations and some of those temptations are quite legitimate. Yeah, you do have to figure this part out in order to get this other thing that you wanted working. But sometimes it's just a trap.

Prot: Yeah.

Sacha: So that's managing. What other meta-skills here should we talk about as a framework so that when we dive into the specifics, we know we're covering a lot of the ground people need?

4:07 Tip: Start with what is built in

Prot: Not so much a meta skill, but consistent with this line of reasoning is as a good heuristic, start with what is built in and extend from there, because usually what is built in will give you a baseline of functionality. It works with a "less is more" approach.

4:27 Skill: Figuring out the words to look for

Sacha: I feel that sometimes figuring out the words to look for, finding out what it might be called in Emacs source or in the built-in packages... That's something that's hard to develop unless you're reading manuals and reading other people's posts because the terminology can be quite arcane.

Prot: Oh yeah, for sure.

Sacha: Getting a sense of what might be built in and what it might be called and where to look for it, I think, is definitely a skill.

Prot: One good way to think of this is, what do I want to do? In the most simple form, if you forget about Emacs for a second, and you're like, what am I trying to do? I'm trying to write a blog, or I'm trying to deal with email correspondence, or I'm trying to manage my TODOs. In its most simplest form, how can I solve this problem? That can already help you formulate the questions.

Sacha: Formulating the questions is actually really hard. Sometimes people don't even notice that there's a question that they can ask, and they don't know what kinds of solutions might address that problem actually. They get distracted by A, but actually it's B that will solve the problem. Considering the different kinds of solutions that can address the same problem, developing a sense of which ways are easier to do the Emacs way versus harder to do. Why make something really complicated when a built-in package or whatever can solve that problem in a more elegant way? All of these things require the development of intuition.

Prot: Yes, yes, and with some experience, of course, that helps, for sure. But then it's the other, which you can also consider as a meta skill.

6:25 Tip: Be okay with starting over

Prot: I believe there was also a point of this, be okay with declaring bankruptcy in Emacs. Bankruptcy, I think... the essence of that is not really much bankruptcy, but be okay with trying something, which is an experiment, and then learning something from it, distilling the essence of that, and then trying something else. I think a sense of experimentation will help you build that skill of, okay, now I can intuitively figure out what works and what doesn't work.

Sacha: I think that's a really interesting point because sometimes you get very attached to "there's this thing that I've started to build" and then you start bolting more and more things onto it, when really, sometimes the prototype is your way of understanding the problem. Then you take it all out and you say, okay, now that I understand a little bit more, what can I make? How do I change my workflow with that new understanding? Sometimes it's as extensive as declaring Emacs bankruptcy and starting again from scratch. Sometimes it's just maybe "The approach that I'm taking is not a fruitful one. I should go try something else."

Prot: Yeah, exactly. You can only have that feedback loop if you try, so trial and error is the way to go.

Sacha: @gcentauri has a question or a comment about discoverability, figuring out how to navigate Emacs in order to discover things. Where would we put that in this skill? This is figuring out the words as well, right? Isn't it?

Prot: Yeah, by the way, I'm in the chat here.

Sacha: Where did you read that?

Prot: I see it here. It was off my screen. I see it now. And of course Christian... I'm reading the temperatures in Western Europe. They are terrible. Yes, I know.

Sacha: Yeah, big heat wave.

8:26 Skill: Learning to discover

Sacha: So, figuring out discoverability, learning how to navigate Emacs. Emacs is lovely. It's self-documented, everything at your fingertips, but you've got to know how to get those fingers on them.

8:42 Tip: Read manuals for fun

Prot: The manual helps. It will present some of that. But of course, you have to read the manual. So you are in a situation where you have to have the skill of reading the manuals in order to discover, but to discover... So yeah, it's a tricky thing. You have to know where the manuals are.

Sacha: Yeah, and you have to be unintimidated by them, I think. I got into it easy because I've always been used to reading books above my level. Even as a kid, I was reading my sister's data structures and algorithms books. I didn't understand anything the first time around. But after nine times through, you start to understand some of the concepts and how they go together. The more you read something, the more of those concepts start to make sense to you. You read it, you read other things around it or related to it, and then the jargon becomes less impenetrable. You begin to understand it. So one of my recommendations is I recommend reading the Emacs manual, the Org manual, all these book-shaped things for fun. Even if you don't think you're going to immediately use 90% of the things, every time you read it, you're going to learn something.

Prot: Yeah. Plus, of course, you will know you are an Emacs user if you are reading manuals for fun.

Sacha: How else are you going to find out about Org spreadsheets and whatnot, right? It's just too big to fit in your brain.

Prot: Correct. Yeah, that's really good. You could even make it a habit of, okay, this day I will read one chapter from the manual.

10:16 Tip: Use Emacs bookmarks to save your place in the manual

Prot: Actually, to say something on this, if you learn about the bookmark mechanism of Emacs, you can bookmark info manuals. So if you are reading the manual from inside of Emacs, you can use the bookmark facility to be like, last point in the Emacs manual. You could have a bookmark that is a rolling bookmark, right? So you could be updating it whenever you go to the next chapter. This way, little by little, you can read the manual.

10:43 Tip: Generally, investing time into navigation and note-taking workflows pays off

Sacha: In general, figuring out your navigation and note-taking workflows so that they're super convenient for you, whether that's Denote or Org Mode Capture or whatever else that you're using... As you read, taking notes on the things that you find interesting in a way that makes it easy to jump back to more information is definitely worth the upfront investment of learning.

Prot: Yeah, 100%.

Sacha: @gcentauri confirms they are actually a true blue Emacs geek. "Was reading the manual right before bed and came across the forms library. No idea it existed." Read stuff, make it easier for you to jump back to the place that you left off or the parts that you found interesting. That's a great recommendation.

Prot: Just to add another metaskill related to this. Don't read it before going to bed because if you discover something useful, you are not going to sleep.

Sacha: I think the idea there is get really good at telling your brain, yes, that's really cool, but if you stay up until 1, you are going to regret it. So just add a TODO and let it go.

Prot: Exactly.

Sacha: This may have happened to me a number of times.

Prot: Yeah, yeah, same. So, only read the manual in the morning or when you wake up.

Sacha: Are there other metaskills that are not yet captured in this or do we start digging into each of these skills?

Prot: I say we dig in and if we think of something we can always add it later.

Sacha: All right. What strikes your attention here? Which of these things?

Prot: No, no. You can go wherever. I don't mind. Anything will do well.

12:19 Skill: Keyboard macros

Sacha: There's a whole lot of stuff here in the customizer, packager thing around modifying or gluing together code that is not something easy for people to pick up because they're just not used to it in other programming languages or platforms or whatever. Things like: you could use keyboard macros to cobble together a quick workflow. You don't even have to write a big function. Just developing the intuition that, oh, this is a set of repeatable functions or repeatable commands is one thing,

12:53 Skill: Modifying the behavior of code via hooks and advice

Sacha: all the way to "this is how I use hooks and advice to either modify the behavior of something where the person who coded it has anticipated that a hook will be needed here, or advice in case they didn't plan for it at all." You're just going to override things yourself. How do people develop this sense of what's possible and how to do things?

13:15 Tip: Learn to think in terms of buffers and windows

Prot: Yeah, it's a difficult skill but it's something you develop by experience. The point to remember is that in Emacs, at its core, you have buffers and everything is a buffer and buffers are displayed in windows If you think in terms of that abstraction, something like a keyboard macro becomes a tool that will jump between buffers, will switch windows. It has no problem doing any of that. You are not limited in your thought to, okay, I have to work exactly where I am right now. I think that's a general approach that goes very far with what you do. Of course, when you are thinking of the advice and the hook, that I think is a little bit more advanced because you need to also have the skills to write advice. With hooks, maybe not. But for advice, you will need to understand exactly what is happening.

14:07 Skill: Reading the source code; Tip: Just jump in

Sacha: I have definitely jumped ahead here because this also requires the skill of reading people's code in order to find out there is a hook or there is some advice that you can do, or there's a variable and this is how you can let bind it to temporarily change its value during this part of the code. Let's talk about reading source. What sorts of things help people develop that skill of reading the source code?

Prot: You have to just jump in at some point. Like, you might do it by accident when you are in a help buffer and either you misclick S, which goes to the source, or you follow the link from above. But anyway, the point is it's a good skill to just, a good habit rather, just jump in and try to read it even if you don't know any programming. Try to read it as if it's English and try to see what you can understand. And of course, some functions will be extremely difficult. Others will be more straightforward. So I think eventually by exposure through osmosis, as it were, you will already learn something.

Sacha: I love the fact that our functions in variable names are often very long and it makes sense in English because we're not trying to squeeze into some very concise, very terse convention. Just put a full sentence in there. It's fine. We just use completion anyway. It's all good.

15:33 Tip: edebug is great for exploring code

Sacha: One of the tips that I'll put in here because people sometimes miss it is the power of Edebug. If people haven't come across Edebug yet, it's great because you can interactively step through what the code is actually doing and you can evaluate what the value is of this variable at this point. And every so often I had to go into the Edebug menu bar and remind myself, okay, you can set conditional breakpoints and all these other things that I have to remember that exist and can be used. But Edebug, if you're going to learn Emacs Lisp, learn Edebug.

Prot: Edebug is really powerful for sure and it's especially useful when you have functions that are relatively long. I mean what they are doing like they have a lot of steps and you have to understand the flow. Like if it's a very short function maybe you don't benefit all that much from eDebug but in practice you will need it. It's very powerful.

16:26 Tip: Reading tests can help you understand code, too.

Sacha: And the other thing I want to point out is that sometimes packages have tests and reading the tests can give you even more of an idea of how this function is supposed to behave. It's not always the case, but when there are tests, they're great.

Prot: In an ideal world, we will update our tests.

Sacha: Alright, so that's reading source code. There's so much that's really interesting to read. Sometimes you come across interesting idioms for Emacs Lisp and you're like, oh yeah, that's a great way to iterate through all the buffers and match a certain thing, whatever.

17:02 Skill: Idiomatic Elisp

Sacha: And so if you're in this customizer phase of things and you want to move to the contributor level, learning idiomatic Elisp is definitely like, okay, it makes things a lot easier.

17:17 Tip: Write tests.

Sacha: Charlie says, "Edebug and ERT tests change the way I develop Elisp. No longer flying blind." Yeah, great. In particular, I tend to break things whenever I make changes, so it's really nice to be able to say, okay, I'm going to nail down this behavior, at least for now. With a little bit of thinking, sometimes you can write tests for things that you would do interactively. So you can test a whole lot more because you have buffers and windows than you might in other languages.

Prot: Yeah, correct, correct. And you get to see it live.

17:52 Tip: When writing Emacs Lisp that expects a list, use plurals

Prot: Just to say on this point of when you are going through the tests and through everything, one basic thing which is in idiomatic Emacs Lisp is when you are writing the parameters of a function, if you are expecting a list, you use plural. For example, you have a function that goes through buffers. Your parameter is just called buffers. That alone should tell you that it's a list of stuff. You don't say "list of buffers," right? That's superfluous. You just say buffers. This automatically means it's a list. So that's very common. You will see this a lot.

Sacha: Here I am, I've been calling my variables buffer-list. Sometimes figuring out what I should call a function or call an argument is a bit challenging, but I figure I'll just name it whatever comes to mind and then I can defalias it or do a search and replace afterwards.

18:59 Tip: When naming, be verbose rather than terse

Prot: When in doubt, of course, be verbose rather than terse.

Sacha: Oh, yes. When you find yourself still using the wrong words to try to find it again, just add more aliases and you'll find it eventually.

Prot: More verbose. More words. All the words.

Sacha: All the words. All right. What are the things here do we want to dig into? Adopting is always an interesting challenge and it's a challenge at all levels here, right? From the user trying to figure out "How do I remember to use this keyboard shortcut?" to "I've written this new function, it's great, but I have to remember to use it." Do you have any recommendations around changing the workflow?

19:46 Tip: Iterate on your workflow in small steps

Prot: In accordance with what I said in the beginning, iteratively. Try to memorize one. You have this new function that, let's say, streamlines how you list files in a directory, whatever, I don't know. Use it. Don't have all 10 functions and try to remember them. Just use one. After two weeks, use the next one. After four weeks, use the third one, and so on. Little by little, make it something that you just do automatically, you don't think about it, with the recognition that you want to remember them all.

20:20 Tip: Make things more automatic, and use context-sensitive clues

Sacha: In fact, going on that point of automaticity, I also like making sure this stuff happens without me having to think about it. If there's a hook that I can take advantage of to just have it automatically turned on, or if there's a context menu I can add it to so that I know, okay, if I do this, then I'll see it in a shorter list. I can get to it more easily instead of having to remember how to find it and all these details. All these little ways to make it easier for myself to automatically enjoy the improvements, or at least have a chance of finding it again.

Prot: Yeah, yeah. This is in the spirit of prefix keys, with the help of the which-key package, for example, or what Embark is doing. Of course, there are different approaches. Maybe you want to set up a transient and in the given mode, you just type question mark, for example, and it breaks up your transient with what you want to do. There are various strategies you can go about to do something like that. I lost your audio, just to say. Yeah, no problem. Let's see. Of course I can sing in the meantime, but I don't think the audience will like it. Let's see. Yeah, no problem. No stress. Of course we could do this. Don't forget that there was a time in history where cinema thrived with technology like this. So it will work. Okay, I can read a little bit from the chat. So something I love doing is after I've learned that one function at the late...

Sacha: Can you hear me now? No. Test. Okay, okay, okay. Woohoo! Successful panicking. Alright. Great. Great. Magic? Something is happening? I don't know what is happening. My video is less important. It's fine. You may continue. Oh yeah, for sure.

24:48 Skill: Thinking in terms of elements

Sacha: Even just thinking, okay, here are the elements that it can work on and here are the actions that I want to associate with those elements. I guess it starts with the intuition of what are the things that I can address. And what I do is I just look at the embark source code and I'm like, oh yeah, okay, Org headings, that makes sense, and variables and all that stuff. I always like looking at people's setups. Okay, this one says you are now too quiet. Can you say something? Okay, okay, this is definitely a me problem. Hang on a second. Oh, okay, okay, okay, I think... Ah, technology. Why is it so fun? Test. Test. No, this is not right. No, no, no.

Prot: Let me know if you can hear me now. And of course, in the meantime, I can comment on the weather. I don't know if I can be heard. But in Western Europe, the temperatures are record high. And here in the mountain of Cyprus, it's like 20 degrees Celsius max.

Sacha: Okay. So did you hear any of the stream? Is Prot's audio okay now? You've got to keep talking, I guess.

Prot: Yeah.

Sacha: Oh, my goodness.

Prot: It's completely different.

26:16 Skill: Reading other people's configuration and adapting ideas to yours

Prot: "We can hear him loud and clear." Wonderful.

Sacha: Back to braindumping. Very good. So we talked about Embark and other things and practices and workflows. I learned by reading other people's configurations, but it does take a fair bit of intuition in the first place to realize this part of the configuration means this, and how to adapt that into my own workflow. Is there a way for people to develop that aside from just reading tons and tons of configs?

Prot: At some point you just have to try. You just have to be like, "Okay, this package everybody raves about, they must be doing something good. I don't know what that is, so I have to try it and see for myself."

27:07 Tip: Start with focusing on just one thing

Prot: Then for something like Embark... We are just using it as an example, but I think it's a good example for other things. Something like Embark can do a million things, but you can also use it for just one thing, right? Find the one thing that you can use it for, use it for that, then figure out what is the second thing and take it from there. The same can be said for Org and all sorts of packages.

27:33 Blog posts and videos are useful

Sacha: I find that sometimes videos are useful for it in terms of seeing it in context, but on the other hand, sometimes I don't have the patience to watch a whole video. I particularly enjoy the posts that are both blog posts plus videos, so I can just skim the blog post, copy the code without having to pause and type things in manually, but also see how it works by somebody showing me how they use something.

Prot: Yes. That's the idea.

28:09 Tip: Take notes as you learn, and ideally, share them too.

Sacha: I do want to sneak in this recommendation to share. I keep beating this drum. But whenever I write about something that I've learned, I always end up getting these comments from people who point out other things that I should check out too. So I highly recommend, whether you're a beginner or whether you're a power user of Emacs, try blogging. I am happy to add people's blogs to Planet Emacs Life so people can read your stuff. All the notes are great for both crystallizing what you know as well as possibly inviting other people to share other tips and comments that point out that what you just worked on is actually a built-in package and all you have to do is configure this. Happens to me often.

28:54 Tip: Accept being a beginner.

Prot: And what can help with blogging, especially once you are blogging about something that you know has a very high skill level, is to approach it in a diary-like way, where it's like, today I learned about such and such. I am not an expert, I am learning, and this is fun. That's your blog post. You don't have to present yourself as the foremost expert on the matter, because then of course you will have to wait many years to write that blog post.

Sacha: I think that goes under this separate intuition thing for mindset and accepting the fact that no matter how many years of Emacs experience you have, you're going to be a beginner in 90% of the things that Emacs can do. So we can totally just accept the beginner's mind. There's no need to worry about imposter syndrome because we're all like this. We're all figuring things out. If you want, you can put in a disclaimer. You can say, "I'm totally a beginner. Read this for the idea and not the Emacs Lisp style," if you're embarrassed, you're self-conscious about sharing your code. But yeah, we're all just starting out, essentially. I like the fact that people in the community are so accessible. There's no one really saying, oh, I'm an expert. You should do it. You should do it this way and only this way, because we're all aware that again, we've done it this way, but there are probably five or six other implementations that could be even better that are really out there.

Prot: Yeah, exactly. Exactly.

Sacha: Charlie says, "The leverage of blogging is unique in the Emacs community. Incredibly supportive, knowledgeable, and social group of people." That's another encouragement to go try it. That is all good. In fact, there are a few days left in this May carnival for "May I Recommend." If other people have recommendations, I'd love to hear about them too. Okay, so let's talk about... Actually, what do you want to talk about? What do you want to talk about?

Prot: Let's go and do something with the power users.

31:16 Group: Power users

Prot: With the power users, of course, you have a group that is, I would think, in some ways more diverse. Because of course there are different ways to become a power user. One, for example, is using Org more; another is using it as an IDE. So the common thread I would say here is that you are the kind of person who is digging deep. That's what you are as a power user. So if you want to become a power user, you have embedded as skills reading manuals and checking the source code, that sort of thing.

Sacha: At this point, you're like, "Emacs is going to be my tool. There's a lot of depth to it." And this is where you start reading, okay, "How do I use Org Mode?" Or "How do I set up my IDE so that it's just the way that I want it?"

32:13 Tip: Browse through package lists

Sacha: For fun, I will sometimes look through the package lists just to see what's out there that I can easily reuse. But often, it isn't even a matter of adding additional packages to your configuration.

32:25 Tip: Dive deeply into the packages you have: customization options, code, etc.

Sacha: It could just be diving deeply into the ones that you do already have, looking for options, looking for little things that you can toggle on and off, or considering how the different functions can be integrated into your workflow.

32:41 Tip: find-library gets you to the source code, occur can help you browse it

Prot: And to this end, I will add something that I do frequently because it combines the elements of what we have already covered, which is M-x find-library. You select the package you are interested in. You go there, then you do M-x occur. And you search for defcustom with a parenthesis in front. "(defcustom". This will produce an occur buffer with all the user options. So you do two things now. You learn about the user options, and you are looking at some source code. That's one way I can start reading source code.

Sacha: This goes back to why we don't just tell people... You don't like Customize, so the M-x customize + regular expression is off your list. Just look at the source code.

Prot: You'll be happier. Yeah, exactly.

33:29 Tip: You can also browse through Customize

Sacha: Browsing through Customize is also an option because it'll tell you about the things. You don't have to use the Customize interface to set it, but I have come across very interesting options that way, just clicking around.

Prot: Yeah, for sure.

Sacha: @gcentauri's like, yeah, I'm bored, M-x list-packages.

33:48 Tip: Have fun with randomness and serendipity

Sacha: Sometimes I randomize these things. I think for EmacsConf, either last year or the year before, we had random packages being displayed as a screensaver. I know people have sometimes on their dashboards, they'll display random inspirational quotes. It could be a random Emacs package. I think at one point I had it display random interactive functions, just so I could stumble across more commands. Taking advantage of serendipity can be a fun way to squeeze in a little bit of learning.

Prot: Nice, nice, yes. That's good.

Sacha: All right, so Jason Torres says, "I use custom just to explore."

34:32 Tip: Check out people's workflow descriptions and stories

Sacha: Another recommendation I'd like to put in here is reading other people's workflow descriptions. Again, going back to blogs and videos and all of that. It's because a lot of these things are not obvious from looking at the source code, but when somebody tells you a story about what problem they had and how they combined pieces of different packages to solve a problem, then it becomes a lot more real.

Prot: Yes. Plus, it puts you in the spirit of Emacs, which is you can be creative and piece together different elements of functionality and have a workflow that works for you.

Sacha: Let's try plugging in, re-plugging in my webcam. Let's see what happens.

Prot: Let's see, let's see. The moment of truth.

Sacha: Everyone will just have to imagine my eyebrows of agreement. Okay, so that's the power user. This is how you get even better at it.

35:42 Resources: manuals, Mastering Emacs, Emacs Lisp Elements

Sacha: I think Mastering Emacs would probably be like a book recommendation in this area. And for customizing Emacs and actually writing Emacs Lisp, there's your Emacs Lisp Elements book. What other things would you recommend aside from, yeah, read the intro to Emacs Lisp and the Emacs Lisp Memo for fun?

Prot: Of course, what you have listed there are all useful. The other one would be in the spirit of what we said earlier of trial and error. Learn how to, or rather get in the habit of writing little snippets of code. They don't have to be the best code of your life. Just something that gets the job done. Of course you can improve it later, but by getting in the flow of writing your own code, eventually what happens is you write better Emacs Lisp. You develop intuitions of what could go where, and eventually, before you know it, you are better at Emacs just because you were doing this little routine.

Sacha: Noticing the questions. This is also a skill. This is also something that you develop. A lot of times people do not even know what's possible because they're so used to just taking for granted that this is a limitation of the system. So sometimes we have to see somebody else, you know, fly through the code without worrying about like, okay, I have to go do this and do that and whatever. Oh, somebody says it's OBS, thank you. @ashraz has pointed out that OBS has my webcam, which is why the browser couldn't find it. So I will think with that some more, but in any case, we will continue.

37:29 Skill: Figuring out what's possible and making a habit of writing tiny functions

Sacha: Yes, so figuring out what is possible and then writing a tiny function for it and developing that habit of not tolerating these little bits of friction, I think is a skill. It's a thing you can develop.

37:45 Skill: Being mindful of what you do over and over again

Prot: Yeah, and another skill which is along the lines of writing your own code but maybe also a meta-skill is: be mindful of what you do over and over again. For example, let's imagine now you have a command that switches to the other window and then blinks the cursor or whatever, right? And these are two commands and you do them all the time. You do the one, you do the other, okay? Now you can write one command, which is a wrapper of those two, and all it does is call interactively the first, call interactively the second. Just by piecing those together you already have your own little command.

38:26 Tip: Keyboard macros can help you jumpstart custom functions

Sacha: Oh, I definitely want to point out here that you can use keyboard macros to generate the Emacs Lisp for it. So even if you're not that comfortable with Emacs Lisp, or you don't remember what the keyboard shortcuts do, you can record a keyboard macro. So you've definitely learned how to do that. And then you can get it to print out the Emacs Lisp that the set of keyboard actions ran. Or at least the Emacs Lisp to repeat the same keyboard shortcuts and then it will all figure it out. Anyway, so that's there. You can save that sequence of commands as a Lisp function in your config. So that's one thing, using keyboard macros to jumpstart your Emacs Lisp.

39:11 Tip: Use C-h k (describe-key) to describe shortcuts or menu items

Sacha: And the second thing is using C-h-K or Describe Key to see what a given keyboard shortcut or menu item will actually run. So that's all very useful stuff for figuring out the Emacs list to do something you're doing interactively.

Prot: I think that's the most used help command I do. C-h k. It's super useful all the time. It's very, very helpful. And not only you learn what command it calls, but also in which key map it is bound. So for example, C-c C-c in an Org buffer, it is telling you what the command is, and it is telling you this command is bound in the Org mode map. So if you want to change something, you know that you also have to be mindful of the key map. So there is your key map.

40:04 Tip: You can set up M-x to show keyboard shortcuts too (Marginalia?)

Sacha: Yes, it tells you other shortcuts. Oh, and along those lines, one of the M-x variants shows key bindings as well, which I recommend. If you're a power user, you'd like to become more of a power user, even a regular user, right? You want to start moving to using keyboard shortcuts for your more common commands and setting up your M-x command completion so that it hints at the keyboard shortcuts. Emacs by default also tells you about it after you run a command that had a shortcut. But at least that way, when you're looking through the command list you can see, "Oh yeah, this has a shortcut!" And then you can maybe even cancel out of your M-x and practice using that shortcut right away.

Prot: Exactly.

Sacha: And along those lines, I like using Marginalia and Consult because then I can see the command descriptions alongside the command name. So there's a little bit more detail there.

Prot: Yeah, I think you meant Vertico and Marginalia.

Sacha: Oh, yes. It's one of those things, yes. It just works with everything. So yes, Vertico for completions that show you a lot of detail, and then Marginalia to actually show the thing on the side, which is helpful.

Prot: Consult is wonderful as well, of course.

Sacha: Yes.

41:26 Resource: Emacs from Scratch series by System Crafters

Sacha: @ashraz would like to recommend the Emacs from Scratch series by System Crafters. They say it's a bit dated from 2020, but still mostly relevant in general. There are a lot of video resources out there.

Prot: That's good. 2020, oh my goodness. It's been so long, I can't believe it.

41:50 Tip: Old tutorials can still be useful, although don't treat them as the sole source of truth (things may have changed since then)

Sacha: It's really interesting because I've been trying to organize the tutorial resources that people who are new to Emacs will come across. And a lot of times, some of the Org videos are from 10, 20 years ago. But they're still valid, so we have to make sure people don't immediately get turned off by the date in the video. But at the same time, they can start to tell the difference. Okay, this stuff is still applicable. But this stuff over here, it needs to be translated into how you do it in modern times. It's a little challenging for people to navigate this.

Prot: Which of course points to another meta skill which is generally information related to Emacs is useful and it will work long into the future. But don't take a tutorial or a video as the source of truth. Always use it as a proxy. Okay, I get the idea. Now I will have to check the documentation and so on.

42:55 Skill: Finding preferred resources

Sacha: I think that part of the learning journey as a user is also finding your preferred resources. A lot of times, you're not going to learn everything the first time around. Everyone thinks in different ways. You do need to spend some time looking for the kinds of resources that jive with the way that you think, with the task that you want to do or the workflow you want to have. It's using the language at the right level for you, et cetera, et cetera. Even knowing, going in, that you're not going to find one-size-fits-all tutorial because Emacs has so many different workflow possibilities... Spending some time to figure out what you like as a tutorial or as a reference, and then going back to that again and again as your understanding develops, I think is a thing worth doing.

Prot: Yes, exactly. That's the whole point of Emacs more broadly: that it accommodates the different kinds of people because it's so customizable. If something doesn't work for you, don't try to force yourself to work the way it is. Rather, change Emacs to work the way you think.

44:12 Tip: If you find your tribe, look for ways to keep in touch with them

Sacha: On a meta note, finding people who think the kind of way you do is super helpful, like the tribe within the tribe. For example, you've got this cluster of people who like using Denote because their brain works the same way that yours does when it comes to filing their notes. Once you find that connection, finding ways to keep up with what those people are doing, and often this is RSS because that's a great way to get the updates without getting buried in email. That can be a great way to keep stumbling across things that might help you.

Prot: Yes, that's a very good point.

45:00 Tip: Manage unequal RSS frequencies with folders or tags

Prot: On the topic of RSS, just to say something that I learned many years ago the hard way: RSS works best if you subscribe to resources that don't post 30 or 50 or 100 articles a day. If you subscribe to the BBC or whatever, that will not work because it will crowd out the blog that posts once every month.

Sacha: What I do with that is I have different folders.

Prot: Folders, filters, etc.

Sacha: Yeah, folders or tags or whatever. So all the microblogs or all the very prolific things go into one folder, which I generally ignore because it's hard to go through.

Prot: Fair enough. Subscribe.

Sacha: Yeah, the people who post once a day or once a week or once a month or once every blue moon, then it's easier to keep up with them because it's not buried in all of that stuff. You can look into your RSS readers to support for keywords maybe in order to do some more filtering and prioritization. This is one of the things that I've always envied about people who use Gnus for reading RSS. Because there's nnrss. Then you can use Gnus scoring to prioritize the RSS items automatically for you. But that's definitely a power user thing, because it's Gnus.

Prot: I think that's a power user among power users. That's really an exception.

46:33 Tip: Doing more things in Emacs has compounding benefits

Sacha: Actually, that touches on an interesting thing about becoming more of a power user of Emacs. If you let Emacs assimilate more of your life, if you start to use Emacs for more and more things, you get not just linear improvements but compounding ones as the things that you have can interact with other things. Even just for the base case of if your to-do list is in Emacs and your coding is in Emacs, then you can create to-do items that link to your code, all the way to if your email is in Emacs, then you can make your to-do refer to your email and stuff like that.

Prot: Exactly. That's where it gets really powerful.

Sacha: If you want to get even deeper into the power of Emacs, try to push more of your life into it. I love seeing the things that people do with browsing the web in Emacs. What kinds of things do you do in Emacs that make you go like, this is where the power of having everything together works out really well.

Prot: You already mentioned them, like email in Emacs together with your agenda, but also Dired, because you can mark files and attach them to the message composition buffer. You can run a M-x shell and your three marked files in Dired, you type w or 0 w and you get their path and then you can do something with them from a shell, if you cannot do it directly from calling a shell command from Dired. There are many ways like that. The keyboard macros where you can jump from a Dired buffer to a shell buffer, or from one buffer to another. All these little things. For me, it's very powerful. You use it all the time.

48:31 Tip: Learn to think of it as just text

Prot: At some point, you don't even think about it. It's just text laid out in windows, each of which shows a buffer. So at some point, it doesn't matter if it's email or programming or prose. At some point, they are all the same. So it doesn't matter at all.

Sacha: Developing that mindset of "it's just text" and the facility for working with text, such as keyboard macros, or being able to jump around, or writing your own functions to manipulate it, or even just using isearch to go through it or using undo in different contexts. I think that's definitely something that people develop and when they develop that intuition, it really helps.

Prot: Yes, exactly. In the beginning you won't think about those linkages. They won't be obvious to you. But just be mindful that they are there. They are possible. As you use Emacs, at some point you just feel naturally about them, and they happen. You're like, oh yeah, of course that was always possible. Of course, with the benefit of hindsight... In the beginning, you will be like, "Wow, I can do that!"

49:46 Tip: Take notes along the way

Sacha: That's the other reason why I want to encourage people to take notes along the way, ideally sharing them, of course, but even just for yourself, because a lot of times you will get to the point where this is just the way you've always done it. On the other hand, if you had those notes as you're figuring out how to do it, and you share those notes, then you're leaving these breadcrumbs for other people who are traveling down the same or similar path. That's something that would be very helpful for people.

Prot: Yeah, exactly.

50:16 Tip: Explore different ways to navigate and act on things

Prot: Even if you don't have external packages... For example, a workflow that for me was so powerful that I was like "Yeah, this is the way to go" involved the grep and then editing the grep results. But even if you don't use a bespoke package for that, which of course is also built into Emacs now, the functionality, you can use the grep results just as a way to jump to the result. If you hit RET, it takes you to the buffer at the point where the result is. You can have a keyboard macro that jumps to the result, makes some edit, goes back, jumps to the next result and repeat, right? You can do that even without the package. The point is that you can collect results and edit them in like a second or a minute, whereas you would need literal hours to do that and it would be error-prone.

51:09 Tip: Learn to combine different building blocks

Sacha: Yeah, and this points to the skill of being able to see and work with different building blocks. You have a block for, this is how to navigate. There are different ways to navigate. You could navigate to something based on some matching text, or you can navigate to something based on a line. You can set up your windows so that you can switch between windows or whatever. Then if you can combine that with, okay, these are some building blocks for acting on something, or this is how I can use the kill ring to take it to... or this is how I can use registers so that I can save some text or save a position or whatever else. The more of these building blocks that you can develop slowly, because being able to internalize the concept takes time, then all these different ways that you combine it to solve a problem makes Emacs very powerful.

Prot: Yeah, exactly. That's a good way to think of it, as building blocks.

Sacha: I don't know how people will do that either, aside from read the manual for fun and watch Emacs videos and read other people's posts. Often I think, what if we make a skill tree, right? Because people like gamification... But then this is going to be a really ridiculous, large skill tree with arrows going all over the place.

Prot: No, no, you don't want to do that. It will be the RPG that never ends. There is no final boss.

Sacha: @yogi583 asks what is a built-in function's name to edit grep result in Emacs?

Prot: I don't know but what I usually do is... Grep edit mode I think. It's new, right? It's new. It's built into Emacs 31 I believe.

52:47 Tip: Get the hang of keybinding conventions

Sacha: What I think of it is I go to the grep buffer and I press C-x C-q because that's the general "toggle read only"... That's another mental concept there, right? Getting a sense of the key binding conventions that might be translated into different actions in different places.

Prot: Yes. There is an annex to the Emacs Lisp manual, the Emacs Lisp reference manual, which talks about the key binding conventions, which is very useful for people to read. Even after you read that, it's a little bit hard to reason about the key bindings if you are getting started, but trust the process. You will see the patterns as you go. Generally, you can expect C-x to be global key bindings, and C-c followed by control something to be major-mode-specific key bindings.

Sacha: One of the things I like about reading other people's configs is that they'll rebind something and I'll be like, yeah, I can totally take advantage of that keybind because I'm not using the standard one as much.

Prot: Let me tell you about one I used. Of course, there are many, but by default, you close Emacs with C-x C-c.

Sacha: Who closes Emacs?

Prot: Yeah, people who make mistakes in life, such as myself. So because I would fat finger that the whole time, you want to unbind C-x C-c and then do C-x C-c C-c then you can exit. I would do it by mistake the whole time and I would destroy whatever I was working.

Sacha: Yeah, key binding design is this whole other thing that I haven't really mastered myself either. We've talked before about making the key bindings make sense. When they're mnemonic, they're easier for people to remember, right? But this is definitely something that I struggle with.

Prot: So think of it this way, of course assuming there is a space for it or you unbind something. C-x something is a global key potentially with a prefix, as a prefix. C-x r is a prefix, C-x p is a prefix and they have global scope, right? If you are doing something that is global in nature, it should work everywhere. You may want to do the same if you are okay with overriding default key bindings, right? Otherwise, you want to do something that is more specific. C-c C-something for a mode. Again, optionally overriding what a major mode is doing. Then you have to work with that. Use mnemonics. Use words that make sense. For example, C-s is the default key for searching. M-s is the prefix for alternative search. Think of it. Alt-S, right? All the alternative kind of searches, such as M-s o, right? So you can now think of M-s and then g would be my grep. M-s and f would be my find and so on. You can think in concepts like that.

56:06 Tip: Use which-key for keybinding help

Sacha: When in doubt, keep which-key enabled so then it will remind you at least of what else you've had configured for that prefix. That's the other recommendation. which-key mode, it's built in now. Just go use it.

Prot: Yeah, which-key mode is very useful. If you are using the Embark package, it has a key that will take over C-h. So actually that works even with default. If you type an incomplete key sequence, C-h will produce a listing with all the keys that complete that sequence. So it will be a help buffer that will tell you, okay, C-x, C-h, for example, will list everything that follows C-x. And it will name the command and all that. So that's also something to consider. I think if Embark were to add the which-key functionality where it's like C-h on a timer, I think then Embark would be a straight upgrade over which-key. In that regard. So Omar, if you are listening... Asking for a friend.

Sacha: @gcentauri says, "I recommend learning how to define a key map and put it under a leader key. I have M-m as my personal key map and then the things I find very useful I add to my key map." For this one, I've been experimenting with bind-key, which makes all of this stuff much easier in terms of defining prefix key and adding a docstring and all those other lovely things.

57:41 Tip: Figure out your ergonomics

Sacha: I like your other meta tip about experimenting with how your keyboard is set up. So for example, even on my laptop... I have a ThinkPad. So even on my laptop keyboard, there's no QMK, but I can use Kanata, which you've also recommended elsewhere. to try experimenting with one-shot modifiers and home row mods or other things like that that I want to, making it easier to press key bindings that have different modifiers. I don't want to have to press ctrl and shift and super all at the same time. If I set up one-shot modifiers, I can just tap tap tap and it becomes easier to press.

Prot: Yes, exactly. That opens up a lot of possibilities in terms of mnemonics, but also in terms of prefix combinations and all that. You can go a very long way.

Sacha: And I think there's a meta thing here also about getting a sense of what would make it easier for you to be able to continue enjoying this long term? Because RSI is not conducive to enjoying Emacs long term.

Prot: No. For sure. Something that I think I learned the hard way through pain is that you want to consider your desk, how you sit at the desk - you want to consider everything, not just the keyboard. For example, I have adopted a standing desk since forever. I do that all the time. I never sit, because it works better for me. I have the keyboard set up the way that makes sense to me. I can write all day. It's what I do. I don't have any pain. Whereas before I would sit on an awkward chair, the desk was not optimized, the keyboard was definitely not something I had thought of, and I had pain. It was really difficult, and I reached the point where I couldn't write. I was like, okay, I have to quit.

Sacha: If Emacs is something that pays off better in the long term, it's good to have a long term.

Prot: Exactly.

Sacha: Speaking of my very short term, in about one minute, I'm going to go off and help with the kiddos' lunch break. I very much appreciated this brain dump. This is great. I'm going to do all the usual transcription and things like that, start pulling out some of these ideas. Chat, if you found anything super interesting that you would like fleshed out into a blog post, say it so we know what to focus on for priorities, right? This was a lot of fun. Are there any key recommendations you want people to make sure they check out or is it just generally like, everyone...?

Prot: No, I think what you have here is good because, of course, you can always say more. So I will conclude with what I started. Less is more, seriously. For life, not just for email.

Sacha: Your brain is surprisingly small. If you break what you learn down into tiny steps, you have a higher chance of it actually sticking. Once you get something in, then it makes things a little bit easier. You have a little bit more space to learn the next thing, and so on and so forth. Otherwise, if you bite off too much, you get overwhelmed.

Prot: Very nice, very nice. And that ties into the lunch break. Yes.

Sacha: All right. Thank you so much. I will skedaddle and yeah, I will do all the things afterwards. Thanks everyone also for dropping by and hanging out. All right. See you around.

Prot: Take care. Take care. Goodbye. Goodbye.

Chat

  • ChristianTietze: ​🥁
  • protesilaos: ​Hello world!
  • MichaelVash7886: ​hello Prot
  • ChristianTietze: ​In (comparatively) ice cold Germany we had ~30ºC this week and there's Prot with 3 layers of clothes 🙂
  • chelmikador: ​​Hello!!
  • gcentauri: ​Hello!
  • gcentauri: ​totally
  • gcentauri: ​nerd sniping minefield
  • gcentauri: ​Emacs gives us Discoverability, and learning which tools enhance it for you is really important. Consult for example, and Helpful
  • sachactube: ​​https://pad.emacsconf.org/yay-emacs
  • gcentauri: ​i was literally doing that last night before bed
  • gcentauri: ​i came across the Forms library I had no idea existed
  • CharlieBaker707: ​​edebug + ert tests changed the way I develop elisp! No longer flying blind 🤣
  • ChristianTietze: ​end-to-end tmux snapshots – you can assert on the modeline contents and other 'ui' of Emacs too, at least in terminal rendition of course
  • gcentauri: ​because in Lisp its lists all the way down :)
  • CharlieBaker707: ​​something I love doing is, after I've learned that 1 function, at a later point I'll meta-x for that package's namespace, then embark-collect into a buffer and explore what other user-facing exist.
  • sachactube: ​​ugh hang on
  • CharlieBaker707: ​Stole that trick from Prot ;-)
  • ChristianTietze: ​🎶
  • sachactube: ​​hahaha, you can just keep braindumping tips while I panic
  • sachactube: ​​I will continue to panic
  • blaiseutube: ​​don't panic
  • CharlieBaker707: ​we can hear you!
  • CharlieBaker707: ​but not Prot :-D
  • blaiseutube: ​​oooh much better!
  • yogi583: ​​we cant hear prot
  • blaiseutube: ​prot is too quiet
  • gcentauri: ​@sachactube - prots audio is very low
  • renaudbussieres: ​​Is Prot only in your headphones?
  • sachactube: ​​I will look into that
  • blaiseutube: ​his audio is completely different
  • chelmikador: ​​now!
  • yogi583: ​​we can hear him
  • blaiseutube: ​yes!!!
  • CharlieBaker707: ​​loud and clear Prot!
  • MichaelVash7886: ​​all set now
  • gcentauri: ​Yes!
  • gcentauri: ​good!
  • blaiseutube: ​perfect!
  • blaiseutube: ​ooooh, Cyprus is nice
  • blaiseutube: ​Massachusetts is also 20C
  • ashraz: ​​Is prot's sound only clipping for me a bit or also for others?
  • MichaelVash7886: ​​maybe a little but it's not bad on my end
  • sachactube: ​​That was me because I panicked about audio, returned to normal levels now
  • CharlieBaker707: ​​The leverage of blogging is unique in the Emacs community. Incredibly supportive, knowledgable, and social group of people.
  • gcentauri: ​We always need beginners to show us where things actually DONT make sense! A beginners mind see's all possibilities
  • gcentauri: ​yep. "i'm bored, M-x list-packages"
  • gcentauri: ​yeah i use Custom just to explore
  • gcentauri: ​Discoverability!
  • gcentauri: ​(btw this is shoshin from elsewhere)
  • renaudbussieres: ​​"M-x apropos-user-options" is another way to browser customizable options :)
  • gcentauri: ​@sachactube we can see you in the lower right, you've somehow gone to having your video floating
  • ashraz: ​​@sachactube Your webcam is shown as an overlay over the chat, which may be the reason why it cannot be shown a second time on Firefox
  • ashraz: ​​*Chrome
  • blaiseutube: ​​BRB
  • sachactube: ​​thanks!
  • blaiseutube: ​​…. seems like a "config profiler" would be handy, to produce a human readable summary of settings.
  • ashraz: ​​I also liked the Emacs From Scratch series by System Crafters. It's a bit dated (from 2020), but still mostly relevant in general, IIRC.
  • ashraz: ​​@blaiseutube Profiler as in loading time, or in "what is actually in that profile"?
  • gcentauri: ​is that Marginalia?
  • ashraz: ​​@gcentauri Aye, marginalia shows the shortcuts.
  • gcentauri: ​not Marginalia
  • gcentauri: ​i think maybe Vertico
  • ashraz: ​​2020 predates the minad-stack (vertico, marginalia, orderless, consult, corfu), it used ivy, swiper and company.
  • ashraz: ​​But the mindset is still in that series 🙂
  • valentinoslavkin6116: ​​Yeah, emacs from scratch is pretty good. Maybe it could explain a bit more the language or the use-package macro, but it works regardless
  • MichaelVash7886: ​yeah I haven't watched the series as so much changed since then
  • sachactube: ​​blaiseutube config profiler sounds interesting, what did you have in mind?
  • yogi583: ​​whats the builtin function's name to edit grep result in emacs?
  • gcentauri: ​Need multiple skill trees
  • gcentauri: ​different character classes
  • ashraz: ​​@gcentauri Also different positions on the alignment chart.
  • bledley99: ​​Lovely people, been watching/reading you two for years. Thanks for all you do. 🙌
  • gcentauri: ​I recommend learning how to define a keymap and put it under a leader key. I have M-m as my "personal-keymap" and then the things i find very useful i add to my keymap
  • gcentauri: ​and +1 which-key
  • ashraz: ​​See `D.2 Key Binding Conventions` in the manual for the conventions (for package maintainers)
  • ashraz: ​​*in the elisp manual, not the emacs one.
  • renaudbussieres: ​​I find "leader key" strategies better too, for example the C-x keymap, displayed with which-key, is too crowded and diverse to make sense
  • gcentauri: ​yes - i had to switch to xah-fly-keys because of RSI
  • gcentauri: ​but Emacs can change and adapt to YOU! which is important
  • MichaelVash7886: ​I want to look at Meow at some point for a leader key and modal editing
  • valentinoslavkin6116: ​​Meow is really great
View Org source for this post

Emacs Chat 24: Omar Antolin Camarena

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

: Updated transcript and added a link to Karthik's notes.

I chatted with Omar Antolín Camarena about Emacs, keyboard macros, temporary buffers, Embark, and other workflow tips.

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

Related links:

You can add the iCal for upcoming Emacs Chat episodes to your calendar. https://sachachua.com/topic/emacs-chat/upcoming-emacs-chats.ics

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

Chapters

  • 0:00 Ignore this part
  • 0:18 Opening
  • 0:46 How did you get into Emacs in the first place?
  • 6:01 Repeating edits
  • 7:28 dot-mode: repeating commands
  • 9:24 block-undo: undo things as a chunk
  • 10:29 Starting and stopping keyboard macros
  • 12:15 Keycast and Embark
  • 13:33 apply-macro-to-lines-of-paragraph
  • 16:34 embark-on-last-message
  • 18:06 tmp-buffer with a major mode
  • 19:26 placeholder
  • 20:38 enable-recursive-minibuffers
  • 22:57 Overriding embark-select
  • 23:32 quick-calc
  • 26:30 Multiple cursors
  • 27:40 Block-undo and regular undo
  • 28:53 Cycling through Embark targets
  • 31:39 Imenu for navigation
  • 32:51 Collaboration
  • 38:01 Technology adoption and Emacs packages
  • 40:06 Personal packages and naming conventions
  • 42:26 find-file-at-point and directory names
  • 43:49 The value of using Emacs’s APIs
  • 44:56 org-ql and usual files
  • 47:06 Shortcuts for org-ql search syntax
  • 47:43 Org TODO states: TODO, WAIT, DONE, NOPE
  • 48:26 The inserter macro
  • 50:05 luggage: generative art experiments
  • 53:49 Teaching and Emacs
  • 54:53 The print10 generator
  • 56:23 arXiv
  • 58:29 Toggle keymap
  • 1:00:54 isearch-delete-wrong
  • 1:03:14 isearch - continue from the beginning of the match
  • 1:05:12 Using keymaps to remember sets of commands
  • 1:06:04 Other things from the config

Transcript

Expand this to see the transcript and screenshots

0:00 Ignore this part

Sacha: Cut off at, you know, roughly an hour and seven minutes from now. She's going to come out and have lunch. Okay. All right. Going live. Alright folks, we are here a little bit early.

0:18 Opening

Sacha: This is Emacs Chat 24 with Omar Antolin Camarena, whom we know from Embark and Orderless and a lot of other little packages that I personally use on a daily basis. I'm very much looking forward to this conversation.

Omar: Yeah, so am I. Very excited.

Sacha: Of course, before we dive into all these lovely details, tell us a little bit more about your context. You're a researcher at the Mathematics Institute. I can see why Emacs would be a great fit for that.

0:46 How did you get into Emacs in the first place?

Sacha: How did you get into Emacs in the first place?

Omar: I think it's just by virtue of being old. When I started out looking for a text editor, there were not that many great options. When I was a teenager, 30 years ago, I decided to install Linux because I heard about it. That was the era where you went to a newsstand and you bought a Linux magazine that came with a CD, and I installed Linux from that. I think it was Slackware, maybe. I was already a hobby computer programmer. I've been learning programming languages since I was a child, when my father gave me my first computer. I think that was the main reason I switched to Linux. I noticed that people wrote many more interpreters and compilers for Linux than for Windows. That's why I wanted to use Linux. I needed a text editor that handled all sorts of weird programming languages. I was looking for a general purpose one, not an IDE. I used IDEs, younger ones, like Turbo Pascal. Probably that was the main one. I loved that. It was great. I went through the Linux distro, tried a bunch of editors. I settled on Emacs and Emacs-like editors. I tried Jove, which stands for Jonathan's Own Version of Emacs. And there was also an editor called... Oh, I forget. There was one that had its own extension language called S-Lang. I used that for a while. A little later, I remember using Slava Pestov's jEdit. I really like that, too, although Java is not that fun to write extensions in. I was looking for an editor and I wanted it to be extensible, which is funny because I hardly ever extend it. I just wanted there to be the option. I used Emacs for a long time. But when I got serious at being efficient at text-editing, I actually switched to Vim. I switched back to Emacs many years later because of one very specific problem in Vim. The syntax highlighting for LaTeX files is pretty slow. On a normal computer, you won't notice that it's slow. But I had a little netbook that was like 10 years old when I had it. I took it to class to take notes in math courses. I was writing in LaTeX Live with a bunch of macros to insert things. The syntax highlighting meant that Vim lagged behind my typing. I'm not that fast of a typist, so it was problematic. The Vim manual has an entire section on what to do if text highlighting is slow. You can look for it with Vim :help tex-slow That pops up the right section of the manual. I tried everything that it said there and they all made it slightly faster, but none of them really solved the lag, other than turning off syntax highlighting. I turned off syntax highlighting and took notes for like half a semester, and then I decided to try Emacs on that old netbook. Its syntax highlighting was perfectly snappy. This is just a weird thing in Vim that specifically LaTeX syntax highlighting is slow. I never noticed it being slow in any other... I don't know what Vim calls them, what Emacs would call a major mode. It was only ever slow in LaTeX, but that was enough to get me to try Emacs. But by then in Vim, I had learned that you want very granular motion commands to move by word or by sentence, and you want to be able to be placed at the end of the word or at the beginning of the word. All of these higher-level editing constructs that Vim really pushes you toward. In Emacs, I hadn't done any of that before. I moved around with the arrow keys. But when I came back to Emacs after having been in Vim, then I wanted to get serious about editing efficiently in Emacs. I think I actually like it better than Vim now. But yeah, that's why I switched back to Emacs. It's just this quirk that LaTeX syntax highlighting is slow in Vim.

Sacha: Well, their loss. So you tried a whole bunch of other editors. You got into Vim because you wanted to be more efficient. Getting deeply into Vim was great, but you ran into that bug. So you switched to Emacs because it was more efficient, more performant. All that experience with Vim has made you a better Emacs user because now you're like, okay, you appreciate all the navigation and movement. And you were telling me over email...

Omar: Things I missed from Vim.

Sacha: Yeah, You were telling me over email how the kind of the keyboard macros that you got used to in Vim, you've translated some of that over to Emacs and how you use them. We definitely want to get into that.

Omar: Keyboard macro-like things. In Emacs, for a while, I used multiple-cursors. I liked it a lot.

6:01 Repeating edits

Omar: One thing I really missed from Vim is the dot command that repeats the last edit. But in Vim, edits are composite things. You have a command to change a sentence, for example. That will delete the current sentence, put you into insert mode, let you type a new sentence, and when you press escape, that concludes the edit. The whole edit is the operation of deleting the current sentence and replacing it with the specific thing you typed. That is a thing you can repeat. The repeatable edit commands in Vim are much coarser and more conceptually appropriate units than in Emacs. The repeat command repeats the last Emacs command, but everything runs a command in Emacs. You can repeat inserting the last character. That's not very useful. You want to repeat at least the whole consecutive stretch of characters you inserted. Undo in Emacs does do that. Undo coalesces. If you type a bunch of characters and you undo, it doesn't undo them one by one. It undoes them. It clumps them depending on pauses between your typing. That's fine. I want that sort of coarseness. I don't want to undo every single step at a time. Similarly, when you repeat things, you don't want to repeat every single step. I think Vim has like a pretty good unit of things you can repeat. I was missing that in Emacs.

7:28 dot-mode: repeating commands

Omar: There's a package called dot-mode which I used to use and I like a lot. I'm not exactly sure why I stopped using it. So this gives you a more Vim-like experience for repeating commands in Emacs and what it does is that it watches you as you type and it constantly makes a keyboard macro out of the last consecutive stretch of buffer modifying commands. So, for example, in Vim, if you want to change a word, there is a change word command, and you type c w, and then you change the word, and then that thing gets repeated. In Emacs, to change a word, it's not a single unit, right? You delete the word, and then you type in something new, and each character you type is running insert-char. dot-mode will coalesce all of that into a single keyboard macro that you can repeat, right? If you do some motion command that doesn't modify the buffer, and then you delete a word and type a new word, everything from the deletion to the end of the typing would be what dot mode repeats. The experience is actually very similar to using dot in Vim. In my opinion, a little bit better, because in Vim, I often had this problem. It gets you into this competitive video game mentality. How do I do the edit in a single repeatable command? I want to be able to use dot to do this again. So that you have to think ahead. It's kind of distracting. Of course, if a sensible person would not get caught up in that, it would just... do the edit whichever way they can, but I wanted to maximize the repeatability. dot-mode lets you be a little bit more relaxed. It still catches all of the thing that should have been a single edit. So yeah, I like it a lot.

Sacha: So that's dot-mode.

9:24 block-undo: undo things as a chunk

image from video 01:06:05.633Sacha: You also mentioned block-undo.

Omar: That is a package of mine I can show you. That's the entire package. It just uses this with-undo-amalgamate command. Whatever you run inside with-undo-amalgamate undoes in a single step. I use it for executions of keyboard macros. A keyboard macro, if you run it all over the place, if you apply it to every line in a region, or you just repeat it a hundred times, that is a lot of tiny individual edits. If you undo that, you do not want to undo them one by one. This just makes them all undo in a single step, which is what Vim does, actually. This is one of the things that I said, no, Vim has this right. I need this in Emacs.

Sacha: Okay, that makes sense. So dot-mode is more like implicit keyboard macro boundary definitions. This one is like the undo-ness of it.

10:29 Starting and stopping keyboard macros

image from video 00:11:29.533Sacha: I saw in your config, you also have more convenient shortcuts for starting and stopping keyboard macros. It's like a modifier and the keystroke instead of two or like function keys, which are further away. I'm guessing you use keyboard macros a lot.

Omar: Yeah, I do. When I got rid of dot-mode, it was an experiment to see if I could just remember to record keyboard macros. The thing that the dot-mode or the dot command in Vim solves is that you don't always have the foresight to record a keyboard macro. Sometimes you realize, oh, I need to do the same at some other places, but you didn't record it ahead of time. Then you wind up doing it once, realizing you need to do it a bunch of times, then recording the macro, then doing it again. I wanted to see if I could remember to record macros. I decided that I needed to make it as as frictionless as possible. This is the command that is bound by default to F3. I like it better than the thing that's bound to C-x ( because this kmacro-start-macro-or-insert-counter does both things. It could start a recording, or if you are recording, it will insert the keyboard macro counter.

Sacha: For folks who are like, what? Macros? Counters? Yes, you can have your keyboard macro automatically add one to a number, for example. There you go.

image from video 00:12:10.867Sacha: Hello, hello, hello.

12:15 Keycast and Embark

image from video 00:16:44.033Omar: I also activated keycast. I hope people can follow along. I have some small modifications to make embark transparent to keycast. If I use embark, you see embark-act, but then you also see what command I call.

Sacha: I just stole that from your config. I wasn't entirely sure if I was using it correctly, but it definitely looked like something interesting and useful.

Omar: If you don't use that change, then keycast doesn't see through embark and you don't get which actions you called.

Sacha: Yeah, the opacity of some of these kind of key binding niceties... they hide a lot of stuff from the standard Emacs ways of doing things. That's one of the criticisms of transient and other tools. I'm glad that you're finding these ways to make these packages work well with other packages.

Omar: I think this was by request. Somebody requested it. Maybe it was Prot. It's definitely a good idea. The code for that is on the Embark Wiki as well.

13:33 apply-macro-to-lines-of-paragraph

Sacha: The other thing that I wanted to point out that you make a convenient keyboard shortcut for in terms of keyboard macros is apply-macro-to-lines-of-paragraph, which I personally had not been using until I saw your config. And I was like, that is a thing.

Omar: Yeah. Well, that's a command that I wrote. It’s a wrapper around apply-macro-to-region-lines, but it automatically uses the paragraph. That way you don't need to select it. I find that extremely convenient. What would be a good example of that? You want to wrap something. What should I do as an example of this? For some reason, I needed to convert these things to, say, unwrap the parentheses and turn them into an Org Mode table.

Sacha: Yeah, that makes sense.

Omar: I just apply it to the rest of the paragraph.

Sacha: Magic. That's great, because I would normally just start executing the macro and hope I remember to stop at the end, but then I overshoot, and then I have to undo, j and then it's a mess.

Omar: Or you could select the paragraph and then just use the built-in apply-macro-to-lines-in-region.

Sacha: Yes, yes, that's a possibility.

Omar: It just saves you the step of marking the paragraph. I found that I most often when I used apply macro to lines in region, the region was exactly a paragraph. So I figured like there's no point in...

Sacha: All right, all right.

Omar: It's undone in a single step. Like the application. The thing I recorded as a macro, that is not coalesced. Yes, of course.

Sacha: Because that's the actual recording of it. Charlie Baker in the chat says, "Definitely going to add the keycast transparency to my config. I've been wanting that for a while." These little demos of like, oh, this is what this thing in your config does. It's very helpful for people to be able to see its awesomeness.

Omar: Where is that?

Sacha: One of the other interesting things you mentioned was your placeholder package. I can see how the keyword macros help you with text that's already there. Then you've got these placeholders for informal snippets or quick snippets. Show us that. You use it a lot.

Omar: Yeah, I do. Oh, that tmp-buffer is a command I have for popping up temporary buffers in specific major modes. Maybe I can quickly show that first. Yeah, yeah, yeah. So let's see. Oh, yeah. So let me...

16:34 embark-on-last-message

Omar: There I used another little command I have. embark-on-last-message It just calls Embark on the last thing in the messages buffer. Often I want to act on the thing that is the last word in the echo area, so that's what this does.

Sacha: Okay.

Omar: The last thing in the echo area was this symbol embark-on-last-message so I can act on it directly.

Sacha: Which is brilliant because I keep switching to the messages buffer to try to copy something, and by the time I switch, sometimes there are other messages, so it's great to just be able to do something.

Omar: If there are other messages, then I also switch to the messages buffer, but if I want to act on the very last thing, I have that command for it.

Sacha: Yeah. I'm saying this is faster, so I get the chance of just hitting the shortcut before another timer goes in and messes around with my messages. So yes, shortcuts. Okay, temp buffer. Tell us about that.

Omar: You can configure single... Wait, where am I? Transcribing job. I ran Whisper by accident.

Sacha: Which is another thing I wanted to check. Many things I want to talk to you about…

Omar: The idea of using Whisper, I stole from you using it to dictate. I thought, oh, this looks convenient if the model is good. I tried it and it is very good.

18:06 tmp-buffer with a major mode

image from video 00:18:10.233Sacha: Temp buffer.

Omar: Different major modes. It has a customizable list of bindings for specific major modes.

image from video 00:18:19.533Omar: It also has an option to just prompt you for a major mode. It pops up a temp buffer in whatever major mode you chose. I use it all the time to make new scratch buffers.

Sacha: Yeah, I can see that's useful. I switch to a buffer that's got a name that doesn't exist yet, and then I have to press more keys to get to the major mode.

Omar: But if you're doing certain things, just type random letters to make a new buffer, this is much better. They might as well all be called temp.

Sacha: Do you reuse the buffers, or it's always just the one buffer?

Omar: New buffer, then I kill it.

Sacha: Very temporary. Gotcha.

Omar: By the way, kill-current-buffer doesn’t have a default key binding. I don't understand why not. OK. I bind it to C-c C-k, which normally, I think, is kill-buffer, but why would you want to kill a buffer that's not the one you're looking at? Wait, what was I going to show you?

Sacha: You were going to show me placeholders.

Omar: Right.

19:26 placeholder

image from video 00:19:42.100Omar: I often need to send several similar email messages. I'm going to invite you on some day of some month to give a talk, etc. That's the body of an email. I'll write it once. Here I’m using placeholder-insert to insert this symbol. It appears in green, but it doesn't matter. It's just text. You could type that symbol yourself.

image from video 00:20:05.633Omar: Then the placeholder-next and -previous commands will cycle among those and let you fill each one in. You don't have to fill it in right now. If you repeat the command, it restores the placeholder and moves you to the next location.

Sacha: That's one of the things I liked about the implementation compared to yasnippet, because yasnippet, you’ve got to actually remember to fill in the fields before you move on to something else. If you get out of it, you can't tab to the next field. The placeholders will let you go and come back and look up some information and put that in and so forth.

20:38 enable-recursive-minibuffers

Omar: Yeah, there's lots of things I loved about Vim, but one thing I grew to strongly dislike is modal computer programs. Not just modal editing, modal anything. I don't like being forced to finish what I started. I want to be able to get distracted and go off and do something else. For example, in Emacs, I very much dislike the default value of enable-recursive-minibuffers. The default value is nil. They don't let you use the minibuffer if you're already using the minibuffer. Emacs is supposed to be about freedom. Why is that the default value? So I set it to t, which is more sensible. That way you're not stuck in the minibuffer.

Sacha: Actually, one of the things that I've been trying to figure out is when I'm in a minibuffer, sometimes I want to use Embark to insert something into the minibuffer, but then I end up inserting it into the buffer buffer.

Omar: Yeah, there's no... Embark doesn't have any solution to that problem. It doesn't always do that. It does that if you're in the minibuffer in a completion session. If you're in the minibuffer in a non-completion session, then it acts as a regular buffer. So if you're in eval and here you had... You can use embark-insert in the usual way to duplicate stuff.

Sacha: I have a workaround. I just use kill. I copy the text instead of inserting it and that works out fine.

Omar: Yeah, I do too. The behavior of inserting into the previous buffer is so useful that I don't think I would want to change that. But yeah, it is unfortunate that for that specific instance, you can't use insert.

Sacha: I appreciate that Embark allows us to have all of these key bindings that we can do stuff with. I noticed in your config, in addition to Embark, you also modify a lot of the standard key maps to add other shortcuts to rebind things that make sense to you. Key bindings are something that a lot of people struggle with, trying to figure out more places to put more shortcuts that make sense. What are the key shortcuts that work really well for you?

22:57 Overriding embark-select

image from video 00:23:18.367Omar: One thing I don't like about the default Embark configuration is that SPC is used for embark-select, which marks a target for later use. I hardly ever use embark-select, so I would rather SPCbe for marking the region, which is something I do pretty often, and have embark-select on C-SPC, which is not a command I use very often. I swapped those. I think most of this is just adding new actions that feel specific to me.

23:32 quick-calc

image from video 00:24:05.733Omar: quick-calc is the thing usually found to C-x *calc-dispatch is the command. It’s C-x * q. That’s quick-calc. It's useful as an Embark action. If you have an expression and you... Wait, what am I doing wrong? I forgot what my binding to mark what Vim calls a word in capital letters, which means a consecutive stretch of non-space characters... If you mark this, I can act on it with =, get the result.

Sacha: And specifically this embark-region-map is what you can add in the selected region. Incidentally, I've been playing around with using the Selected package for this because it also gives you the key map.

Omar: Yeah, yeah. I love the Selected package and recommend it often. I don't use it myself just because the only thing it would save me is calling embark-act, because the commands I would put in the selected key map are exactly the commands I have in the embark-region-map. For me, Selected would only save me one keystroke, which is Embark Act, so I don't feel it's worth it, but it's a great idea. For example, I do use the rectangle keymap. Yes. So they're the only difference. It's equally good an idea as Selected is. The only difference is that the rectangle keymap comes with Emacs and Selected is an external package. I decided it's not worth installing an external package when I could just use Embark Act, which I do have to use because otherwise I won't understand people's bug reports. But the rectangle mode there, that one is built in, so I just found a bunch of useful stuff in it.

Sacha: Yeah, and I noticed you have also like you have a narrow-to-point so that you can use your rectangle commands to yank something into it, so I get the sense that you use rectangles a fair bit.

Omar: You've really read my configuration very carefully. This narrow-to-point is subtle. I am very impressed that you figured out the reason for it.

Sacha: I started digging through narrow-extras because I saw your narrow-or-widen-dwim and I said, yes, I need that in my life.

Omar: I don't think... I took it from somebody. Endless Parentheses, probably. The issue with narrow-to-point, the reason you need it, is that if you insert a rectangle somewhere, try to insert it in a blank line, and it'll overlap with what was after it. But if you first narrow to the point and then insert the rectangle and then widen again, it gets its own blank lines. That's the reason I have it.

26:30 Multiple cursors

Sacha: @zor_​org asks, was there a time you wanted multiple cursors? Have you ever been tempted?

Omar: Multiple cursors. I think it gave me a false sense of security which is why I experimented not using it and then the experiment just never stopped. The thing with multiple cursors... Multiple cursors are more interactive than keyboard macros, because if you can see several cursors on the screen, you can visually make sure that what you're doing does apply correctly at each of those locations. But then I started noticing that that made me feel very confident I was doing things the right way in multiple cursors, but there were some cursors offscreen where I wasn't paying attention to what was happening there, and then I got it wrong and was more confused. Just psychologically, a keyboard macro, since I know I don't see the other places where I'm going to run it, I'm more careful when I record the keyboard macro. It's a psychological trick I'm playing on myself. By using keyboard macros instead of multiple cursors, I force myself to pay more attention to what I'm doing.

27:40 Block-undo and regular undo

Sacha: Does the block undo still let you select a region in order to undo just the part that was within it, in case you notice offscreen that it's done something bad in just these entries?

Omar: Yeah, that's completely independent. That built-in Emacs behavior is not affected by undo boundaries.

Sacha: Wait, is it?

Omar: If it overlaps with part of... I don't know. Sorry, sorry. I don't know. So if I have a big change that I amalgamated into a single undo, and then I pick a region that overlaps partially with that but not completely, what would undo and region do? I don't know. I think it... I'm just guessing. I would just think that it sees that the affected region by the big block undo is not completely contained in the region and then it doesn't undo it.

Sacha: Okay, so I'm just going to conclude that you do not make mistakes with your keyboard macros.

Omar: I can easily undo them instead of having to keep running on undo. So it's not that I don't make mistakes, but that I try to fix them right after running the keyboard macro.

Sacha: All right, all right. I had another question.

28:53 Cycling through Embark targets

Sacha: Ou've got a lot of different Embark maps and you've got a lot of different Embark targets. How do you handle going through the different ones that are at the point? At the moment, I've got the label at the top and I just flip through it. I know sometimes I need to hit it twice or sometimes I need to hit embark-act three times for this kind of thing. How do you distinguish between lots of them when you're just going through it?

Omar: I think that's the poorest part of the user experience with Embark Act currently. I don't really like it, but I don't have a good alternative. A lot of people like expand-region and I don’t like it because I feel like I have to hammer it off. I prefer to have a lot of… This is another thing I learned from Vim: have a lot of commands to mark specific things and just memorize all of them. But expand-region says, no, don’t memorize that. Just hammer on expand-region until you get the thing you want. Ffor me, even though it's objectively fast, it just feels very slow. It feels like I have to hit it four times whenever I want to mark something. I get the same feeling from cycling in embark-act. I don't really like it. But if we had come up with a better alternative, and I say we because I discussed this in the GitHub issues with with Daniel Mendler and Prot, and I think @hmelman was also in those discussions, and maybe Clemens Radermacher? I just couldn't come up with a much better alternative, so I put up with it. I don't need to cycle that much. I almost always want to act on the first target. Which is unfair, because I decided what the first target is in the default configuration, so it's sort of tuned so that I hardly ever need to cycle. I apologize if it means other people need to cycle a lot.

Sacha: Nonsense. We can all modify our target list, so we can always tune it to what we want.

Omar: I mean, it's a lot of work, right? I think the default Embark configuration is over half of the source code of Embark. The configuration is... Where does that start? Oh, I wish the autoload cookies were not in the outline.

Sacha: If you do a space, oh, I guess it doesn't do that, right?

Omar: Oh, yeah. For orderless, I use the escapable spaces, so I can do that.

31:39 Imenu for navigation

Sacha: I should also point out that your config uses a lot of imenu also, which was another interesting thing I picked up.

Omar: Yeah, I like imenu, yeah. I should add imenu for this. One thing I did to imenu is I added a section for key maps.

Sacha: I saw that. You have a regular expression so you can see it easily.

Omar: Right. It's not half, but a big chunk of Embark is just the default configuration. It would be a lot of work to configure Embark from scratch. That's why the package comes with an extensive default configuration.

Sacha: Charlie Baker says, “I have embark-act set up to expand in the same way expand-region does, but with Embark’s type awareness, it's easy to add a contract function.” I guess maybe also some highlighting helps with that. Charlie also says, “I also have a completing read interface in the transient menu to jump directly to one of the many types under point that I'm seeking.” Charlie, you're going to share somewhere so I can steal that part of your config, right?

Omar: I mean, that would be something I would consider adding to Embark itself.

32:51 Collaboration

Sacha: You mentioned having all these conversations with Daniel and others through GitHub and other things. I wanted to touch on that because I think in the Emacs community, it's pretty rare to find people who are collaborating on packages and packages that work so well together. The partnership between your packages and Daniel Mendler or Minad's packages with Consult and Vertico and Marginalia is really nice. We don't see a lot of examples of that kind of inter-packaged conversation as much. How did that start?

Omar: I think it was mostly Daniel's initiative. I had started work on Orderless and Embark. I think his first package was Consult, maybe, of this family of packages. I remember Embark was a pretty sad shape when Daniel started raising issues on the Github. He really lit a fire under me to improve Embark. It started with him complaining about things in Embark, and I immediately realized that he was thinking very carefully about the user experience, so I thought he is full of good ideas and I should listen to them. Back then at the start of Embark and Orderless, Prot was also very involved in discussing the design. All of this is on GitHub issues. Some software archaeologists can find all of it. So I think we started working together when we realized we were both writing Marginalia, so we decided to merge those two packages into a single one. I think maybe the name Marginalia was suggested by Prot, I don't remember, but it's a very good name. The collaboration was completely unplanned. We just did it because we had already talked on the Embark issues and Daniel's suggestions improved Embark a great deal in a short amount of time. So then when we both realized we were writing something like Marginalia, we decided to just merge those two packages and write a single one. Since that worked out well, we kept on collaborating. So far, we haven't co-written any other package. One thing like that is that now Daniel is a co-maintainer of Orderless, which is great because Daniel is extremely efficient at fixing bugs. He does it instantly. He figures out what's wrong and has a patch in a few minutes after he looks at the issue. He looks at the issue the day it was posted or the day after. I can't do things that quickly. It's great that he's helping out with orderless. It wasn't planned. It just felt right from the very beginning. I immediately realized he had some great ideas and implemented a lot of them. Then we started doing that the other way around. I started commenting on a bunch of issues in Consult and Vertico. I think I exerted some pressure on Daniel to add features to Vertico, like the grid view and the horizontal view. Or maybe specifically the grid view, because at the time I was... I'm sort of slow to switch basic Emacs infrastructure. I wasn't using Vertico for a long time, even though I was like opining on the Github issues for Vertico, and the reason was that I was stuck with the vastly inferior embark-live. There was this embark-live thing where you could pop up a buffer with the targets in the minibuffer, which just means a completion candidate. So you could use Embark as a kind of completion user interface. It was very slow, but it was very featureful. You could do a vertical list. You could do a grid. In the list, you could activate zebra stripes. Yeah, you can see that's been removed from Embark. But I kept saying to Daniel, I'll switch to Vertico if you add a grid view. He eventually did add the grid view. I kept my word and switched to Vertico, which is much better than the thing in Embark. I was just being stubborn by not switching earlier. But if I had switched earlier, maybe Vertico wouldn't have a grid view.

Sacha: I think it's definitely a good example of a set of packages that has... So all this started in about 2020s or so. So we actually can see how people have gotten into using Vertico and all the other packages compared to, say, looking at more popular packages that have been around for a long time. "Of course everyone's been using Org Mode for a long time." It's there. It's part of the fabric.

38:01 Technology adoption and Emacs packages

Sacha: It's very interesting to see the technology adoption around it. A lot of the things that people struggle with as package authors is getting other people to try out their stuff. With Orderless and Embark probably in the early days, what was that like to put this thing out there in the world and have people start to try it? How did people find it?

Omar: I personally found it very scary. At the beginning, I still thought Embark was a part of my personal Emacs configuration that sort of grew out of control and I decided to publish separately. But then I have all these people telling me how to improve what I still thought of as part of my personal configuration. I think one thing that helped was that people made very good suggestions. So I realized, no, no, it's worth publishing reusable parts of your configuration just for the GitHub issues, just for people finding bugs and suggesting improvements and so on. But yeah, I had to adjust to having some users. At first, it was very few people. But then they got added to Doom. I think they were made the default in Doom. That was a huge influx of users. That was very scary. We were suddenly flooded with new bug reports, like all of the packages in the family. I remember feeling like there's a horde of Doom users running at us.

Sacha: All right. So, starter kit, then everybody gets into it, and then everybody starts talking about it because they're like, yeah, you know, it's great. You can specify things out of order. You don't have to remember what words come in, which order when you're completing things. Those of us who aren't on starter kits are like, yes, we should try that too. That's how it's done.

Omar: Doom helped a lot to raise awareness and adoption.

40:06 Personal packages and naming conventions

Sacha: You've got a lot of other small packages. For something as small as block-undo, which you showed us, it really just fits in one screen. Is that something that you would set up as a different repository or just as a file within your current one?

Omar: No, those are all in my user-lisp directory.

Sacha: I have actually successfully used use package to grab stuff out of your user-lisp directory and use them in my config. Yeah, it works. I just say, all right, my load path is here where I've checked out your source code. It defines these commands. Then I can bind your functions to my shortcuts. Although, because your functions are named the way that I would expect Emacs functions to be named, I've been defaliasing them so that I don't accidentally say, oh yeah, that's totally built in when it isn't.

Omar: Yeah, I'm inconsistent with these little packages in my user-lisp directory. In some of them, I do stick to the convention that the package name is a prefix for all the functions, and for some, I don't. For some, I just try to name them the way exactly what you said. Like, what would these be called if they were built into Emacs? Which means they don't share a consistent prefix often. I should probably make that more consistently use the package name as a prefix so that they're easier to dot.

Sacha: Or I have another suggestion. You could get apply-kmacro-to-paragraph or whatever that is into core Emacs. That would be great for everyone.

Omar: Yeah, maybe that one is useful enough. Some of these I don't use anymore because I think I've substituted them with workflows with Embark. For example, eval-region-advice. It bothered me that none of the evaluate commands are “do what you mean” in the most common sense in Emacs. The most common sense of do what I mean in Emacs is if the region is active, use the region. Otherwise, do the normal thing. All of the evaluate commands should evaluate the region if the region is active. So that's what this does. But I don't use that anymore, because to evaluate a region, I usually use embark-act e. What else is here?

42:26 find-file-at-point and directory names

image from video 00:43:06.133Omar: Oh, some of these things are like tiny things that are almost invisible, like this. In Eshell buffers, By default, find-file-at-point doesn’t realize that if it sees the filename printed in an eshell buffer, it won't look at the prompt to figure out what directory it came from. If you type ls and you're in your current working directory, all of those listed files, the find-file-at-point guesses that they are files in the default directory, and that guess is correct. But if, further above, you had gone into a different directory, called ls there, then those files are no longer in what is now the default directory. So this just adds a little bit of smarts to find-file-at-point. It looks at the prior prompt to see what directory that was run in, and then tries to see if the files it sees there are in that directory. Of course, the only reason I want this is because I sometimes use embark-act on files I see written in the Eshell buffer.

Sacha: I love this. I love how all these little bits of code show that at some point you were annoyed by a tiny, tiny problem and you're like, that's it, I'm just going to write some code and it's never going to be a problem again.

43:49 The value of using Emacs’s APIs

Omar: One thing I like about this is it also shows sticking to Emacs APIs. Embark uses find-file-at-point to guess what things are referred to files. I did this to improve the functionality of Embark in Eshell buffers, but what it really does is improve the functionality of find-file-at-point, which I hardly ever use directly. I almost always use it through Embark.

Sacha: Send it upstream! Okay, so you use Emacs for working with a shell, working with your files, doing math, doing some programming as well. Are there unexpected things that you use Emacs for?

Omar: I don't think so. Mostly I write. It's mostly writing prose. I think I was slightly misled about what a job in academia is like. I mostly write emails. That's the bulk of my job by the time consumed.

44:56 org-ql and usual files

image from video 00:45:18.667Sacha: You have some shortcuts around org-ql for managing your agenda or other things.

Omar: This notion of the usual files. I was often using org-ql to search this set of files: every file mentioned in a refile target, every file mentioned in a capture template, and every file agenda file. Here it is. So I thought that's what I want to search. I want to search every file I mentioned in a refile target, every agenda file, and every file that I mentioned in some template. That's what this does.

Sacha: I don't know if you trust your hiding things enough for us to try that. Since you put so much work into it... Or do you want me to hide the screen first and then you can let me know when it's safe to look?

Omar: No, no, that's fine. I can show you the censorship process. What I thought I would do is I could show you the... Wait, what is this? Why is that not an action? Oh, library. Oh, I have not loaded this. Yes, now it's loaded. Oh, so this should be... Why is this not recognizing org-ql usual files as a variable now that this is loaded?

Sacha: Oh, great. I'm also open to debugging demonstrations live because that is something that a lot of people do.

Omar: Sorry, I think it just hadn't loaded this file. Now I ran a command from here and now I should have a variable. Yes, I have a variable. So we can go to Customize.

image from video 00:46:33.967Omar: The ones that have sensitive information are tasks, home, health, Definitely work. Journal. I don't really mind people seeing my journal, but that's boring. There we go. Yeah. So now I got rid of all of the sensitive files. And so now I can show you. I usually just search through all of these files at once. So I had a list of things I wanted to tell you about.

47:06 Shortcuts for org-ql search syntax

Sacha: I should also point out that your config has some stuff for inserting things into the org-ql search syntax.

Omar: You're extremely prepared for this chat. Yes, C-,has a little key map that will insert stuff like priority. Oh, I don't have, let me remove “Sacha”. Oh, yes, everything that I have with priorities is in one of the files I removed. I only use priorities for work.

Sacha: Okay, gotcha.

Omar: We could use to-dos.

47:43 Org TODO states: TODO, WAIT, DONE, NOPE

image from video 00:47:45.733Sacha: I love that you have a to-do state called NOPE.

Omar: It's for things that are cancelled, but I don't want to delete them yet. Actually, it's mainly there because when I archive them, I want to know that I had that task at some point, but decided not to do it.

Sacha: Well, it's so much less verbose than CANCELLED, so I think I might actually just...

Omar: For a long time, I was using monospace fonts, so I wanted to have everything fit in four letters. So I have... Yeah, all of my, I have TODO, WAIT, DONE, NOPE, and they're all four letters long.

Sacha: Nope. Gotcha. Okay. So that's org-ql and that's your inserting thingy.

48:26 The inserter macro

image from video 00:48:36.667Sacha: The other thing that I wanted to point out that your definition of the inserter was nice because it's a macro. So you have this thing that allows you to just define all these interactive functions. You can add it to the key map because the key map expects interactive functions. If people are watching, yeah, this is something you can do.

Omar: I should tell you that there was actually a serious performance bug previously. What I had before this… This string is a keyboard macro that inserts those letters. It is extremely slow if you do it that way for some reason. I think org-ql searches after the T, after the O, after the D, after the O, after the colon. For some reason, that was extremely slow. So I switched to these lambdas that just call insert. That does it in a single step, and it's instantaneous. But my first instinct was, oh, well, this is a good use of keyboard macros. I'll just assign these to keyboard macros. It's not a good idea in this particular case.

Sacha: I imagine there should be some kind of debouncing on org-ql to make it not do that if you're typing very quickly, but... I don't think there is.

Omar: Let me see if... Maybe also do a longer one so it...

Sacha: That's okay. I take your word for the bug that you ran into.

Omar: I wanted to show you just because it just feels like a really long pause, but it didn't work right now and I don't know why not. That's okay.

Sacha: Curse of the live demo. So that's inserter.

50:05 luggage: generative art experiments

image from video 00:51:32.367Sacha: One thing that I definitely want to make sure we had time for was your little generative art experiment, luggage, because you're having fun with Emacs.

Omar: Yes. Yeah. There are some people doing amazing generative... Oh my gosh. I do not even have it installed. Yeah. Let's... I forgot that we were going to do that. That's okay. But it should be easy. How is :vc used?

Sacha: (:vc (:url …)).

Omar: I have to go to a previous example to figure out.

Sacha: I'm surprised you don't have a consult-line and then just embark-insert.

Omar: I do that. I do that a lot. But I forgot this time.

Sacha: Actually, looking at your config, I learned about consult-multi-occur because apparently there all these multi-buffer equivalents to the commands that I've been using. That is really useful for using stuff from buffers I'm not even looking at.

Omar: Okay, load it.

Sacha: Let's see if it actually can still do the thing. There we go. So you have some Emacs Lisp to generate this SVG. Yeah, and it's just got...

Omar: And which other ones do I have? Luggage. There we go. Tubes. I think this one has some nice other color schemes. Classic? Classic is the one. Oh yeah, stained glasses is the one I wanted.

Sacha: Nice. I wanted to mention it specifically because a lot of times people think, oh, Emacs is a text editor. But because it's also got support for SVG and other types of graphics, you can play around with it. Sometimes it's just doing it for fun like this, but also there might be some other visualizations that you can do with Emacs. That is actually pretty interesting.

Omar: Yeah.

image from video 00:52:26.800Omar: Have you heard of this program?

Sacha: No, I haven't come across it.

Omar: There's an entire book with this title. So it's a single line of BASIC. 10 print. Oh, I'm not, I don't know BASIC, but the idea is like you randomly pick either forward slash or backslash.

Sacha: Oh, yeah, yeah, that makes sense now.

Omar: I'm sure this is not correct BASIC, but, you know, something like that. Yeah, I get the idea. Yeah. And that's what this does. And then you GOTO 10. It's like... It makes these elaborate mazes. It's an extremely simple program.

Sacha: So this is the kind of stuff you do for fun. I mean, you probably do lots of other things for fun, too.

Omar: Yeah. But this... No, that's not the buffer I wanted. Where is... Did I kill it? I killed it. Yeah, one of these I did. What is it? Dominoes. Yeah, this I did for a math talk I gave. It just produces random domino tilings of the board. I gave that talk from an Org file using Prot’s Logos package. I usually use PDF slides, but that time I wanted to use an Org mode buffer because I was going to run code on the computer. Like this, for example, generating random domino tilings.

53:49 Teaching and Emacs

Sacha: So you've given a number of talks. Do you also teach any courses?

Omar: Yeah, I do teach both undergraduate and graduate math courses. Recently, mostly graduate math courses. But yeah, I really like teaching. You always learn something. Even the subjects that you think you know very well, teaching a course always teaches you something new.

Sacha: Have you gotten students into Emacs?

Omar: No, I don't even try. “I use this weird text editor Emacs, it's pretty cool, but it takes a while to learn. I'm not recommending it. I love it. If you do try to use it, you can ask me anything.”

Sacha: Yeah, it's pretty hard. I know some professors are like, okay, this is what we're going to use for the course. But I imagine, depending on your subject matter, you might already have your hands full teaching the subject matter rather than adding it.

Omar: Oh, yeah, yeah, definitely. No, no. The students I try to talk to Emacs about are like the students that are writing their thesis with me. No, never in a course. I never mention it.

54:53 The print10 generator

image from video 00:54:56.900Omar: Oh, there it is. In the docstring, I have the correct program in BASIC. The backslash and the forward slash are consecutive ASCII characters. 206 and 207. You add a random number between 0 and 1 to this one and then round to the nearest integer.

Sacha: All right. You can get surprisingly interesting patterns out of it. That is also very cool. Fun with Emacs. This could definitely be like a zone screensaver if you wanted to.

Omar: Yeah. I just thought it was really nice that Emacs displays SVGs natively. Those are very easy to generate by text.

Sacha: Are there other interesting corners of your config that might not be immediately obvious to people who are just reading the source code? What other workflow things are nice for you?

Omar: Sorry, what were you saying?

Sacha: I can also start just occurring through my config for all the things that I've stolen from your config in the last two days.

Omar: I don't think I have any concrete idea of what to show now. I think we've covered most of the ones I wanted.

56:23 arXiv

image from video 00:57:42.967Omar: As an academic, I deal a lot with preprints on the arXiv, so I have a little library that will show me the PDF or copy the URL. I like personalized software because it does exactly what you needed to do. I noticed that there were a bunch of tags on Mastodon that related to archive papers. Often when I was in a Mastodon buffer, I wanted to do something to the paper mentioned at point. That's one of the acceptable inputs for my arXiv library. So, for example, this is an arXiv link and I can ask it to show me. So that's a bug. This should definitely have visual-line-mode activated. I can just quickly read the abstract without visiting the archive website.

image from video 00:57:51.200Omar: Or I can open the PDF.

Sacha: Very cool. Very convenient.

Omar: Yeah, so. I like that in Emacs you can do all these personal things that you'll need but are not likely to be needed by many people. They're just easy to do. Vim is also very configurable, but the Vim script language is sort of awkward, so I never did anywhere close to the amount of configuration in Vim that I do in Emacs. That's why I would never go back to Vim now. I would miss all the stuff I've written.

58:29 Toggle keymap

image from video 00:59:06.133Sacha: One of the little personal customizations that I liked reading in your config was the fact that you have a key map just for toggling various things like the mode line or the header, you know? Yeah. You want to tell us more about your awesome key map for that?

Omar: You don't need them that often, so it's OK if it's under a long prefix. It's just tedious when you want one of them, to have to type the command name. It also helps me remember which things I commonly toggle. I often have to hit C-h here and see what I have available to toggle. I don't know why toggle is a category for commands, because obviously these are very disparate commands that do very different things. But they're things that you occasionally turn on or off, and it's convenient to have them all together. Choosing the letters here was very difficult. Everybody wanted to have the same letters. L was for visual lines. P for variable pitch mode because I think of them as proportional fonts. It took a lot of tweaking. I'm sure if I looked through the GitHub history, you'd see a lot of tiny changes just changing the binding of one of these.

Sacha: I find it difficult to get the hang of new key bindings, especially for things that I'm not using often enough for the key bindings to stick.

Omar: I often forget that I have a key binding for something.

Sacha: So how do you deal with that? I mean, yes, you stick it in an Embark keymap and you just bring it up to the target.

Omar: Yeah, I do use Embark bindings in keymap a lot to just explore keymaps and remind myself. I don't need to memorize a binding. I just need to remember that I have a binding. If I have a binding, I can find it later. But sometimes I don't remember that I have a binding, so when I'm looking at my configuration, I'll just re-scan what things I have bound from time to time. Mostly I stick with just… I know under what the start of the prefix is, and then I'll just use Embark to remind me of what I have there. Which is nice, because you can also see the docstrings.

1:00:54 isearch-delete-wrong

image from video 01:01:32.267Sacha: I like how you try to use some of the conventions to make it somewhat easier to remember. One of the key bindings that you have that I want to point out, because I think it's a useful technique, is you have an isearch-delete-wrong.

Omar: Right. isearch keeps track of where the last portion of the search string that matched is. You can see it highlighted in the buffer, right? So this means it found up to “del”, and then it didn't find "tok". isearch-delete-wrong will just delete that entire part.

Sacha: So that way, you can just restart from what actually exists. Combining that with the fact that you've got your search whitespace regular expression to be a wildcard means you can...

Omar: Oh yes, this I stole from Prot. He recommends this.

Sacha: Yeah, which means you can use isearch to find things, even if there's other stuff in between them. When you can't find something, you can restart.

Omar: I'm not sure... I'm not sure if this is the best setting. I want to be able to search this way sometimes, and sometimes with whitespaces treated literally, so I should keep statistics on how often I actually have to turn this off. It might be that for me the better default is the other way around. You can turn it off with M-s SPC. Match spaces literally. isearch-toggle-lax-whitespace. I don't know. Maybe for me the default would be to treat whitespace literally, because I find that if I have a space in my search string, I often want to turn on the literal matching. But it's probably still this is the better default. I think I do it less than half of the time I have a space. But it's not that far from half, it feels. I don't have statistics.

Sacha: How do you even collect statistics on this? Aside from making a little note every time you're like, oh, I didn't like this.

Omar: I mean, I would instrument isearch somehow, but I haven't thought about that problem.

1:03:14 isearch - continue from the beginning of the match

image from video 01:03:44.400Omar: One nice thing I do with isearch is another one of those things I got from Vim. isearch, by default, leaves you at the end of the match. I almost always want to be at the beginning of the match, because that's what I got used to in Vim. I think it must be here. I have something exit at start. I tell isearch to exit at the beginning of the match. The way you use this is you install it as a hook, I believe. Is that right?

Sacha: You seem to have options.

Omar: Yes.

Sacha: I see. So S-RET lets you exit at the end, and then by default... Yeah, which is Emacs default.

Omar: But I find that the better default is to exit at the beginning. Yes, and that's the whole point of that. For example, if I want to mark until that parentheses, then I would search for the parentheses, and I don't want to include the parentheses. That's not a good example. But with a word, it's often like, I'm looking for a word, but I want to highlight up to the end of the word. It's just like, if you want to mark a region from point to some search term, with the Emacs default, what you have to search for is the thing that is at the end of the part you want to match. But often I want to say until like the thing that starts here. It's just my brain works that way. So for me, it's much better to exit at the start of the search. Which means I don't understand isearch on other people's Emacs. It just leaves the point in the wrong location all the time. If you're going quickly, you won't realize that it's just a mess. It does mean that I can only use isearch if it's configured this way.

Sacha: Well, that's the thing about Emacs, right? Once you've got it set up, you've got to use your config because everything else just feels off. It just feels weird.

Omar: Yeah, that's right.

Sacha: All right.

1:05:12 Using keymaps to remember sets of commands

Sacha: Going back to the toggle keymap, @gcentauri says, I'm not lazy enough. I just M-x orderless consult, find the thing that I'm toggling, which I do a lot also. I just use M-x for all the things because I can just specify parts of it.

Omar: There's some toggles I don't have in the keymap because I use them very rarely, but yeah. What I like also about the keymap is that it's a place to remind myself of the toggle commands. I often just do this. What was the thing? I haven't used that in a while.

Sacha: Having a shorter list, it means you can just use recognition instead of recall, right?

Omar: It's short enough that I can read through it.

Sacha: I like that a lot. I like the fact that with that Embark C-h screen, you can use completion even to select the commands from that subset.

1:06:04 Other things from the config

Sacha: A couple of other things that I picked up from your config: There’s your dired-open-externally, so it makes it very easy to open something in an external application.

Omar: And it just calls Embark open externally. This function moved back and forth from different places. I think embark-open-externally used to be in consult. Daniel said he felt it didn't fit in with consult. Embark consult would put it in keymaps. He was right. Consult didn't have a very clear personality at the beginning. It was sort of like a grab bag of commands. Eventually, what gelled is that a command should be in Consult if there is a useful way to write previews for it. So, preview is the distinguishing feature of what is a good fit for Consult. Now, I hope Daniel would agree with that. That seems to be the criteria now. That's great. I absolutely love preview. That's one thing I miss a little bit with org-ql. I use org-ql mostly to search through Org files, but the preview is kind of manual in that I use Embark to do it. If I want to preview a command, I just use Embark to do what I mean.

Sacha: Yeah, that's a good idea. I should try that.

Omar: So any command that doesn't have a preview, I mean does, you can just use embark-dwim, it'll complete the command for you.

Sacha: Okay, the kid has arrived, so I have to go off to lunch. But thank you so much for the quick peek into your config. I'll put the transcript together and then people can do that. But in the meantime, people can look at your config for all sorts of wonderful goodness.

Omar: Thanks.

Sacha: Thanks to everyone for hanging out. Looks like the isearch tip was popular, so you might see a lot of people getting that from your config. Anyway, thank you so much for this. I’ll see you around.

Omar: Thanks, Sacha. This was fantastic.

Sacha: Alright, nice.

Chat

  • takoverflow: ​​Hello Sacha and Omar, thanks for this chat! :)
  • CharlieBaker707: ​​Definitely going to add the keycast transparency to my config! I've been wanting that for a while!
  • gcentauri: ​​i'm still a minibuffer noob - its been nil my whole Emacs life!
  • CharlieBaker707: ​recursive minibuffers is amazing. biggest win for me is that it lets you select things and paste them in, like from a completing-read's history for example
  • gcentauri: ​haha apparently i do have recursive minibuffers set to t, along with my Vertico config 🤔
  • Zor_org: ​​was there a time you wanted multiple cursors?
  • Zor_org: ​if so, was there any workaround you thought of with embark or kmacro?
  • gcentauri: ​keyboard macros are a fun mini-game
  • CharlieBaker707: ​I have embark-act set up to expand in the same way expand-region does, but with embark's type awareness. It's also easy to add a contract function.
  • CharlieBaker707: ​I also have a completing-read interface and a transient menu to jump directly to one of many types under point that I'm seeiking.
  • CharlieBaker707: ​For sure!
  • CharlieBaker707: ​I was going to create a tiny extension, but I can open a PR in embark!
  • Zor_org: ​even more crazy with elfeed 4.0
  • gcentauri: ​I found Orderless and Embark through Daniel's suggestions in his packages :)
  • Zor_org: ​if emacs gets canvas patch soon, more things can be done in luggage (lik gifs and image frame as well)
  • gcentauri: ​i am not lazy enough, i just M-x orderless consult find the thing i'm toggling
  • PuercoPop: ​​I didn't knew isearch had a built-in way to fix the isearch quirk. Now I can remove the snippet I use the implement it that I cribbed from the internets
  • gcentauri: ​yeah adding something to a keymap you make does help recall
  • PuercoPop: ​​The isearch quirk is a common complaint from what I understand
  • gcentauri: ​yeah i'm gonna use that iserach bit
View Org source for this post

YE24: Sacha and Prot Talk Emacs - Newbies/Starter Kits

Posted: - Modified: | emacs, community, yay-emacs

: Added chapters, transcript, and Prot's defaults.

Context

The Emacs Carnival theme for April 2026 is newbies/starter kits. I chatted with Prot about helping people get into Emacs and also supporting lifelong learning.

Prot had some notes on how he started with Emacs in 2019 in All about switching to Emacs (video blog) | Protesilaos. These notes were just a few months after he started, so his experience was pretty fresh.

In Computing in freedom with GNU Emacs | Protesilaos (2026), he said:

Remember that I started using Emacs without a background in programming. … I learnt the basics within a few days. I started writing my own Emacs Lisp within weeks. And within a year I had my modus-themes moved into core Emacs.

Prot has several projects that might be of interest to many newcomers to Emacs:

  • modus-themes, which are part of Emacs core and are therefore just a M-x load-theme or M-x customize-themes away
  • Emacs Lisp Elements, a book that helps people learn Emacs Lisp
    • Where does this fit into people's learning journeys? How can they come across it and use it?
  • perhaps Denote
    • What would it take for people to learn enough to be able to use this?

I'm also curious about his thoughts on the general Emacs newcomer experience and what we can do to make it better.

He also offers Emacs coaching. I wonder if any newbies have taken advantage of that. There are a few other coaches listed on the EmacsWiki. (Ooh, Emacs buddy, that was neat.)

Other possible topics: Philip suggested the following general themes for the Emacs Carnival:

  • What are your memories of starting with Emacs?
  • What experiences do you have with teaching Emacs to new users?
  • Do you think if starter kits are more of a hindrance in the long term or necessary for many users to even try Emacs?
  • What defaults do you think should be changed for everyone (new and old users)?
  • What defaults do you think should be changed for new users (see NewcomersTheme)?
  • What is the sweet-spot between starter-kit minimalism and maximalism?

Chapters

  • 0:00 Intro
  • 0:08 Warming up
  • 2:36 C-g is supposed to get you out of everything, but it doesn't work for the minibuffer
  • 3:11 Anything related to display-buffer is hard for people to configure. Many windows do not focus by default. You have to switch to the other window to q.
  • 4:28 Good defaults
  • 4:35 How do I set my fonts? Which is the one I should be using?
  • 5:13 ediff is unusable by default for everyone, not just newcomers
  • 5:52 Packages to install
  • 6:28 People muddle through, but it's confusing
  • 8:20 The wiki might be a good approach for the community. Start here.
  • 9:33 The direction of the newcomers theme is nice
  • 10:45 Themes versus minor modes
  • 12:19 People think of themes as styles, not arbitrary customizations
  • 13:55 Listing changes for newcomers-presets
  • 16:10 Terminology is also a challenge
  • 16:52 Maybe documentation aliases?
  • 17:56 Learning Emacs as a nonprogrammer
  • 19:29 Emacs Lisp Elements
  • 20:28 Getting the hang of Emacs
  • 22:28 Getting help when you have a starter kit
  • 24:25 Customize is overwhelming for beginners
  • 27:53 debug-init
  • 29:06 Getting help: partially bridged by LLMs?
  • 31:01 Things people don't even know about
  • 32:42 Filling in the blanks
  • 33:37 .emacs
  • 37:04 Discovery and the info manual
  • 38:34 Address your immediate need; small steps
  • 41:45 :config and setq is nicer than :custom for C-x C-e purposes (eval-last-sexp)
  • 45:28 Culture of documentation and sharing
  • 47:11 Link to a search
  • 49:48 Getting through the gap between beginner tutorials and the next step
  • 51:08 Predictability
  • 51:51 Brief mention of Popper
  • 52:25 Earlier is better than later for Emacs Lisp. Take it as is.
  • 55:17 Before and after comparisons
  • 56:04 user-init-directory
  • 57:20 Emacs core
  • 59:02 Getting past the initial awkward phase
  • 59:34 Even reporting an issue is a great contribution
  • 1:00:44 Next steps: adding to the wiki
  • 1:02:37 Core longevity

Transcript

Expand this to read the transcript

0:08 Warming up

Sacha: All right. Hello, this is Yay Emacs 24, I think. And today I'm going to be talking to Prot, who is going to join eventually. In about five minutes is our scheduled time. And I want to pick his brain about newcomers, the newcomer experience for Emacs, the starter kits, what we can do to make it easier for people to get into Emacs, and how we can support lifelong learning. So let me spend a few minutes here getting all set up so that if you have any questions, you can use the YouTube chat during the live stream so that I can read your questions out loud to Prot. And also so that I can share everything. I think my audio is working. And also in the meantime, I can tell you what I've been doing lately. I have just posted a guide to newcomers presets, which is a new feature in Emacs 31. It's a theme that enables a bunch of defaults. Sorry, that changes a bunch of defaults to make it a little bit nicer for people. And let's see, what was that? I don't know what that sound just meant. Okay, Prot, it says he's in the Google Meet room. So I will now admit him. And I think we should be live. Fantastic. Hello. Hello, hello. All right.

Prot: Hello, Sacha. Good day.

Sacha: Hello, Prot. Good day. Thank you for joining early. I was just doing my pre-session panicking and warming up. But since you're here and since I have a hard stop in about one hour, a little over one hour since I have to make the kid a grilled cheese sandwich, let's dive right into it.

Prot: Yes, yes. The grilled sandwich cannot wait.

Sacha: No, no, no. She'll be hungry. So, the theme for the Emacs Carnival this month was newbies and starter kits. And it gives us a good excuse to start thinking about How do we make the Emacs experience better for new users? Now I know you probably have run into a lot of new users from the talks that you've been giving, the packages you make, everything, the coaching. So tell me about what you've been thinking about this so far.

2:36 C-g is supposed to get you out of everything, but it doesn't work for the minibuffer

Prot: Yeah, yeah, yeah. So broadly speaking, there are a few pain points that I think every new user experiences. One is the behavior of C-g. The fact that you have the mini buffer open and you do C-g because C-g is supposed to get you out of where you are and the mini buffer will stay open by default. And I have seen people struggle live. It's like, oh, I am, you know, they have the mini buffer open, they click somewhere else, then they type C-g, the mini buffer stays there, and they're like, what is happening? Why is this not working? It stopped working. That's the one thing.

3:11 Anything related to display-buffer is hard for people to configure. Many windows do not focus by default. You have to switch to the other window to q.

Prot: The other big area where a lot of people, not just beginners, struggle with is anything related to display buffers, which can be configured, of course, via the display-buffer-alist. And some of the common pain points with that are the fact that many windows do not focus by default. For example, you open a helper buffer, it doesn't focus the window by default. So if you want to type q to dismiss it, you have to switch to it, then type q. You do a care, it doesn't focus a care by default. You have to go there and then interact with it. These sorts of things. And then there are a few other things. I have written some settings that I can share with you as well. Maybe I can, I don't know, email them to you and then you can... I don't hear you now. One second.

Sacha: Sorry, I turned on mute. Do you want to share your screen? Because that's another thing you can do.

Prot: Yes, of course, of course, of course. But I meant to say that, so I have this here, and I was of course about to write a blog post and all that. Let me increase the font size. Is this font size okay or is it too small?

Sacha: Oh, this is good. Yeah, yeah, yeah.

Prot: Okay, so I have written a few things, so I don't have to go through all of them.

4:28 Good defaults

image from video 00:04:28.800Prot: But these are basically good defaults based on what I have noticed.

4:35 How do I set my fonts? Which is the one I should be using?

image from video 00:04:36.367Prot: Another thing that is really common is how do I actually set my fonts, right? Because there are like a million ways to do this as well. And the people are like, okay, but which is the one that I should be using? And of course, when I pick one option, I don't mean to say that this is the right option, but it's just to not be technical about it. Like, okay, just use this and forget about it.

image from video 00:05:01.467Prot: A few other settings and a few common packages. And at the end of this... Oh, sorry. I have to really make this point.

5:13 ediff is unusable by default for everyone, not just newcomers

image from video 00:05:13.567Prot: Ediff by default is unusable. Out of the box, Ediff is literally unusable. I cannot excuse that. Everything else I can excuse, this is not excusable. Sorry. This is the minimum viable setup for it.

Sacha: So maybe that's something to suggest for newcomer presets or maybe even the defaults.

Prot: I would say the defaults. This is not a newcomer thing. Basically, if you want to have that default layout, you just have to opt into it. Sorry if I'm offending anyone, but I don't mean to say that. You have to consider the ergonomics of it.

5:52 Packages to install

Prot: And then towards the bottom of this list, some packages, third party packages. that I recommend for installation. This is not exhaustive. I try to be minimalist here. So, of course, there are many, many good, excellent, top-notch packages that I don't recommend here. And, for example, I don't recommend any of my packages here. But I just included some for people to get started.

Sacha: So it sounds like we should have a Prot starter kit.

Prot: No, no. I already have too many packages that I maintain.

6:28 People muddle through, but it's confusing

Sacha: It also sounds like you are talking to a lot of newbies and you are hearing about a lot of pain points and frustrations. How are people finding information in the first place? How are people finding this information? Do people tell you about their experience of getting into Emacs? Where are they finding the stuff? How do they find their way to you?

Prot: Generally they muddle through. So they will find a blog post, they will find a video, they will just do some search. Now, of course, there is also LLMs providing feedback. So it's a combination of all those and they try to piece together whatever kind of knowledge those sources provide. The thing with the newcomer experience is that there isn't a curation of content. Like of course you were doing that thing with the wiki, right? So of course you are working towards that. But what I mean is there are like options like, oh, you can do it in these 10 different ways. But for a newcomer, this is just details that don't make sense. Because the newcomer cannot weigh the pros and cons of each option, or even if they have pros and cons, or they are just different ways of expressing the same intent. Such as with the fonts, for example. You can do the frame fonts, or the faces, or whatever.

Sacha: Okay, so if there was something more curated, what would that look like? I know you spend a lot of time thinking about the, you know, the information architecture of your documentation, which is the lovely thing about your pack, one of the many lovely things about your packages. But what could that kind of newcomer experience look like for documentation?

8:20 The wiki might be a good approach for the community. Start here.

Prot: What you were doing with the wiki, I think is the right approach from a community perspective, meaning like, yeah, here is the single point of entry. Take it from there. Basically, don't look elsewhere. Start with this. No matter what you do, start with this. I think that's a good approach and basically in the community we should be agreeing on that. I didn't see all of your videos yesterday. I don't have the time to watch all of it. But basically on the Emacs subreddit, which is basically where a lot of people find information. That's the first thing that should be on the sidebar or basically it could even be pinned on the on the top of the tips and tricks section, the thread there. So that's the one thing. Yes, please.

Sacha: Yes, so the Emacs subreddit does have in its sidebar a link to the Emacs Wiki. Not calling out the Emacs Newbie page specifically, but there is a page. There's a link to the Emacs Newbie page from the Emacs Wiki homepage, I think. But yeah, as long as we can come up with a reasonably coherent starting point for people, then that will inevitably show up in people's recommendations as they respond to all these threads.

Prot: Yes, yes, very well, very well.

9:33 The direction of the newcomers theme is nice

Prot: Other than that, I really like the direction of the newcomers theme. I don't know exactly now if newcomers theme works in practice. Like, I don't know what happens if you do Emacs disable-heme, or specifically what I mean.

image from video 00:10:01.967Prot: I haven't tried this but what I mean if you do this: mapc disable-theme right, the custom enabled theme maybe you have seen this right so you want to disable all the other themes before loading your theme right I'm sure somebody has written something like this maybe I have done it and then it's like you know load your favorite theme now right and then you do your favorite theme or whatever For example, here. So in this case, I don't know what happens to the newcomers theme. I will assume that it will disable it. In which case, I think that has to be prevented.

Sacha: Oh, but then it wouldn't be treated the same as other things.

Prot: Which you can do. Which you can do, for example, if I go to Fontaine. And of course, I got this from use-package. But you can do it with a synthetic theme. So there is a little trick you can do.

10:45 Themes versus minor modes

Sacha: I was looking at newcomers presets recently, and when I was trying to make instructions for people to actually use this stuff, I ended up leaning towards just telling them to use either the splash screen, of course, or M-x customize-themes, from where they can check and uncheck things if they wanted additional themes layered on top of that. It's not like you can't uncheck it and then all of your settings go back to what they were before. Some of the things are still left over.

Prot: That's why I like the direction. I'm not sure if it should be a theme though. I think it should be a minor mode. And the minor mode should be like here is the opinionated settings and here are the default settings.

Sacha: Do we already have like a mechanism for letting minor modes override the variables in a nice way but let you go back to the previous version? Because it's not just restoring the default customized ones either.

Prot: I do something like that in Logos but I'm not sure to be honest right now how I even do it. Set arg and maybe this was a wrong time ago so I cannot even recall what exactly I was doing but actually this was contributed by Daniel Mendler so of course something like this could be added to Core Emacs as part of the newcomers theme eventually. If not, somewhere in core anyway.

12:19 People think of themes as styles, not arbitrary customizations

Prot: But I think it shouldn't be a theme. Basically, I like the idea, I don't think it's the right tool. Because themes are... It's also confusing language, you know? Because theme, when you talk to the average person, they will think of the style. And they won't think about arbitrary customizations. Whereas in Emacs we have this idiosyncratic conception of theme where it's like any kind of a user option as well as faces.

Sacha: So it sounds like if it were a package that defined a minor mode that people could turn on and off Even better, yes, exactly.

Prot: And there is this user option. I forget, do I even have it here for the built-in packages? I don't remember if I added it here. No, there is something like update the built-in packages. Yeah, so there is an option like that. So, of course, it could be like built into Emacs 31 as well as ELPA, kind of like Eglot. And then users could be like, okay, update this. So going forward, they can also benefit from whatever comes from Emacs 31. Or, you know, the development target of Emacs going forward.

13:55 Listing changes for newcomers-presets

Sacha: One of the challenges that I encountered when I was starting to play around with newcomers presets or other things like that is that it turns on all these options, but there's no easy way for people to say, okay, this is what has changed. This is how to use it. So I've started documenting that. And I think this is a challenge generally for many of the starter kits. It takes already a lot of work to make the configuration and maybe answer people's questions or It's a tricky situation how best to do it.

Prot: I guess the natural place for that is the manual. And the manual, I believe right now the manual mentions something along the lines of, well, newcomers can just toggle this on kind of thing, but it doesn't really tell them what that will entail. So I think it's worth actually keeping track of all the changes and be like, well, the newcomers theme will change this and that and the other. And it could just be a bullet point of items. Maybe it doesn't have to go into all the technicalities like, hey, we are changing, I don't know, the isearch so that it shows the counter. By default, it doesn't show the counter, right? Like, it doesn't need to be as detailed. It can just say, okay, these are the user options that are affected.

Sacha: or the minor modes that are enabled. You know, the specific commands and variable settings, whatever. It's like, how do I combine these different concepts to do something? Or taking a step back further, something we've talked about in previous conversations, how do I even begin to learn this overwhelming number of concepts? You know, how do I start to memorize all these keyboard shortcuts? And I'm not sure we have a lot of support for that yet.

16:10 Terminology is also a challenge

Prot: No, because I think part of the challenge here is the terminology. For example, if we say completion like me and you and other users, we kind of know what we are talking about, right? So minibuffer and orderless and all that, right? But if the user wants to express something along the lines, they may say the search box. Or, you know, like the interaction panel or whatever. So they don't have a language of the completion framework or the mini buffer or whatever. So even then it can be tricky for them to kind of narrow down what they are searching for.

16:52 Maybe documentation aliases?

Prot: And maybe then it makes sense to also think in terms of clusters of configuration, kind of what starter kits do with the various modules they define. And you can have aliases for them. Aliases in the manual, I mean. Like in the manual, if you type i, it goes to the index, right? And you can have a concept index. So you can have a concept index for the search panel or whatever. And that means the minibuffer and friends.

Sacha: So it's like we're doing search engine optimization so that people can find things with the words that they use. I'm not sure that will be in the Emacs manual itself, but one of the things I've appreciated about people sharing their notes through blog posts and things like that is because they're using their words to describe a concept, and they're linking it to the code that uses the words that Emacs does. So then people can then say, oh, I'm looking for this. It's actually called this in the Emacs world. But this takes time for people to kind of make those connections.

17:56 Learning Emacs as a nonprogrammer

Sacha: What was it like if you can look back to like 2019 when you were learning all of this stuff for the first time? What was it like for you as a non-programmer to come into this world where people are using all these strange terms?

Prot: Yeah, it was a challenge for sure. But I think actually the fact that I started out as a beginner, as a beginner into programming, I mean, benefited me in the sense that I was a blank slate. I don't have to unlearn terms. So I didn't have a concept of, okay, in other, I don't know, programming IDEs, for example, they call this the narrowing framework or whatever. I was like, completion. Okay, let's move on. It was the first time I was introduced to such concepts. So I think in that sense, I was lucky. That granted, there is a lot of reading involved. I was reading the manual and learning from it.

Sacha: And that's something I do too. I mean, I'll still casually flip through the Emacs manual or the Org manual because every time you read it, there's something else that catches your eye and makes you think, how do I use that? How do I do that? And I like that, you know, you and Mickey Peterson and other people have also been organizing these thoughts into like a linear arrangement of logical progression. So that's the books that There aren't a lot of books about Emacs that people can read.

19:29 Emacs Lisp Elements

Sacha: But how do people get to something like your Emacs Lisp elements? How do we support their learning journey from, I have absolutely no idea how to do anything in Emacs to, okay, I'm ready to read this book and get stuff out of it?

Prot: Yeah, yeah. When I recommend that book, I recommend it to people who have already decided that Emacs is the right tool for them. So I would basically say, look, Elisp is for you if you are already sold on Emacs, because what Elisp gives you is that extra you need to make Emacs do what you want, basically to tap into the potential programmability of Emacs. But to get to that point, you have already been convinced that you already like Emacs. If you don't vibe with it at the outset, you won't learn Elisp, not least because it's a niche language.

20:28 Getting the hang of Emacs

Sacha: Okay, so how do we get people to the point where they can vibe with Emacs? Where they can appreciate it? Because when they start off, it's this clunky text editor that has these weird keyboard shortcuts and strange terms, and all we can do is offer them videos and blog posts from people who say, this is totally awesome. I've been using it for three years or 20 years or whatever, and I love it. That's the light at the end of the tunnel, but there's a lot of tunnel to get through.

Prot: correct correct correct it's difficult and i think that's why something like the newcomers theme ultimately is the way forward where it's like yeah opt into this and that's already a good set of defaults and i think what really matters is to reach a point where you can actually open your files actually move around and that happens with the very basics like that happens with the tutorial already what the tutorial doesn't give you is the basic interface, such as the mini-buffer. The default mini-buffer, I don't think it's good for beginners. Actually, maybe it's not even good for advanced users, but that's another. You have to have a few of the basic packages enabled, and then the tutorial, I think, is enough for that initial push. Then, of course, it's also up to the user to do some reading, based on what you will provide them with.

Sacha: I know when I was trying this, I started a fresh Emacs so that I could see what it's like when people don't have their accumulated cruft of 20 years of configuration. And I was like, I need some kind of completion that I don't have to keep pressing tab for. So maybe Fido vertical mode can be part of that, you know, standard, at least in ?? or whatever, that would be nice. But yeah, there are a lot of these niceties that reduce the friction enough that people can then start enjoying things more and more.

22:28 Getting help when you have a starter kit

Sacha: Newcomers presets are some kind of starter kit. They're great at getting people over that initial hump. But the challenge with starter kits and probably things like the newcomers presets has also been that when people ask for help, it's hard because they don't know the things that have changed under the hood. So they're asking for help and the people who are helping them are like, I don't know what's going on there.

Prot: More so if the starter kit has its own macros and way of doing things, such as Doom Emacs. On the one hand, Doom Emacs does an excellent job at integrating everything, providing a polished experience, comprehensive configuration and so on. On the other hand, they have their own way of doing things like they have their own macros. You have to use Doom sync or whatever to do things from the command line. So somebody who is not using Doom basically has no means of knowing what is happening in that world. So that is definitely a challenge. So for me, a good starter kit is one that at the very least uses what a generic configuration would use, meaning no macros, no weird shell scripts and that sort of thing.

Sacha: And I did spend some time going over the starter kit list in the Emacs wiki to try to sort it by minimalist, stays close to vanilla, all the way to the changes a lot of things about Emacs and you probably should ask the community of that starter kit first if you need help. So that's kind of like Doom Emacs and Spacemacs at that end of the spectrum and things like better defaults would be like at the Like just a little bit of smoothing over of things. But then also, it was interesting to see some of the starter kits focus on saying, okay, you don't have to write any code to extend this further. A lot of the things are available through Customize.

24:25 Customize is overwhelming for beginners

Sacha: Now, Customize is pretty overwhelming also for a newcomer. So how do we get people to the point where they might feel comfortable going through this Customize interface And saying, oh, I can find what I want to change and I can change it and I'm not worried about breaking everything.

Prot: Yeah, I actually, when I was trying to use Customize with people, I gave it an honest try. Like, for example, we tried to do Emacs Customize the org capture templates. And I was seeing it live. Impossible for people to understand what is happening. Like, Customize has this concept of the insert button, right? So if you have a list of things, you can do insert to add the next element to the list. If you have an Elisp understanding of what you are actually interacting with, you kind of know what to do, right? But otherwise, I was seeing it live. It's like... I have no idea what is happening. What is this? So for me, my approach is basically skip customize altogether. For me, it's a lost cause. Unless it's completely rewritten, I mean in its current form, it's not good for beginners unless it's for toggles, like true or false kind of thing. If it's for anything more involved, it's not good. And what it is good for is for discovery, discovery of user options. But it presents the user options in a human-readable format which you cannot just copy-paste into your configuration. So, for example, it doesn't have the dashes for the names.

Sacha: Yeah, and getting it out of the customized variables if you wanted to keep a nice clean Emacs is hard. Although I would say that's more of an intermediate level concern. When they start caring about having a beautiful Emacs that other people can learn from. A couple of comments in from people who are watching the stream. Hello, folks! Hello! @hajovonta6300 says, "Hi legends." @JacksonScholberg and @petertillemans2231 say, well, @JacksonScholberg says hi. @petertillemans2231 says, "I am not worthy." @takoverflow says, "Thank you for these streams." @ShaeErisson says, "I love Emacs but haven't really learned Elisp." And I know Shae has been using Emacs for a long time. So that's interesting that you have people who enjoy using Emacs. I don't know whether something is getting in their way when it comes to learning Emacs Lisp or whether it's just totally fine already the way it is. So that's different things. @JacksonScholberg says, oh, so @hajovonta6300 says, "you are worthy if you are willing to learn." Maybe the resources are there as people start digging into EmacsLisp. Maybe the combination of looking at other people's source code and trying to ask on Reddit or whatever is enough. @JacksonScholberg says," I vibe with Emacs after using other text editors that were not minimalist enough for my preferences, plus having experience with other open source software like Linux." @petertillemans2231 says, "Well, Emacs and minimalist in the same sentence. Strange concept, but I know what you mean." There's a whole spectrum of things you can do with Emacs, right? So yeah, people can just use basic Emacs.

27:53 debug-init

Sacha: And then @petertillemans2231 says, "I guess learn starters quickly to use emacs --debug-init. Maybe not in the first hour, but close to it. Close to tweaking.

Prot: Yeah. Which of course doesn't help. It's very useful, of course, but it doesn't help beginners because they cannot read the backtrace.

Sacha: Yeah, it is hard to navigate even for people who are experienced like there's a whole bunch of things and what you need to change is like a small thing and you don't know about edebug and all that other stuff.

Prot: But of course debugging it many times of course it is a lifesaver for sure.

Sacha: Yeah, and I think a lot of these things can be stepped around if you have, you know, like you, someone more experienced with Emacs to watch over your shoulder either in person or virtually and say, you know, do it this way instead, or have you heard about this package? But this is an experience that I think not a lot of people have because many times they're isolated, right? They're the only Emacs person they know around them. And maybe they'll go to meet up, but maybe they're intimidated by the idea of asking about their beginner problem with all these other people talking about arcane Emacs list things. So how do we get people to the point where they can get help?

29:06 Getting help: partially bridged by LLMs?

Prot: Yeah, I think this is partially bridged. This gap is partially bridged by LLMs. Like a lot of people will just check with a bot and get something useful out of it and basically continue from there. And that's why I said earlier they muddle through because LLMs of course will give you what you ask. So if you kind of don't know what to ask, you will get something that may be useful, maybe needs a further tweak to it. That's why sometimes it's hit or miss.

Sacha: And I am seeing that in a lot of the discussion threads now. Of course, people are concerned about the environmental impacts and the ethical considerations around large language models, but there are also people who are saying, you know, this is what helped me write my first bit of Emacs Lisp, or this is what helped me figure out how to configure Emacs to do the thing that I wanted to do. So for that, I'm like, okay, then maybe there's something there. Challenge, of course, if it's hallucinating something, you're like, no, that function does not actually exist. You got to do it this other way. But if you can get them over some of the humps, maybe that's useful for them.

Prot: Yes, yes, yes. I think, of course, it's not 100% good, but I think it is, on the balance, I think it is good.

Sacha: So when people are too embarrassed or too intimidated to ask people in person, and when I go to these meetups, everyone's always super friendly. Sometimes we're live debugging someone's configuration or someone's function in real time. But sometimes that is a little difficult for people to get to for schedule or other reasons. There are other ways to understand something and ask questions about it and figure it out.

31:01 Things people don't even know about

Sacha: But sometimes you don't even know what to ask questions about. How do we help people in that situation where they don't even know that they're doing something inefficiently and that the solution for their problems is just one package away? How do we help?

Prot: That's difficult because it's on a case-by-case basis. I think you cannot optimize for that because each person will have different intuitions or different pain points, let's say. And maybe you can do it by having the most exhaustive kind of documentation with the equivalent of search engine optimization, as you were saying earlier. But I think eventually people will still have questions and even the formulation of the question may be idiosyncratic. So even if the concept is there, the way it is presented, you might not have a perfect match.

Sacha: And the idiosyncrasy of things is something that it's definitely a challenge for us when we're working with Emacs because everyone has their own way of doing things and everyone therefore has their own... How they set it up or the keyboard shortcuts that they use or the ways that they want the functions to work. Even trying to write documentation to say, if you're learning this, you might want to check out this stuff next, I have a hard time figuring out how to make that make sense to as many people as possible without overwhelming them with 20 different questions.

32:42 Filling in the blanks

Prot: That's the difficult part. Actually, I think that's the part where you have to assume that people will fill in the blanks. For example, I think yesterday you were doing this thing where, well, somebody needs to use Git, but what is even Git? So you have to even know about Git, right? And that's recursive because, well, how do you install Git? Well, you need a terminal. What is a terminal, right? Well, you need to have this thing called Linux. What is a Linux? So basically at some point you have to just say like I will give you as much as I can but I will limit it to the scope of this like Emacs basically. Because otherwise it has infinite scope.

Sacha: And I find that hyperlinks help a lot with that then because we can say, if you need a more detailed description, you can go over there. So now I'm trying to make it easier for myself whenever I say, oh yeah, put this in your .emacs.

33:37 .emacs

Sacha: I'm just like, oh, I'm just going to link to the Emacs wiki page on init files. Because there's this whole discussion that you have to have about what is your .emacs and sometimes it's actually your .emacs.d/init.el but sometimes it's actually your .config/emacs/init.el and, like, pass that off to a page to explain all that stuff.

Prot: Actually I want to say something about this because now it reminded me. So many people nowadays will use .emacs.d/init.el or .config/emacs/init.el But Emacs defaults to reading the .emacs file from your home directory. And I had this case where a user was writing their init file in one of those specified locations, but they did something with Emacs Customize beforehand and Emacs Customize wrote to the .emacs file. So they were loading Emacs and nothing was showing up and they were like, what is wrong? My init file is there. Why is it not working? I'm loading, you know, this dark thing. Why is it white? or whatever. And eventually it was because of the .emacs file. I'm not sure how best to resolve that given that you want to also be backward compatible.

Sacha: No, no, no. Okay. So when I tell people just, you know, here's the link to the init file page in the Emacs wiki, it also includes a describe-variable user-init-file, which will tell you which one is actually loading. And I have a to-do to suggest on emacs-devel, if they haven't already discussed it endlessly, that maybe there should be kind of like a M-x find-user-init-file that just opens that specific file. Would be nice. But yeah. Going back to the chat because people have been sharing great comments as well. Shae says, "I learned about new Emacs packages by pairing with other users and asking, how did you do that thing?" Which I think is a great thing for screencasts. People sharing videos as well because when people share a video, sometimes they see things that they wouldn't have mentioned because they totally take advantage of it. It's just something they take for granted. For example, in your live stream package maintenance sessions, I'm sure you've had this a couple of times. People are asking, what is that that you just did? Videos are great for this.

Prot: Let me open the door for my puppy. I'll be back.

Sacha: In the meantime, let's see if there's anything here I can address by myself. The puppies cannot wait.

Prot: No, the puppies cannot wait.

Sacha: Small mammals in general are like, they need us, they need us. @hajovonta6300 says, "I used Emacs since 2010 and had become a power user, but in the last year, I feel LLMs took over most of the tasks I usually solved with Emacs." I mean actually it's a bit of a tangent here but we're seeing that also with some of the long-term users of Emacs moving on to other editors because whatever they had customized on top of Emacs could be replicated by a custom application written by an LLM. The movement is going both ways. People leaving Emacs for other things, people coming into Emacs because LLMs can help them with stuff. So I just wanted to mention that because things are happening.

37:04 Discovery and the info manual

Sacha: @petertillemans2231 says, "Emacs documentation is very extensive, but I feel discovery of the docs is a problem for new users." And I want to dig into that a bit more. How do we help with this discovery thing?

Prot: In the info manuals, if you know two key bindings, it really helps a lot. One is g, the other is i. But you have to have completion already set up, like vertico-mode, for example.

Sacha: I also like using s for search.

Prot: Or s for search. Those help a lot, because then you can jump to a node or an index. Without those navigating, the manuals can feel cumbersome. That granted, we are back to the point where the user also has to do some research on their own. You cannot compensate for drive, motivation. No matter how much we write, no matter how many themes or minor modes we define, the user also has to be searching.

Sacha: Yeah. And it's going back to the challenge of being overwhelmed. You know, sometimes it's difficult for new users to say, okay, there's so much to learn. How do I scope this so that I don't go crazy? You know, what is the most important thing that I need to learn about first? And then what is the tiniest step after that that I can take? And so forth. Otherwise, it's just like, I want to learn about everything.

38:34 Address your immediate need; small steps

Prot: Based on the discussions I have had, I think the consensus is address your immediate needs. For example, you want to write a to-do list, all you need to know at this early stage is Org Mode. And not all of Org, because Org has approximately one zillion commands. Just to-do and done. And maybe schedule a date. Just learn that, and by learning that, do that for a week, do it for a month, however long it takes for you to embed it as part of your knowledge . And then once you have done that, move on to the next thing. Like, okay, now that I am solid on my to-do's, how do I do the agenda, for example, and incrementally add to that. And the idea is by piecing together your system this way, you achieve two things. First, you build on a solid foundation of knowledge where you know what you are doing. And two, you understand how your system is pieced together. So if something breaks, you already have an intuition of what it could be. Even if you don't know Emacs Lisp, you can guess like, oh, I added this thing the other day and now my Emacs is broken. So probably the breakage is there.

Sacha: And this decomposing it into those tiny steps so that you can piece them together and build slowly understanding each step along the way is something that new people struggle with because they don't have experience to know what the small step is. And I think that's where coaching and mentoring and you know sometimes If you're lucky enough to be able to sit with somebody who says, okay, your next step is just to do this. That would be super lucky. But most people will just have to content themselves with sometimes there's a playlist of videos that they can follow in sequence. Or maybe there's someone, you know, maybe they'll post on Reddit saying, okay, I know this. What should I learn next? I just wish it were easier for us to say... Let's imagine this from the helper point of view. How do we make it easier for people to say, all right, this is where you are. Here's some things that you can look into next. What do you do when you're coaching someone?

Prot: Yes, I always ask them what their needs are. There are some needs which are common. For example, completion. Vertico, for example, I think basically everybody can benefit unless you have a really special use case. But other than that, it's like, well, we don't need to fix everything. Let's understand what your needs are. Let's work towards that goal. And one way to break it down also conceptually is with use-package blocks. I think use-package is an excellent, of course, it's an excellent tool in its own right, but it's an excellent way of saying, you know what? This is one thing. This is one step. And this is the next step. And so people can start thinking in terms of each use-package is a step.

41:45 :config and setq is nicer than :custom for C-x C-e purposes (eval-last-sexp)

Sacha: I sometimes feel like I'm going back and forth. use-package is nice because it allows us to add the hooks and say this stuff happens after the package is loaded, so I don't have to keep having lots of with-eval-after-load. But on the other hand, it becomes harder for people to copy and paste things because then they have to know it needs to go inside the use-package. Do I use the custom keyword or do I just use setq because it looks more copyable?

Prot: This is why me, I don't use the custom. It's not that I have anything personal against it. It's that I found that it's unusable. If you have the equivalent of this in a custom, you cannot do C-x C-e. If you say use-package is syntactic sugar... I have read this before. To somebody who doesn't speak programming lingo, syntactic sugar doesn't mean anything. To me, it barely means anything after knowing all this stuff. So what does syntactic sugar actually mean? So what do I have to do to evaluate this, right? So I am like, okay, the more minimal you can do is just have a config and then you can do add-hook there, bind-key there or whatever. Granted, I don't do this here. I don't follow this. But I mean, if you want to have like a combination of what you were saying of the back and forth while still retaining use-package, you salvage that by doing the equivalent of this. Just this. And then everything goes under config.

Sacha: And that's what I end up doing too. Just making it easier for me to change things and re-evaluate them with C-x C-e is definitely one of the major considerations. Okay, I've temporarily misplaced my... Some people are very lucky. They actually have an Emacs channel at work that they can ask for help or they can come across recommendations for. That's nice for learning, @Rossbaker9079 says. It's not a full replacement for these other ideas, but it brings together people solving the same problems with Emacs. Some people are lucky enough to work in a large company where other people are using Emacs. You should definitely take advantage of that. I hear there's actually a Discord server as well, and of course there's IRC, where people can also hang out and hear other people talk about Emacs, ask questions, learn from other people's questions. I don't think you hang out in IRC or any of these places.

Prot: No, no. I haven't done it in a very long time. I have an account there on IRC. I think the last time I did, it was in the last EmacsConf I could attend, which is like maybe two or three years ago. I forgot already.

Sacha: It's yet another thing that kind of distracts your attention. I also find Mastodon to be very helpful for this stream of little updates from people sharing their Emacs questions or their things that they've just figured out. That's another useful resource for people. I've started trying to get people... to support them in hooking up with this community, connecting with this community. The Emacs Newbie page has a link to learning Emacs, and one of those things says links to category community. Because if you're learning these things in isolation, you will get really, really stuck. And you will not progress. I think being able to connect with the Emacs community is great for inspiration and figuring things out.

Prot: Yes, yes, I agree, I agree.

45:28 Culture of documentation and sharing

Prot: Plus, it's another reason to hang out, basically, like the social aspect of it. Like, well, of course, I use it as a tool, but there is a cultural component to it.

Sacha: So tell me, what is your impression of the Emacs culture so far?

Prot: Oh, it's, of course, we are talking about people who stick around, right? Not people who will use Emacs once and then leave. I think fundamentally it's people who care about sharing. I think the essence of it, it's really sharing. And then, of course, that is expressed sharing code, sharing ideas, and then, of course, documenting things. So the documentation culture of Emacs, I think it's really strong. Like in other free software communities, they are like, okay, we are sharing code, but then code is its own documentation kind of thing. Good code speaks for itself kind of thing. Whereas in Emacs land, we are like, okay, good code speaks for itself, but here is this wall of text just in case.

Sacha: And, you know, this is probably something only two other people in the world will ever want to do, but here it is just in case. I love those. I'm like, yeah, that's exactly what I wanted to do, actually. Thank you.

Prot: Yeah, yeah, I agree.

Sacha: It's a wonderful community, and I'm very glad that you're part of it, and I'm very glad that lots of other people have joined in as well. Okay, let me go. Once again, I have misplaced my... Okay, here we go. @ShaeErisson asked, "Is there a way to ask Emacs which file it has read below the current configuration?" That's the user init file variable, Shae, so you can just describe that.

47:11 Link to a search

Sacha: @charliemcmackin4859 says, "thinking of the terminology problem, maybe offering search terms for further exploration rather than or in addition to links." Which I guess like instead of just looking to a specific resource which may or may not still exist. I was going through my beginner resources and it's like this page no longer resolves but like saying okay this is this is what it's called and you can go search for your own resources, or this is the link, but also here's some other terms that you might find useful.

Prot: Yeah, yeah. Just to add to what this person was asking, was suggesting is like, because we had something like this in Denote and eventually I implemented it. So there are two kinds of links. One is a direct pointer where it's like, go there. The other is basically the equivalent of a button that triggers a search. For example, let's imagine in terms of files and directories, like a direct link goes to a file. A query link, you click on it, it opens a directory listing of all files that match the query. And that is basically evergreen. It will always show you whatever is matching. And maybe we could have something like that for info buffers, where instead of a link to a node, you do that and it produces a listing of all nodes that match the query.

Sacha: Hmm, that's quite interesting. Or like when we, you know, if we're writing about something, we can say, you know, here's the apropos command to go find all the commands, things that are related to this concept. Even just getting people to learn about how to use apropos, I think, would be a great step in helping them. Even before that, just getting them to a completion setup where they can ideally use something like orderless to just find things. Yeah. I think it would definitely help with the discoverability thing.

Prot: Yes. I think like Vertico and Orderless are like... if you have to install two packages, it's those two.

Sacha: Yeah. It is great. Okay. Where are we now? I keep... We've talked about the sandwich that has to be made. We've talked about getting people into it, helping them discover concepts, helping them connect with the community. And then there's a thing about how do we support people as they do their lifelong learning.

49:48 Getting through the gap between beginner tutorials and the next step

Sacha: A lot of people, maybe they'll get through the tutorial fine, but then when they start to try to do something more sophisticated, like, oh yeah, I need to do something similar to my IDE. I want to have all these different bits and bobs working the way that they do in my other editor. That's where things break down because the tutorial gets them through the, you know, here are the basics, but then there's this huge gulf before that, okay, this is how I can be more productive with it. How do we fix that?

Prot: Yes, that's very difficult because part of that requires Emacs Lisp knowledge. Like, for example, an IDE, of course, I haven't used one myself, but from what I understand, there is a sidebar with the tree view of your files. At the bottom, there is a shell. Maybe there is some debugger there, some other sidebar on the side. So to replicate that, you really need to massage the display-buffer-alist which I think requires a lot of knowledge, like you need to understand the display buffer, you need to know about window... what's it called? Even I forget. Attributes and all that.

Sacha: I don't even do it myself. If I feel like I need to do anything related to display-buffer-alist, I'm just like, okay, I'm going to look for an example and I'm going to copy it very carefully.

51:08 Predictability

image from video 00:51:10.900Prot: Okay, so this is for you. It's like too much work, but I must say. This looks like arcane knowledge but this sort of thing actually is a quality of life improvement to your Emacs because one thing that I think is bad about the default Emacs experience is uncertainty about where things will show up. Like, you never know. Like, you cannot predict it. Because Emacs tries to be sensible about it or whatever, but you cannot predict it. Whereas things that are ancillary should have kind of a more predictable behavior.

51:51 Brief mention of Popper

Prot: And by the way, there is a package by Karthik Chikmagalur called Popper. I didn't mention it, but yeah, it's basically another way to do the display-buffer-alist.

Sacha: Mm-hmm. So there's an interesting thing here where you have the beginners. Okay, they're just getting through the tutorial. If they can get to the point where they can edit the file, click on, even just use the menu bar to say file save, file open and all that stuff, that's great. Then the step beyond that is, okay, how do they start to use packages? And quite...

52:25 Earlier is better than later for Emacs Lisp. Take it as is.

Sacha: It feels like in order for them to be able to use packages like Popper or all these, they gotta be unafraid to use Emacs Lisp. Because all the packages, you know, tell them, okay, just put this use package in your config, but you gotta be comfortable.

Prot: And that's why I think you have to basically circumvent Customize. Like the earlier you are exposed to Emacs Lisp, I think the better it is for you long term. Because there is no way around it. You will have to deal with it. and even if you don't quite know how things work, like even, for example, this thing here, where it's like, there is a line between them, even if you don't understand code, you can start to think in terms of blocks even if you don't understand this code... Maybe with a few comments here and there, that can become a bit more obvious as well. But of course, like you go to a package and the first thing it will tell you is, okay, add this to your config and it's a use-package declaration, for example. And you will be like, what is a config? The better solution is for you to know that quickly, learn it quickly.

Sacha: There's this whole intimidation factor, especially for people who are coming from non-programming backgrounds, and suddenly they're like, there are a lot of parentheses in this. Do I have to be a programmer in order to use this? You just go right into it, but I'm sure you've talked to people who maybe weren't sure about it. How do you get them over that hump?

Prot: Basically the idea is treat it as something that is inscrutable right now. Just take it as is. Take it at face value basically. You don't need to understand it. You don't need to be able to debug it. Take it as is and just make sure moving your cursor that this kind of balance is preserved by checking that there is a parenthesis at the beginning and there is a parenthesis at the end. So, show parent mode helps in that regard, which is enabled by default. Of course, you cannot really get around it. Like, you cannot have a training wheels mode for Elisp, unfortunately. You can do something like rainbow-delimiters, you know, the package. You can help, but I'm not sure that helps by a lot.

Sacha: Yeah, yeah. And it's like, OK, so you just got to do it. Don't be too scared. But it's OK to just copy and paste and trust that as you do this, you will learn enough that when you go back, you'll be able to understand more and more of it.

55:17 Before and after comparisons

Prot: Yes. What helps, for example, in this block here, of course, I don't have to describe the code. But if you do this iterative approach that we mentioned earlier of step by step, like you can try your Emacs before this and after this. And based of course on some comment or whatever, you can see what the difference is. So even if you don't understand the code, you understand the effects of the code.

Sacha: Yeah, yeah. Before and after comparisons. I'm guilty of not taking advantage of this enough myself. I'm just like, oh yeah, I'm just going to evaluate it in my current Emacs and sometimes the results are obvious and sometimes the results kind of break my Emacs and I'm like, okay, I got to restart Emacs instead. I should have just started a new Emacs and tried it there.

56:04 user-init-directory

Sacha: But with the new user... Well, I say new, but actually --user-init-directory has been around since Emacs 29. So it's pretty much widely available now. People can actually try, for example, a starter kit without committing to it. Do you see newbies actually use this? Because I tell people, okay, you can do this, but it requires using the command line and using command line arguments. Is that a thing they can do?

Prot: I have introduced it to some people and they have used it, yes. But I don't know if people use it as part of their workflow or maybe they have just a cheat sheet specifically for this where it's like, oh, I want to try this and I want to try that. But eventually they don't use it day by day, I think. They just settle.

Sacha: if you want to try something big, then you know you can say, try that starter kit, but don't necessarily go to the work of making it my .emacs.d and so forth. Yes, that's a good one. They just say put this in your init file so it's a lot easier to back it out and change your mind. I had a thought, but it has disappeared, so I will just read something else from the chat.

Prot: That's fine.

57:20 Emacs core

Sacha: @romsno says, "Do you fear that Emacs C core will go unmaintained? Deep knowledge is rare, held by few, like Eli. While finding Elisp maintainers is easier, like with elfeed, the core is hard to replace." So I guess if you're thinking about the long-term: newbie, to package user, to package developer, to who knows, Emacs core contributor, And then off to the C, like somebody who knows the C core, that's a very long and somewhat leaky pathway.

Prot: It is for sure, for sure. But of course, here we are talking about people who have expertise in those specific domains. And yeah, that's something that it's an experienced Emacs user already. Like we are talking about somebody who not only is actually an experienced Emacs user, but also knows the relevant technical knowledge. Right. I am an experienced user, for example, but I don't know C, so I'm useless in this regard.

Sacha: I guess if we zoom out a little bit, we can think about how do we help people connect with the long-term motivation that drives, that you mentioned earlier, to keep using Emacs, to learn more about it, to enjoy using it and fiddling with it and get deeper into it. For some people, Emacs clicks right away because they already tinker with other things and it becomes another thing to tinker with. For some people, it's like, I don't know, I've heard I should use this or I've heard people say good things about Org Mode or about Magit. I just want to see what it's like.

59:02 Getting past the initial awkward phase

Sacha: So going back to that, how do we get people hooked?

Prot: Yeah, yeah, yeah. It's that initial awkward phase. Like if they can get past that, and by awkward phase, here I mean to actually understand Emacs and the key bindings and how to move between windows and there is a mini buffer, that sort of thing. Once they get past that, I think that people stick around. Like if they have, for example, a use for it such as, okay, I use it for org, they do stick around.

59:34 Even reporting an issue is a great contribution

Prot: There are a lot of people who contribute, like even non-programmers. And this is something I encourage in my packages, for example, where it's like, write me an issue. You don't need to know any code. You don't have to tell me about how to do it. Just tell me what your idea is. And in all my manuals that I write, I have an acknowledgement section where I have, you know, ideas or suggestions or whatever. And I write the name of everybody who has ever created an issue because it's like you help even by telling me what your use case is. And that already helps. And it gets the people involved as well.

Sacha: They spend time trying it out and describing what the difference was between what happened and what they wanted to happen. And sometimes even just identifying the issue is a big part of it already because you can't test everything. So we can definitely help people feel more included in the community because they don't have to be core developers or package authors to be part of the community. Even using it and writing about it is a big help.

1:00:44 Next steps: adding to the wiki

Sacha: In the four minutes before I have to make a grilled cheese sandwich, shall we wrap up with some concrete things that you or me or somebody listening can do to help improve the newcomer experience for Emacs?

Prot: You were doing it already. You were doing the wiki. I think that's good. A link, a direct link to the newbie section I think is great. Maybe you can even have a permanent link in your Emacs News, like the topmost line. It would be like, well, new...

Sacha: Don't get overwhelmed by all these people talking about SDL graphics loops and Emacs and whatever. Very far down the path of the learning journey. So making one of these starting points where people can then kind of find the trail that then leads them to different places. I'm looking forward to reviewing the Emacs news things for beginner resources that I've already previously identified and then fitting them into the Emacs Wiki in various places where people might come across them. And then of course, it would be nice if we could test these with actual people. So in your coaching sessions, we can find out where the other gaps are. There's a lovely conversation in the chat about other things that I don't have the fast speaking rate to cram into the next three minutes. Thank you so much for this conversation. It was great. I always like picking your brain about things. It's a big project but Emacs is fun to play with and I hope lots of other people come to have fun with it too.

1:02:37 Core longevity

Prot: Yes, and maybe I can make a final comment about the C core and the fact that there are a few people such as Eli Zaretskii who have expertise in that. I am an optimist. I think things will be ironed out. I think they will work out on their own. There are people who have the expertise. Maybe it's a cultural issue or We could say like a bureaucracy issue, like they don't want to deal with mailing lists or whatever. Maybe they don't like the current style. I don't know. But I'm sure that when push comes to shove, somebody will step up.

Sacha: I think it's actually very encouraging that because Emacs has such a long history, we've actually seen this kind of generational transfer of knowledge already in the sense that the people who are maintaining Emacs now, aside of course from Dr. Stallman himself, they're not the originals who started this project. They came into it afterwards, decided they liked it, dug deep enough into it to learn all these different things and have continued from there. And we've also seen lots of, you know, lots of trends come and go. People leave Emacs for Atom. People come back when Atom gets discontinued. People leave Emacs for VS Code. Who knows what will happen then? But when they come back, they come back bringing even more ideas. Thank you for watching! Okay, so in about one minute, the kid is going to start barreling down the hallway and asking for a grilled cheese sandwich. I'm going to wrap it up nicely here so I can remember to copy the chat this time.

Prot: Very well, very well.

Sacha: Yeah, yeah. The notes are going to be in, like, you know, if you go to yayemacs.com, they're probably going to be in, like, yayemacs24. And you're going to send me this markdown file or whatever that you showed me, so I can post that as well. Thank you so much, everyone. Thank you, Prot, and thank you to the people who joined in the chat. We'll see where it goes. Okay, bye.

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

Chat

  • protesilaos: ​​I am in the Google Meet room
  • protesilaos: ​​And hello, by the way!
  • hajovonta6300: ​​Hi legends!
  • JacksonScholberg: ​Hi
  • petertillemans2231: ​I am not worthy!
  • takoverflow: ​​Hello Sacha and Prot, thanks for these streams!
  • ShaeErisson: ​I love emacs, but haven't really learned elisp.
  • hajovonta6300: ​​@petertillemans2231 you are worthy if you are willing to learn!
  • JacksonScholberg: ​I vibe with Emacs after using other text editors that were not minimalist enough for my preferences, plus having experience with other open source software like Linux.
  • petertillemans2231: ​Well, Emacs and Minimalist in the same sentence… strange concept, but I know what you mean
  • petertillemans2231: ​I guess learn starters quickly to use emacs –debug-init. Maybe not in the first hour but close to tweaking.
  • JacksonScholberg: ​ChatGPT reminding me keyboard shortcuts helps a lot
  • ShaeErisson: ​I learn about new emacs packages by pairing with other users and asking "How did you do that thing?"
  • hajovonta6300: ​​I use Emacs since 2010 and had become a power user; but in the last year I feel LLMs took over most of the tasks I usually solved with Emacs.
  • petertillemans2231: ​Emacs documentation is very extensive but I feel discoverability of the docs is a problem for newer users.
  • 10cadr: ​​wow! ill watch the vod later,, nice buzzcut prot. i am between sessions rn also ill leave a comment on prot latest video later cheers
  • rossbaker9079: ​​We have an Emacs channel at work that's nice for learning. It's not a full replacement for these other ideas, but brings together people solving the same problems with Emacs.
  • ShaeErisson: ​Is there a way to ask emacs which file(s) it has read to load the current configuration?
  • charliemcmackin4859: ​​thinking of the terminology problem: maybe offering search terms for further exploration, rather than (or in addition to) links
  • JacksonScholberg: ​An Emacs channel at work sounds like a nice way to learn from others.
  • siredwardthehalf: ​​whats emacs
  • hajovonta6300: ​​it is an application platform with a great editor app
  • romsno: ​​hello guys do you fear the Emacs C core will go unmaintained? Deep knowledge is rare, held by few like Eli. While finding Elisp maintainers is easier (like with elfeed), the core is harder to replace
  • hajovonta6300: ​​@romsno true that
  • petertillemans2231: ​orderless is awesome
  • takoverflow: ​​Vertico can be replaced by icomplete-vertical-mode but there's no built-in corfu replacement
  • petertillemans2231: ​In the beginning, especially with use-package it is much more like yaml than a real programming language. That can ease people in.
  • satrac75: ​​i'm curious if other users split their init file into seperate files. my init file over the years continuea to grow and grow.
  • hajovonta6300: ​​@satrac75 I sometimes delete obsolete code I don't use anymore. I found my config became relatively stable after 2-3 years of initial trial-and-error. I heard other people experienced the same
  • petertillemans2231: ​I do … I go back and forth… single file … modularize … refactor/simplify in single file again… Like a dynamic tension field.
  • hajovonta6300: ​​My current config is 3099 lines long (org-babel format)
  • hajovonta6300: ​​the tangled output is 2345 lines.
  • charliemcmackin4859: ​​@satrac75 I did, yes. But this is mainly because I cherry-picked the configs from purcell's emacs config as I found I needed it. Then I converted it (mine) to use-package later
View Org source for this post

What's in the Emacs newcomers-presets theme?

| emacs

The development version of Emacs as of Feb 2026 includes a newcomers-presets theme that can be enabled from the splash screen or by using M-x load-theme RET newcomers-presets RET. (Not sure how to run that command? Start with the guided tour/tutorial or choose "Help - Tutorial" from the Emacs menu.)

2026-04-29_14-19-11.png
Figure 1: Newcomer presets are on the splash screen

If you like it and want to make it automatically enabled in future Emacs sessions:

  1. Use M-x customize-themes
  2. Select the checkbox next to newcomer-presets by either clicking on it or using TAB to navigate to it and then pressing RET.
  3. Click on or use RET to select Save Theme Settings.
2026-04-30_09-47-33.png
Figure 2: Saving the theme setting

I'm not sure if someone else has made notes on what it does yet, so I thought I'd put this together.

Most Emacs newbies aren't running the development version of Emacs at the moment, but it will eventually make its way into Emacs 31. I wonder if it might be a good idea to extract the theme as a package that people can use use-package on if they want. I am not entirely sure about using themes for this, but it's worth an experiment.

Here's a list of what newcomers-presets includes. I'll also include the corresponding Emacs Lisp in case you want to copy just that part, or you can also get it as copy-of-newcomers-presets.el. If you want to load it in your existing Emacs, you can add (load-file "path/to/copy-of-newcomers-presets.el") to your InitFile. You can use C-h f (describe-function) or C-h v (describe-variable) to learn more about the functions or variables it changes. I'm manually making this page, so there might have been some changes to etc/themes/newcomers-presets-theme.el since .

;; -*- lexical-binding: t -*-
;; Based on https://github.com/emacs-mirror/emacs/tree/master/etc/themes/newcomers-presets-theme.el

Editing and navigation

When you select text by pressing C-SPC (set-mark-command) and then moving to the end of the text you want to select, and then you type, the new text replaces the selection.

(setopt delete-selection-mode t)

New text replaces the selection

Copying works better when copying between Emacs and other applications Equivalent:

(setopt save-interprogram-paste-before-kill t)

If you have a compatible spellchecker installed (Hunspell, Aspell, Ispell, or Enchant), Emacs will check your spelling and underline errors using flyspell-mode. You can use M-x ispell-change-dictionary to change the language if you have the appropriate dictionary installed. In code buffers, the spelling is checked in comments and strings. You can also use flyspell-goto-next-error (C-,) to go to the next misspelled word and flyspell-auto-correct-word (C-M-i) to fix it. More info: Spelling (info "(emacs) Spelling").

2026-04-30_09-36-20.png
Figure 3: A wavy red underline shows potentially misspelled words; right-click on them to correct them or add them to the dictionary
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'prog-mode-hook 'flyspell-prog-mode)

Imenu entries are automatically updated based on the structure of the current buffer or file (ex: outline headings, function names). You can list them with M-x imenu or add them to the menu bar with M-x imenu-add-to-menubar.

(setopt imenu-auto-rescan t)

When you visit a read-only file, it will be in view mode, so you can use SPC to scroll. This affects buffers for files that you don't have permission to change as well as buffers that you make read-only using C-x C-q (read-only-mode).

(setopt view-read-only t)

Keyboard shortcuts

Some commands allow you to use just the last part of the keyboard shortcut in order to repeat them. Related: Repeat Mode: Stop Repeating Yourself | Emacs Redux

(setopt repeat-mode t)

Appearance

Scrolling happens more smoothly instead of jumping by character.

(setq pixel-scroll-mode t)

Line numbers are shown in both text and code buffers.

(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(add-hook 'text-mode-hook 'display-line-numbers-mode)

Column numbers are shown in the mode line.

(setopt column-number-mode t)

If you change your system-wide fixed-width font, Emacs will also update. the system-defined font dynamically.

(setopt font-use-system-font t)

You can resize your frames or windows to any size instead of being limited to whole-character steps.

(setopt frame-resize-pixelwise t)
(setopt window-resize-pixelwise t)

The frame size will stay the same even if you change the font, menu bar, tool bar, tab bar, internal borders, fringes, or scroll bars.

(setopt frame-inhibit-implied-resize t)

If a mode line is wider than the currently selected window, it is compressed by replacing repeating spaces with a single space.

(setopt mode-line-compact 'long)

Saving data between sessions

Minibuffer history is saved between Emacs sessions so you can use M-x and then use M-p and M-n to navigate your history.

(setopt savehist-mode t)

Your place in a file is saved between Emacs sessions.

(setopt save-place-mode t)

Your recently-opened files are saved between Emacs sessions, so you can use M-x find-file and other commands and then use M-p and M-n to navigate your history.

Completion

This set of options affects the completion candidates (the suggestions that appear when you press M-x and then TAB, or when you use TAB at other prompts).

You can use the arrow keys to select completion candidates in the minibuffer, and you can use RET to select the highlighted one.

(setopt minibuffer-visible-completions t)

Additional details for completion suggestions are shown before or after the suggestions. For example, M-x describe-symbol (C-h o) shows additional information.

(setopt completions-detailed t)

Completion candidates can be grouped together if the function that sets up the completion specifies it.

(setopt completions-group t)

When you press TAB to see the completion candidates for a prompt (for example, M-x and then TAB), the first TAB will display the completion list, and the second TAB will select the buffer.

(setopt completion-auto-select 'second-tab)

This Completions buffer will update as you type so that you can narrow down the candidates.

(setopt completion-eager-update t)

The following completion styles are set up:

  • basic: You can type the start of a candidate. (ex: abc will list abcde and abcxyz)
  • partial-completion: You can specify multiple words and each word will be considered as the prefix for matching candidates. For example, if you type a-b, that will match apple-banana if it is one of the options.
  • emacs22: When you move your point to the middle of some text and then complete, the text before your point is used to filter the completion and the text after your point is added to the end of the result.

More info: Completion styles

(setopt completion-styles '(basic emacs22 flex))

Automatically show the completion preview based on the text at point. TAB accepts the completion suggestion and M-i completes the longest common prefix.

(setopt global-completion-preview-mode t)

TAB first tries to indent the current line. If the line was already indented, then Emacs tries to complete the thing at point. Some programming language modes have their own variable to control this, e.g., c-tab-always-indent, so it might need additional customization.

(setopt tab-always-indent 'complete)

Help

If you pause after typing the first part of a keyboard shortcut (ex: C-c), Emacs will display the keyboard shortcuts that you can continue with.

(setopt which-key-mode t)

Tab bar

The tab bar is always shown. Tabs let you save the way you have one or more windows arranged, and which buffers are displayed in those windows. You can click on a tab or use M-x tab-switch to switch to that configuration, or click on the + sign or use M-x tab-new to add another tab. More info: Tab Bars (info "(emacs) Tab Bars")"

(setopt tab-bar-show 0)
2026-04-30_09-15-18.png
Figure 4: The tab bar is displayed at the top of a buffer.

The tabs are saved between Emacs sessions.

(setopt tab-bar-history-mode t)

The Dired file manager

Dired buffers are refreshed whenever you revisit a directory.

(setopt dired-auto-revert-buffer t)

You can use the mouse to drag files in Dired. Ctrl+leftdrag copies the file, Shift+leftdrag moves it, Meta+leftdrag links it. You can also drag the to other applications on X11, Haiku, Mac OS, and GNUstep.

(setopt dired-mouse-drag-files t)

Show the current directory when prompting for a shell command. This affects shell-command and async-shell-command.

(setopt shell-command-prompt-show-cwd t)

Package management

If you open a file for which Emacs has optional packages that provide extra support in GNU ELPA or NonGNU ELPA, Emacs will add [Upgrade?] to the mode line to make it easier to install the appropriate package.

2026-04-30_09-06-18.png
Figure 6: Package autosuggest adds an Upgrade? to the modeline when you open a file for which Emacs has an optional package available
(setopt package-autosuggest-mode t)

When you're working with M-x list-packages, x (M-x package-menu-execute) now requires you to select something instead of acting the current package by default. Press i (package-menu-mark-install) to mark a package for installation, press d (package-menu-mark-delete) to mark a package for deletion, press u (package-menu-mark-unmark) to unmark a package, and press x (package-menu-execute) to execute the operations.

(setopt package-menu-use-current-if-no-marks nil)

Code

In code buffers, Emacs will display errors and warnings by using flymake-mode.

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

If you use M-x compile, the *compilation* window will scroll as new output appears, but it will stop at the first error so that you can investigate more easily.

(setopt compilation-scroll-output 'first-error)

You can Ctrl+leftclick on a function name to jump to its definition using xref-find-definitions-at-mouse.

(setopt global-xref-mouse-mode t)

Emacs will automatically insert matching parentheses, brackets, and braces.

(setopt electric-pair-mode t)

Emacs will generally use spaces instead of tabs when indenting code.

(setopt indent-tabs-mode nil)

If there is a project-specific .editorconfig file, Emacs will follow those settings. (More about EditorConfig)

(setopt editorconfig-mode t)

Tags tables are automatically regenerated whenever you save files. This uses Etags to make it easier to jump to the definitions of functions or variables.

Version control

(setopt etags-regen-mode t)

Files are reloaded from disk if they have been updated by your version control system.

(setopt vc-auto-revert-mode t)

If a directory has changed in version control but you have some modified files, Emacs will ask if you want to save those changed files.

(setopt vc-dir-save-some-buffers-on-revert t)

If you use vc-find-revision to go to a specific version of the file, it is displayed in a temporary buffer and does not replace the copy that you currently have.

(setopt vc-find-revision-no-save t)

If you open a symbolic link to a file under version control, Emacs will open the real file and display a message. That way, it will still be version-controlled.

(setopt vc-follow-symlinks t)

C-x v I and C-x v O now have additional keyboard shortcuts. For example, C-x v I L is vc-root-log-incoming and C-x v O L is vc-root-log-outgoing. Use C-x v I C-h and C-x v O C-h to see other commands.

(setopt vc-use-incoming-outgoing-prefixes t)

The version control system is automatically determined for all buffers. (Standard Emacs just checks it in dired, shell, eshell, or compilation-mode buffers.)

(setopt vc-deduce-backend-nonvc-modes t)

Things I haven't been able to figure out yet

On Linux with X11, Haiku, or macOS / GNUstep: When a buffer has an associated filename, you can drag the filename from the modeline and drop it into other programs. (Haven't been able to get this working.)

(setopt mouse-drag-mode-line-buffer t)
View Org source for this post

Working on the Emacs newbie experience

| emacs, community

The Emacs Carnival April 2026 theme of newbies/starter kits nudged me to think about how new users can learn what they need in order to get started. In particular, I wanted to think about these questions that newbies might have:

  • Is it worth it?
  • How do I start?
  • Should I use a starter kit? How?
  • I'm stuck, how can I get help?
  • This is overwhelming. How do I make it more manageable?

I worked on some pages in the EmacsWiki:

People often recommend Emacs News to people who want to learn more about what's going on in the Emacs community, so I added some notes to that one as well.

Just gotta find some newbies to test these ideas with… Email me! =)

View Org source for this post

2026-04-27 Emacs news

| emacs, emacs-news

There was a big discussion on lobste.rs about people's favourite Emacs packages and that sparked similar conversations on Reddit and HN. Discussions like that are a great source of inspiration. I added a couple of small improvements to my config based on this week's Emacs news, like diff-hl.

Also, lots of people expressed their appreciation for Chris Wellons, who is moving on to other editors for now. Me, I've enjoyed using simple-httpd, impatient, and skewer, and I'm glad Chris made and shared them. Many of his packages already have new maintainers, and the rest are up for adoption. Perhaps we'll see him around again someday!

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