Favorite Emacs Utilities

Over at the Emacs subreddit, Phovox—a 30-year Emacs user—asks what your favorite Emacs utilities are. He’s started using Doom Emacs and has discovered, through Doom, utilities that he didn’t know about. So he’s wondering what else he may have missed and is asking the community what they recommend.

Some of the answers were general things like the ability to use Emacs to change virtually any part of Emacs to suit your preferences. Others were more on point and included things like Dired, Hippie-expand, the classical version control system, Ediff, Magit, Calc, Org, Projectile, LSP, and Replace-regexp.

Some of the other commenters mentioned third-party packages such as Hyperbole and Everything.

The best advice, I think, came from Wumpitz. That is to spend some time with the Emacs manual. It’s too much to try to read it straight through, of course, but you can decide to read one chapter every day or week. It is, says Wumpitz, amazing how much you don’t know about some of the basic utilities.

All the action is in the comments so take a look to see if there’s some utility you should be using but aren’t.

Posted in General | Tagged | Leave a comment

Emacs For Writing

There’s a great question and answers post over at the Emacs subreddit. The question, from lynnlei, asks how a prose writer who has been using Vim should approach moving to Emacs. This comes up a lot, of course, and it’s always the comments that provide value. I like reading them because I almost always learn something new about Emacs.

That’s certainly the case here: I learned about org-novelist, which will be the subject of an upcoming post even though, as I recently said, I don’t write novels. Even so, it has lots of capabilities to help with any long(ish) form writing.

The rest of the comments are interesting and helpful too. There’s no ankle biting or silliness so you might learn something useful for your own workflow.

A lot of the things we Emacers take for granted seem mysterious and marvelous to immigrants so posts like this are really useful to get new users oriented. They’re also useful to introduce oldtimers to Emacs features that they were previously unaware of.

Lynnlei said she wasn’t interested in Evil, even though she is coming from Vim, and that leads to some interesting discussions on packages that are probably best thought of as “evil-light”. Whether you’re coming from Vim are or an old-time Emacs user, there’s probably something worthwhile for you in this post. The comments are definitely worth perusing.

Posted in General | Tagged | Leave a comment

BOM Characters From Windows Files

It’s been a slow day on the Intertubes for Irreal material but I do have something that might interest those of you who have the misfortune to be running Emacs on Windows. Just the other day, we discussed the sad fact that Emacs on Windows can be slow. Despite the tone that my posts on Windows often take, I do want Windows users to be able to enjoy all the benefits that Emacs offers.

One of the problems with Window/Unix interaction is that they made slightly different decisions about file formats. That mostly manifests itself in Windows using CR LF for EOL while Unix uses LF. This isn’t just a matter of Microsoft’s contrariness. The choice of CR LF was reasonable at the time.

Over at the Emacs subreddit, BrainFuckPlusPlus talks about another problem with using Emacs on Windows. He’s an Emacs user working in a shop dominated by VSCode users. Apparently VSCode saves files with a BOM sequence starting the file and he was trying to get Emacs to ignore the BOM by setting the Emacs coding method. He found a solution but that solution caused problems in another area.

That brings up another remarkable aspect of this story. BrainFuckPlusPlus’s question was answered by Eli Zaretskii, the main Emacs maintainer. This was an obscure question on reddit, not the Emacs-Devel mailing list, and yet Zaretskii took notice and explained what BrainFuckPlusPlus should do to resolve it.

Zaretskii, like most FOSS maintainers, doubtlessly has a job and a family demanding first claim on his time but he still found a few minutes to help an Emacs user with an arcane problem. It’s yet another demonstration that Eli and the other devs don’t get nearly enough credit.

Posted in General | Tagged | Leave a comment

One Line Per Sentence

Chris Maiorana has another thought provoking post that advocates the use of one line sentences. The idea is that each sentence ends not just with a period but with a newline. That seems a little unnatural but has a lot to recommend it.

I don’t do that anymore but I used to. I wrote two books where every sentence was a separate line. This was before my Emacs days so I was using Vim but it worked pretty much like it would in Emacs. If the sentence was long, the line would wrap to fit on the screen but the wrap was virtual, much like Emacs’ visual-line-mode. Actually, using visual-line-mode means that paragraphs rather than sentences are the single lines but no one ever thinks of it that way.

I no longer remember why I used the one-line-per-sentence method for my books. It probably had something to do with the fact that they were written with Groff but as Maiorana says, there are lots of good reasons to recommend it. You can check his post for some of those reasons.

As with most things, Emacs—and in particular Org mode—has you covered. There are commands for moving between sentences and for moving those sentences up and down. That makes it easy to switch sentences around while you’re editing. None of that depends on one line per sentence, of course, but works seamlessly if you prefer that way of working.

My view is that Emacs and Org mode do away with a lot of the reasons to use one line per sentence but, of course, you like it for some of the reasons Maiorana offers or for others, Emacs has you covered. Even if you have to mix methods, Emacs will work the same way.

Posted in General | Tagged | Leave a comment

Why SICP Matters

All you Irreal oldtimers know that I’m a fanatical fan of Abelson’s and Sussman’s Structure and Interpretation of Computer Programs (SICP). It is, I think, arguably the best computer science book ever written. You oldtimers also know how bitterly disappointed I was when MIT abandoned SICP and the course built around it. I’ve never accepted nor found convincing the rationale for that change.

I discovered SICP late in my career and even though I was well past the age when fundamental change was supposed to be possible, it completely changed the way I thought about and approached our craft. It was literally a life changer.

In 2011, to celebrate MIT’s 150th birthday, Brian Harvey, a Berkeley professor, was asked to write an article on why SICP was important. Here it is. It is, at the same time, inspiring, bittersweet, and infuriating.

It’s inspiring because it states clearly and convincingly why SICP is the right thing and how much better it is than other introductory courses that spend most of the semester discussing the syntax of whatever (non-Scheme) language de jour they’re using.

It’s bittersweet because Harvey recounts how SICP affected his students even though some of them didn’t realize its profound effect until years later. That would be fine except that in his essay Harvey wondered if SICP would survive his retirement. Sadly it didn’t—see his post.

Finally, it’s infuriating precisely because the fight was lost. All the people who wanted to talk about robots and program in Python won. Robots and Python are important things to learn about but they don’t teach you how to think about programming. They mainly teach you how to use libraries. That’s also important, of course, but shouldn’t we teach students about fundamentals and how to think about programming? Apparently not.

If you care at all about SICP and the culture that it engendered, take a look at Harvey’s essay.

Posted in General | Tagged , | Leave a comment

Casual Suite

Charles Choi has made good on a promise he made in his post announcing a name change for some of his early Casual packages. In that post, he said he was going to bundle all the current and future Casual extensions into a single package.

He’s honored that pledge and the new Casual Suite is available for download on MELPA. It’s the best of both worlds. If you want all the current and future porcelains, you can install the Casual Suite package. If, like me, you prefer to load only some of them, you can do that too because the individual porcelains are available on MELPA too.

As I’ve said before, these packages are a real win. The only time you need to invoke them is when you want to use some aspect of the target UI that you seldom need and don’t remember the shortcut for. The menus are never shown unless you explicitly call them.

Posted in General | Tagged | Leave a comment

The Emacs 30 Release Cycle Has Started

Eli Zaretskii has announced the start of the Emacs 30 release cycle. What that means is that Eli has created the emacs-30 release branch and restricted commits to it to bug fixes that don’t affect low level code. This is the start of the process where what will become Emacs 30 starts undergoing refinement and polish.

Eli says that he hopes to release the first pretest in about a month. After that, barring any show stoppers, the release of Emacs 30.1 won’t be far behind.

If you don’t mind living on the bleeding edge, download and install the emacs-30 branch and report any problems to the development team. You’ll be helping all of us get a better Emacs 30.1 faster by doing so.

I know I always say this but it can’t be said enough: thanks to Eli and the other devs who work so hard to benefit us all. I’d double their salary but it would stay the same.

Posted in General | Tagged | Leave a comment

PSA: Emergency Emacs/Org Release

Stefan Kangas writes to tell us about an emergency Emacs release to version 29.4. This is the result of a recently discovered Org mode problem, that you can read about here. Both projects have offered updates. The Org mode announcement says that you should update either Org or Emacs. The Emacs announcement says you should update both so I am updating both.

I’ve updated Emacs and am in the process of updating Org. Right now it is stuck “checking Org-2.7.5” so I fired up my old version of Emacs to write this.

If you’re an Org user, you need to do something. The safest thing, I guess, is to update both. That’s what I’m doing and when I’m done, I will have the latest Emacs and Org. This is a pain but, really, we hardly ever have this sort of thing with Emacs or Org. Compared with my other apps that have an update every week or so, that’s not bad.

Afterword

Org finally finished but then Org wouldn’t run correctly. I blew away my Elpa directory and let Emacs rebuild everything on startup. Still no joy. Finally, I removed the new Org from Elpa, started Emacs with a -q to prevent it from loading the builtin Org, and installed the new Org. That worked and everything is fine now. You’d think I’d remember about doing that when I have problems with loading a package, but no. Maybe next time.

Update [2024-06-23 Sun 12:08];

Ihor Radchenko has clarified that the fix is entirely in the Org code so there is no need to update Emacs unless you want to run the builtin Org. You need only update one or the other.

Posted in General | Tagged , | Leave a comment

The Hours That Programmers Keep

An enduring stereotype about hackers—as opposed to those who program only as a day job—is that they get up at noon, start programming in the late afternoon, and keep programming for most of the night. Many of us, me included, are preternaturally night people. But that mostly works for young people. Once you get a bit older and start your own family, keeping those hours is a non-starter.

But the question arises: is this stereotype accurate or is it a legend perpetrated by a few outliers? Ivan Bessarabov decided to find out. That’s not as hard as you might think. His idea was to check the times that some famous open source programmers made commits to GitHub.

The results weren’t surprising. They were, in fact, just what you’d expect. Some, perhaps many, programmers from this subset did adhere to the stereotype but others—Linus Torvalds, for example—work on a normal day schedule.

None of this really matters at all except as a cautionary tale for those anal micromanagers who want everybody to be in the office for a set of fixed hours. Still, it is interesting and I’d be interested in a wider survey. One could, of course, just look at all the GitHub repositories and parse out the individual contributors but some of those will doubtless be people working at places like Red Hat and contributing as part of their day jobs.

I’m not sure how you’d filter for those programmers who can work whatever hours they choose. Even then, you’d get lots of people, like Linus, who can theoretically work whenever they like but have family responsibilities that limit their actual available work times.

I’m sure, that with enough effort, this could be done but it’s probably not important enough to be worth the effort. As for me, I’d be working into the night except that, you know, family.

Posted in General | Tagged | Leave a comment

🥩 Red Meat Friday: Is Emacs Slow For You

Over at the Emacs subreddit, MarkieAurelius has a mini-poll that asks: Is Emacs Slow For You? That’s a perennial question, of course. I last wrote about it a year ago. Not much has changed since then.

The same uninformed people are opining at the top of their lungs about how slow and unusable Emacs is and, of course, the ankle biters are as active as ever. The best contrary opinion was from danderzei who said “Emacs works as fast as I can type and think.” That’s been my experience too. Emacs is more than able to keep up with my typing even though I’m a reasonably good touch typist.

Many of the comments blame LSP for any perceived slowness. I program in C and Lisp so I’ve never seen the point of LSP and have never used it. It may be that it does slow things down. How this compares to other editors, if it actually happens, I don’t know. In this case, I’m able to get away with saying “I don’t care.”

The other cause of slowness appears to be running on Windows. Some commenters report that running Emacs under WSL resolves the problem for window users. I’m happy to say that I really don’t care about any Windows related problems.

Some commenters suggest that maybe having a lot of packages slows things down. I have a a moderate number—probably about 80—of packages installed and it doesn’t seem to affect the speed of my Emacs. It’s hard to see why having a lot of packages, per se, would have much effect unless they’re something like LSP that has to look at every keystroke.

So that’s it for another year. Emacs is (still) not slow in any way that matters for most users and you folks claiming otherwise are going to have to find something else to complain about.

Posted in General | Tagged , | Leave a comment