Inserting Number Ranges As A List

The incomparable Sacha Chua has a very nice solution to a problem posed by David Pape: how can we enter a range of numbers as list of distinct numbers in Emacs? Pape’s specific problem was entering the numbers of error reports that a Git commit closes. Rather than entering something like

closes: 47, 48, 49, 50, 51, 70

he’d like to enter something like

closes: 47-51 70

and call an Emacs function to have it expanded into the first example.

Chua has a very nice solution that covers that case as well things like

47-51, 70

or even

5-15/2

to expand into the sequence

5, 7, 9, 11, 13, 15

Most of the heavy lifting is done by the number-sequence function. The rest of the work is parsing the input string into either a single number or a range of numbers that number-sequence can work on.

Chua’s solution strikes me as an example of Emacs at its best. The problem it solves is not earth shattering. It’s simply a bit of friction in a user’s everyday workflow but Emacs easily provides a solution that makes the friction disappear. Take a look at her code. It not only shows an ingenious solution to the problem but also demonstrates the power of Emacs and Elisp to make the application of that genius simple.

Posted in General | Tagged | Leave a comment

The Power Of Plain Text

Over at the Dead Parrot BBS, nickb has an excellent post extolling the power of plain text. It’s a notion that’s familiar to all us Emacs users and even more so to Org users. We Org users (or more generally Markdown and other markup users) can write plain text and have it formatted for output in a variety of ways. The point is, the text stays text and is readable even without the formatting.

As nickb says, text written today will still be readable 50 years from now. Sure, UTF-8 and the other Unicode formats can and do add new characters from time to time but text written today will have the same meaning even if new characters are added.

The most important aspect is that you’ll own your data no matter what programs come and go. Emacs isn’t going anywhere but even if it did, it wouldn’t matter. Text will still be readable and something like Org or Markdown will still make intended formatting obvious even if Org and Markdown no longer exist.

Nickb acknowledges that text is not the right answer for everything. You wouldn’t, for example, want to represent a photograph in plain text and there are lots of other examples. Still, for many applications, plain text is not only sufficient but probably the better solution.

Posted in General | Tagged , | Leave a comment

The Future Of Emacs

Chris Maiorana asks a provocative question: What’s the future of Emacs? He asks that question in the context of assuming that Emacs will continue to exist for any timeline that matters to us. But how, he asks, will we use it?

The answer that will occur to most of us is speech mediated input á la Star Trek TNG. We’ll simply tell Emacs what we want it to do and it will do it. But think about that for a moment. Would you really want to dictate the code for your latest program to the computer? Or would you even want to dictate your documentation, story, or letter to your computer?

Sure, you could say something like, “Computer write a program to do such and such.” but then you’re not using Emacs at all. The same for asking the computer to write something for you. That—more or less—is here today but most of us don’t like the results and, again, we’re not really using Emacs in those situations.

For my part, my written thoughts are always much better organized than my spoken ones so even with capable voice input, I’d much prefer to use the keyboard. Maiorana agrees. He points back to a couple of episodes from Tales From the Darkside1 in which people use the keyboard to do magic with the computer. For him, Meta+x is the spell that enables the magic and he’s very attached to it. Like me, he doesn’t anticipate abandoning the keyboard.

What do you think? Will we still use the keyboard or will we move on to something better?

Footnotes:

1

You can find Mookie and Pookie and Word Processor of the Gods in the Internet Archive.

Posted in General | Tagged | Leave a comment

Nested Emacs Frames

Just a quick offering today on an informative post from Ankit Gadiya about unwanted nested frames in Emacs. The TL;DR is that Gadiya runs Ghostel as his Emacs shell in TUI and demon mode. That works well but he has a script that calls emacsclient to load a file. There’s nothing special about it; it’s just what you’d expect it to be but when he runs it from with Ghostel, it creates a nested frame in the Ghostel frame rather than replacing the Ghostel frame.

The solution is pretty simple. Gadiya changed his script to check if he was in Ghostel, and if so, calls emacsclient with a parameter to reuse the current frame. You can check Gadiya’s post for the details.

For me, the most interesting aspect was how he checked if he was in Ghostel. It turns out that Emacs sets the environment variable INSIDE_EMACS when it’s running a shell or subprocess. I didn’t know that so I learned something new from Gadiya’s post.

Update [2026-10-05 Mon 11:15]: Added link to Gadiya’s post.

Posted in General | Tagged | Leave a comment

Persisting Text Scale

As we all discover eventually, age is going to be accompanied by declining eyesight. If you make your living writing and coding, this is going to result in some discomfort as it becomes harder and harder to read the text in books, newspapers, or your screen. You can’t do much about printed matter except to get stronger reading glasses but if you’re an Emacs user—or, really, any other editor—it’s easy to increase the text size on your screen. I find myself doing this more often when writing, especially at night when my eyes are tired.

The problem is that the adjustment doesn’t persist across sessions and you have to make the adjustment for every buffer that needs a non-default font size. James Cherti has a solution: persist-text-scale.el.

The TL;DR is that once you set a new font scale for a buffer, it persists across sessions and furthermore you can arrange for all buffers of a certain class to have the same scale settings. That’s perfect. You can, for example, arrange to have all the buffers you use for writing or reading text be in a larger text while keeping other buffers in the default or even smaller text.

Take a look at the GitHub repository linked above for the details. You might also want to check out the comments in Cherti’s Emacs subreddit announcement where he answers some questions on what he’s trying to accomplish with the package. If you’d like to have certain buffers rendered in a larger (or smaller) font, this package may be just what you need.

Posted in General | Tagged | Leave a comment

🥩 Red Meat Friday: True Believers

There are a couple of threads on the Emacs Devel mailing list that, zombie like, refuse to die. They’re essentially the same. One, entitled "ethically" running proprietary code? is an endless discussion of what Emacs should do if a package can indirectly lead to running non-free code. The other, [NonGNU] new: hermes is the same discussion but is particularized to whether Hermes, which is free software but might indirectly lead to a non-free LLM implementation should be added to the NonGNU repository.

The sane people on the list argue that Emacs can’t possibly control what users do with a particular piece of Emacs software and point to EWW as an example. It’s a core part of Emacs and as free as can be yet users can use it to download non-free software and do other things that the FSF wouldn’t approve of.

The true believers, on the other hand, say, “But but but. Someone, somewhere might use non-free software.” Of course they will. Unless you’re RMS who has taken extraordinary steps to restrict his computer use to a tiny part of what’s available, we all use non-free software of some sort. Even if you’re using Linux and are careful about the software you install, what about the BIOS on your computer?

Most of us support FSF and its ideals. We believe in free software and see it as a net positive for our industry. That’s different from taking an absolutist position—as if we were members of some crazy cult—and insisting that nothing we do should ever lead, even indirectly, to the use of non-free software.

Over at the Emacs subreddit, DevelopmentCool2449 takes note of the conversation and briefly discusses how it has opened a schism between RMS and Emacs developers. The action, as usual, is in the comments. Most commenters seem to side with the developers but some are taking no prisoners and hope that Eli Zaretskii quits. This despite the years of unpaid, exemplary service that Zaretskii has given to the Emacs community.

It’s obvious which side of the debate I’m on but good faith arguments can be made on both sides. Still, I wish everyone could agree to disagree and move on.

Posted in General | Tagged , | Leave a comment

Revolt Of The Readers

Last month I wrote about the new acronym AI;DR (AI didn’t read). The idea was that people were tired of having their email queries answered with AI slop that even the responder probably didn’t read. As I said in that piece, sending someone unedited, possibly unread, AI slop is profoundly disrespectful and will cause you to lose the goodwill of your victim.

Of course, that’s just my opinion but Bryan Cantrill, the CTO of Oxide Computer Company, has a well thought out post concerning the reader revolt from LLM generated writing. He notes two important points:

  1. Readers can tell AI writing from the real thing.
  2. Readers do care.

Then he points to a blog poll by Cynthia Dunlop that showed that 78% of developers stopped reading as soon as they detected AI generated content and that an astounding 71% wouldn’t read anything else from the same writer. Talk about sacrificing the reader’s goodwill. I urge you to read that post and the previous poll that discusses why people use LLMs to write. They’re both worth reading.

His next point is to recall how email was saved from the spammers by improved filtering. Once spam filters got really good at identifying spam and removing it, sending spam became an uneconomical endeavor. Cantrill thought that since it was so easy to identify AI generated writing, it should be possible to automate the process as it was for spam filtering. That turned out to be harder than he thought but he has found a solution. You can check his post for the details but the end of his story is that now all public Oxide Computer Company writing must pass through this filter and come out clean.

Perhaps the self imposed exile of those using AI to write their content and the continued improvement of filters to automatically identify it will slow down its use just as happened with spam.

Posted in General | Tagged | Leave a comment

Remember Remember Mode?

Over at the Emacs subreddit, BBSnek writes about discovering remember mode. It’s been around for a long time. I remember using it before Org mode. Indeed, I still use Ctrl+c r to invoke org-capture because that was what I was used to with remember-mode.

Although I’m sure there are some, I can’t think of any reason to use remember-mode these days. Org mode can do everything it can and more. Org’s templates make capturing data and notes so much easier and, of course, you can bring all the other Org tools to bear on the results.

BBSnek uses it for quick notes—and it’s great for that—but Org can do that too and so much more. The truth is, I’m surprised that anyone is still using it for any other reason than inertia. Still, as usual, Emacs lets us have it our way and for those who prefer the simpler and lighter weight remember-mode, it’s there for them.

Posted in General | Tagged , | Leave a comment

Aquí Location Finder

Charles Choi has been writing a bunch of nice little apps lately—more than I can cover. His latest, Aquí, is sort of a niche application but is potentially useful for more than just its intended use.

The back story is that Choi really likes the sunrise-sunset command in Emacs that tells him the times that the sun rises and sets. The problem is that sunrise-sunset requires that you first specify the latitude and longitude of where you want to know the times. The standard way of doing that is to record them in your init.el, which is what I do. Choi, however, travels with his laptop but still wants to know when the sun is coming up or going down. There’s no automatic way of setting the information so he wrote Aquí to provide it. The only downside is that it works exclusively on the Mac platform.

Once installed, all you need do is call aqui to set all the appropriate information. I hardly ever travel these days so I wasn’t going to bother but it’s easy to use and can give you your current latitude and longitude as well as your address so I thought, “Why not?”. After I installed and ran it, it gave me my exact address as well as my latitude and longitude. That might sometimes vary a bit depending on the vagaries of GPS but it’s certain to be close.

If you decide to try it out, be sure to take a look at the user manual so see what commands are available. Mostly, though, you’ll just need to run aqui. Also be sure to check out the installation section because you need to install a shortcut. That’s just a matter of clicking on a link in the manual but Aquí won’t work until you do.

Posted in General | Tagged | Leave a comment

A Nice Example Of An Embark Action

As I wrote back in July, although I’ve had Embark installed for some time, I’ve only just begun to really use it. Most of my uses involve following a link (of any type) and acting on a group of files, typically to delete several files at once. Of course, those uses are barely scratching the surface of Embark’s capabilities.

Those capabilities are essentially open ended. By that I mean you can define your own Embark actions. Stefano Rodighiero has a nice example of this. It’s a nice example for two reasons. First, it’s simple and easy to follow even though—the second reason—I don’t know anything about what he’s trying to do. The point is that Rodighiero has an obscure—to me—application that he wants to provide an action for but you don’t need to know the details of the application to follow the action.

This is incredibly powerful. Rodighiero let Embark do the hard work of identifying and parsing the target and merely wrote some simple glue to take that target reference and do something useful with it.

If, like me, you’re just beginning to feel your way around Embark, Rodighiero’s post is a useful read. You almost certainly won’t have a need to copy his action but it’s an excellent go by for your own.

Posted in General | Tagged | Leave a comment