The Emacs OS: The Unix Way Vs. The Emacs Way
Chris Maiorana has decided to take the old joke about Emacs being an operating seriously. Or at least at face value. He has planned a series of posts where he compares the Unix way of doing things to the Emacs way.
The first post in the series compares directory listings. That’s a fundamental function for any operating system, of course, so it makes sense—if you’re comping operating systems—to see how they handle that task.
Maiorana’s answer is to look at the various outputs from the Unix ls command and compare them to the results from Dired. There’s not much to compare, of course, because the Dired listings are generated from the u…
The Emacs OS: The Unix Way Vs. The Emacs Way
Chris Maiorana has decided to take the old joke about Emacs being an operating seriously. Or at least at face value. He has planned a series of posts where he compares the Unix way of doing things to the Emacs way.
The first post in the series compares directory listings. That’s a fundamental function for any operating system, of course, so it makes sense—if you’re comping operating systems—to see how they handle that task.
Maiorana’s answer is to look at the various outputs from the Unix ls command and compare them to the results from Dired. There’s not much to compare, of course, because the Dired listings are generated from the underlying ls command. The difference is how you handle options. In Unix this is done through command line options. In Emacs, you change the Dired listing after it’s first displayed with buffer specific commands as usual in Emacs.
The real difference is in the power that Dired provides. You can’t do anything that you couldn’t do in Unix but with Dired it’s all one command. You think of the listing as just another Emacs buffer that you operate on in the usual ways or perhaps bring bespoke commands to bear.
I don’t really believe in the Emacs as OS paradigm—although I sometimes pretend I do. A more accurate description is that those of us who live in Emacs tend to treat it as if it were a shell. With Emacs, there is seldom any need to drop into an actual shell to get things done and even if you do, Emacs can provide you with several including it own eshell.
I’ll be interested to see Maiorana’s subsequent posts on the subject. I’m interested in exploring the extent to which Emacs can be claimed to be an operating system.
Posted in General | Tagged Emacs |
A New Package.el Feature
One of the problems with the ELPA package manager is that you never know what you’re getting when you upgrade. The package manager tells you what packages can be upgraded and you can choose to upgrade or not but you don’t know what’s changed.
Happily, a new feature has just been committed. Now you can examine a diff between the old and new versions to get an idea of what has changed. It’s not ideal if you can’t read Elisp but at least those who do read it can get an idea of how the new version differs from the previous.
It’s not a big thing, I suppose, but it does show how Emacs is continuing to improve and make its users’ lives better. This new capability probably won’t be available until the next release but it’s something to look forward to.
Posted in General | Tagged Emacs |
Running Emacs As A Service
Matthias over at Ahoi Blog makes an observation that I’ve also made many times: Discussion about Emacs startup times ends as soon as you run Emacs as a daemon. The startup is instantaneous and if you prefer a Vim-like way of operating where you start and stop Emacs each time you need it you can have it. Of course, Emacs doesn’t really stop. It’s still running as a daemon and will pop up a new frame for you whenever you need one.
With this model, the Emacs startup time is absorbed into the system boot time, which presumably happens rarely. The question is, how to get the daemon started. If you want to have it happen at boot time, the exact method depends on your operating system.
Matthias shows how to do this in Linux. It’s a little finicky because of systemd but really just amounts to making an entry in a configuration file. You can see the details in his post. The other issue is how to start, stop, and interact with the Emacs daemon when it’s running. Matthias has a simple script that automates all that so that you don’t worry about the intricacies of systemctl and journalctl.
The other possibility is to simply never exit Emacs. That’s what I do. I run it in its own workspace so I don’t have to worry about hiding it when it’s not in use. I also start server mode so that I can instantly pop up a frame (either GUI or terminal) if I want to for some reason. I really do think this is the best solution but others obviously disagree. If you like to bring up your editor when you need it, quit when you don’t, and your editor is Emacs, you should take a look at Matthias’ post. It will tell you how to run Emacs the way you want to and you’ll never have to think about startup time again.
Posted in General | Tagged Emacs |
Another Mu4e Workflow
It’s been a long time since I’ve written about my Mu4e configuration. Back in 2015, I read Ben Maughan’s post on his system for achieving Inbox Zero with Mu4e. I was immediately taken with the idea and although it took me some time, I eventually implemented his ideas at Irreal. For the last ten years I’ve been using Maughan’s system which requires that every email be dealt with immediately by either acting on/answering it, deleting it, or generating a TODO to deal with it later. In any event if the email isn’t deleted, it’s saved in a single directory relying on Mu4e’s excellent search ability to retrieve it if necessary
My system differs slightly from Maughan’s in that I have a temporary directory to save emails that I want to save for a short while but then delete. The main example is notices from Amazon that they’ve shipped some order. When it arrives, I delete the entry but in the meantime I have the details saved if I need them.
James Endres Howell has a very nice post that describes his Mu4e workflow. He uses his email provider to sort incoming email into work, personal, and a few other low priority mailboxes. His system views emails in two states: waiting to be acted on or irrevocably consigned to a permanent resting place that he dubs “the archive”.
He has Mu4e set up so that messages that he’s sent or that are in the archive are shown newest first because they are the most recent and apt to be what he’s looking for and those in the other mailboxes oldest first on the grounds that have been hanging around the longest and need to be dealt with before the more recent ones.
Howell has code implementing all this that you can examine if your interested. Although I like his post and code, the minions have been tugging on my sleeve insisting that I mention that his horrible Emacs theme makes the code virtually unreadable. Protip: Don’t put darkblue text on a black background. Your over forty self will thank you.
Posted in General | Tagged Emacs, Mu4e |
Casual HTML/CSS
I hardly ever write directly in HTML anymore. For a long time my only use was adding links and emphasis markup in WordPress comments but Disqus no longer accepts HTML so even that use has atrophied. Nevertheless, the need sometimes arises to insert a bit of raw HTML and that’s where Charles Choi’s latest Casual app, Casual HTML & CSS comes in.
The less you use HTML, the less likely you are to remember the details of its XML-like syntax, so a menu driven aid like Casual can be a real help. Choi’s Casual HTML & CSS leverages the builtin Emacs HTML and CSS modes so what you get is menu driven versions of HTML mode and CSS mode.
Because of the type of my work, I don’t think I’ve even written a single character of CSS mode although I can read and understand it but I’m sure there are lots of occasional CSS users who could benefit from Choi’s app.
If you’re a user of the Casual App Suite, you’ll get Casual HTML & CSS automatically on your next package update and you’ll only need to enable it. There are a lot of useful apps in the suite so if you don’t already have it installed, you might want to consider doing so.
Posted in General | Tagged Emacs |
Bending Emacs 9: Time-zones
I’ve written before about Álvaro Ramírez’s time-zones app. It’s sort of like the builtin Emacs app world-clock but easier to configure and you can move the times forward and backward, which is useful for setting up remote meetings in several locations.
Now, in the latest video in his Bending Emacs series, Ramírez talks about the time-zones app and gives a demonstration of it. It’s a really nice app and although I no longer have to set up remote meetings, I do find it useful to know what time it is in various places in the world. Even relatively obscure places like Shawnee, KS pop right up without a problem.
You can turn on extra details to see things like the number of hours different from your home location, which is, of course, easily settable.
I downloaded the app before I started to write this post and it couldn’t be easier. There’s no configuration necessary and it works just like in the video. As I said in my original post about time-zones, these days a world clock is no longer an oddity but a necessity.
The video is only 6 minutes, 31 seconds so it’s easy to fit in. Take a look and I’m sure that you, like me, will download a copy.
Posted in General | Tagged Emacs |
Twenty One Lessons From Google
Addy Osmani has been working at Google for about 14 years. During that time, he’s learned a few—basically non-technical—lessons about life as a software engineer. His post, 21 Lessons From 14 Years at Google, lists some of the things he learned along with a bit of commentary about each one.
There’s probably not anything in the list that will surprise you but it’s instructive to see them written down. My favorite is the (slightly) ironic “Abstractions don’t remove complexity. They move it to the day you’re on call.” If the meaning of that isn’t clear to you, take a look his accompanying commentary.
It’s a nice list and worth taking a look at. It’s a fairly short read so it won’t take you long.
Posted in General | Tagged Tech |
A Paean To Dumb Jump
I’m a long term user of Dumb Jump. According to this Irreal post, I’ve been a devoted fan since 2017. As I’ve said many times in my several posts about Dumb Jump—search for “dumb jump” on Irreal if you’re interested—I’ve never been able to warm up to TAGS systems because they require so much maintenance and LSP systems have always seemed like too much work for what I want them for.
It turns out that I’m not the only fan. Ruslan Bekenev has a lovely paean to Dumb Jump. He, like me, says it has completely eliminated his need for TAGS or LSP. For all the things that I use it for it’s instantaneous. That can be difficult to believe when you learn how it works but it’s true. You can get the details from Bekenev’s post or the Dumb Jump site but the TL;DR is that it uses grep to search for the desired target. I use ripgrep with it so it’s fast with even big repositories. Bekenev has an animated GIF showing how it works for him.
If you haven’t tried Dumb Jump, I join with Bekenev in urging you to try it out. It’s small, doesn’t require a complicated installation and is easy to configure. If you don’t like it, you can simply delete the package and remove it from your init.el.
Posted in General | Tagged Emacs |
How We Know C++ Is Too Complicated
Although I am a huge fan of C and have written thousands—maybe millions—of lines of C code, I’ve never warmed up to C++. Every time I’ve had to write in it, I’ve ended up muttering things like, “this is a stupid language”.
You know who else isn’t a fan? Ken Thompson. His, Rob Pike’s, and Robert Griesemer’s dislike for C++ famously led them to develop the Go language.
As part of his oral history, Thompson recounts his impetus for starting the Go project. The TL;DR is that Google’s representative to the C++ standardization committee gave an hour talk at Google about the upcoming changes to C++. Thompson says,
In my opinion, the new stuff was bigger than the language. I didn’t understand most of it. It was an hour talk that was dense on just the improvements to C++.
Did you get that? This is Ken Thompson, who Wikipedia reports is considered one of the best programmers of all time, saying that C++ had become too complicated for him to understand.
You’d think that would be the end of the story but the ankle biters in the comment section explain at length all the things Thompson, et al, got wrong and why Go isn’t a good language. Mostly those reasons boil down to the lack of some feature that the commenter thinks is essential. That’s particularly ironic given that the three originators had a strict rule that all of them had to agree on each feature. The rule was specifically to prevent the inclusion of some pet feature of one of the developers.
I have to admit that I find the comments annoying. I know all about the fallacy of appeals to authority and agree that it is a fallacy. At the same time, I think people like Thompson, Knuth, Pike, Ritchie, and others who have proven their expertise deserve our respect and that if you decide to call them out, you should realize that your opinion doesn’t count as much as theirs and it’s up to you to rigorously prove your assertions. Needless to say, none of that was apparent in the comments.
Update [2026-01-05 Mon 10:35]: Wifipedia → Wikipedia.
Fixing My Feed From Sacha
I’ve been following Sacha Chua for a long time. I think I started while she was still at University but it was certainly shortly afterwards at the latest. She’s been at it for about 25 years so it’s hard for me to remember. During that time I’ve had her in my RSS/Atom feed and read her posts in various feed readers.
These days, of course, I’m using Elfeed but she still pops up regularly in my feed. The other day, I was reading her post on Emacs People for the latest Emacs Carnival and I noticed that she wrote in both French and English. That seemed new so I poked around a bit a discovered that it’s another of her ongoing projects, just like my learning Spanish1. The thing is, I had never seen any other posts in or about French from her. Then I realized that all the posts I’ve been seeing from her were actually coming from Planet Emacslife. What was going on? I checked and, sure enough, her blog was in my feed list. After fiddling around for a bit I tried following the link I had for her in my feed and got a 404 but I had no problem finding the feed directly from her site. I checked it against what her site had and it seemed the same. Then I noticed that on the 404 page there was a %20 at the end of the URL. Aha! There was a space at the end of the URL I was using. I wouldn’t think that would matter but when I removed it, things started working again.
So the moral of this long story is that if you’re having trouble getting the RSS/Atom entries from some site, check to be sure you don’t have a space at the end of the URL. It’s easy to see how it could happen even if you know what you’re doing, and once made, it’s hard to see with a casual glance at things.
Anyway, I’m back to getting all Sacha’s posts now. Too bad that I don’t remember a lot of the French I learned as a result of one of those annoying foreign language requirements in graduate school.
Footnotes:
Except that I’m not brave enough to try writing a post in Spanish.