Emacs Time Stamps

The Emacs Cat has a post on an Emacs feature that I use but had mostly forgotten about. It concerns the Emacs time stamp that lets you record in a file when it was last modified. I use it at the top of my init.el to record when it was last changed.

It’s pretty simple to use. You just add a Time-stamp: string somewhere in the first few lines of the file, do a tiny bit of Emacs configuration, and Emacs will add a time stamp whenever the file is saved. My impression is that it’s mostly used in init.el files but it can be used in any file that you edit with Emacs. The Cat’s post give some examples of using it with an Elisp file, an Org file, and a C++ file.

Usually you have to have the Time-stamp: as part of a comment but in some cases, as shown in the Org file, it can be part of the actual file data. Almost everything is configurable. You can specify how many lines from the top of the file to look for the Time-stamp, and you can specify what the time stamp itself with look like.

Take a look at the Cat’s post or the documentation for the details

Posted in General | Tagged | Leave a comment

eMacs On The iMac

Well, actually on any Mac but I couldn’t resist the symmetry. You’re probably wondering what this post is all about. It turns out that Apple computers are inclined to autocomplete “Emacs” to “eMacs”. That, apparently, is because Apple once sold a computer—mostly to the educational market—named the “eMac”.

Over at the Emacs subreddit, uamplifier explains this and provides a link to a Wikipedia article that gives the history of the eMac. All this may be marginally interesting to Emacs users on Macs but the comments provide an additional aspect.

The rest of this post is a sort of PSA for Emacs users on the Mac. The comments to uamplifier’s post explain how to eliminate this antisocial behavior. The first thing you can do is replace the Emacs → eMacs completion. That solves the problem but you can also just disable the Apple dictionary in settings. See the comments to uamplifier’s post for the details.

I’ve never had this problem, probably because I don’t use completion very much and never autocompletion. Nevertheless, I’m happy to see a solution because—due to my sensitive nature—I really hate seeing “eMacs” in posts. It always makes me think that the poster has been lobotomized by the eThis and eThat nonsense that is so endemic in our industry. Perhaps it’s Apple and not these people’s brain that are to blame. Regardless, if you’re using Emacs on the Mac and are having Emacs turned into eMacs, take a look at uamplifier’s post to see how to fix it.

Posted in General | Tagged | Leave a comment

Why You Should Stay In Emacs

Here at Irreal and in many other venues, you hear a lot about staying in Emacs. The hardcore among us treat having to leave Emacs as a fail. To outsiders, it can seem a little obsessive but it all goes back to having a uniform interface for dealing with text.

Here’s a delightful meme that expresses that impulse. As usual, the comments are really interesting. For a bit of context—as one of the commenters explains—with CUA the Ctrl+a Ctrl+x Ctrl+s selects everything, deletes it, and saves the file; definitely not what you get from Emacs.

It’s astounding how many of the commenters say that they’ve fallen victim to the same sort of thing. Others complain of deleting browser tabs with Ctrl+w. One said that he had moved even browsing into Emacs despite its being suboptimal. At least the key bindings do what you expect them to.

There’s nothing really profound in the post but it is amusing and, as I said, the comments are interesting. They show that those of us who would prefer to stay in Emacs are not alone.

Posted in General | Tagged | Leave a comment

Avoiding Emacs Pinky

Right after it’s too hard to learn, the second most frequent complaint about Emacs is how hard it is on your hands—especially your left pinky—because of its default keybindings. A lot of that has to do with the placement of the Ctrl and Alt keys on modern keyboards.

Sudoshred has a video that explains his system for avoiding Emacs pinky. The TL;DR is that on the Mac you should swap the left Ctrl and Alt keys. That way, you can press and hold Ctrl with your thumb and avoid stressing your fingers. Sudoshred says that since he began doing that his RSI problems have disappeared. The solution for other operating systems is similar.

He also suggests some hand stretching exercises and keeping your hands off the keyboard when you aren’t actually typing. Notice that his advice differs from the usual suggestion to swap Ctrl and Caps Lock, which is what I do.

Some of the comments claim that Emacs pinky is a made up problem harking back to older keyboards and that swapping Ctrl and Caps Lock is all you really need to do.

Some Irreal readers will beg to disagree. They say, for example, that they have to use Evil mode because of RSI problems. I take them at their word. On the other hand, I’ve been using Emacs virtually everyday, all day for almost 20 years and haven’t had any problems. And, by the way, I do everything wrong. These days, most of my tube time is on my couch with my laptop on my lap and I do keep my hands on the keyboard most of the time.

The takeaway is that I don’t know what the best method of avoiding Emacs pinky is. If you’re lucky like me it’s not a problem. If you’re like Sudoshred, a simple key swap will make the problem disappear. If you’re like many other people, you’ll have to give up the default keybinding and move to Evil mode or perhaps something like Xah Lee’s Fly Keys.

Posted in General | Tagged | Leave a comment

Newsticker

Here at the Irreal bunker we’re trying to recover from an, um, excess of enthusiasm for our Easter dinner with relatives. My torpor is preventing me from putting together a detailed post so here’s a short take on something I’ve been meaning to mention.
When I think about reading RSS feeds from within Emacs, the only things that come to mind are Gnus and Elfeed. You all know by now that I’m a huge Elfeed fan and can’t imagine using anything else.

A couple of weeks ago I can across a post from Ruslan Bekenev about a third option: Newsticker. The interesting thing about it is that it’s builtin. Those of you who like minimal configurations with as few packages as possible may want to check it out. If you think you might be interested, take a look at Bekenev’s post. It looks like a very nice application but as I said, I’m very happy with Elfeed and have no desire to try anything new.

Posted in General | Tagged | Leave a comment

The Use Of Tools

Seth Godin has an interesting post on the use and design of tools. His thesis is that some tools, such as a hammer, are immediately accessible to the casual user. Even experienced hammer users aren’t going to be significantly more efficient in their use.

The tools that you and I use—modern tools as Godin puts it—aren’t like that. They’re more complicated and very often difficult for the casual user to use effectively. Sadly, says Godin, these casual users don’t bother to learn how to use these tools well. They take the attitude that they’re too busy to waste time on learning, let alone mastering, their tools. Meanwhile those who do master these tools can be orders of magnitude more efficient with them.

So why does this post have the “Emacs” tag? It’s not a mystery. One of the most frequent complaints that I’ve been seeing against Emacs is that it’s too hard to learn and that, after all, real people have jobs to do and can’t afford to spend time learning things. Left unstated is how all those Emacs users, many of whom have produced truly astounding software, managed to learn Emacs.

Over and over again you see phrases like “VS Code just works out of the box.” That’s great for the casual user “too busy” to master difficult tools but failing to master your tools creates a debt that will come due, probably at a most inconvenient time.

As Godin puts it,

Don’t hold the hammer at the wrong end. And insist on software that’s worth the time it takes to learn.

Most important, once you find software that’s worth the time to learn, learn it.

None of this is to say that you must, or even should, use Emacs. Only that whatever editor you choose, take the time to learn it well.

Posted in General | Tagged | Leave a comment

The Zen Of Task Management

Bastien Guerry has a longish post on how he uses Org mode for task management. If you’ve been around Org mode for any amount of time, Guerry will be familiar to you. He took over the maintainership of Org mode when Carsten Dominick decided he needed to get back to Astronomy, which is, after all, his profession. Since then, Guerry has stepped in when Org needed him and has continued to be a presence in the project.

His years of working on Org mode internals have given him a first rate understanding of how Org works and the best way to use it. Therefore his post on how he uses Org to manage his tasks is must reading for all Org users. Guerry will be the first to tell you that his system may not be what you need but his reasoning for why he made the choices he did is instructive for us all.

I don’t really use Org to manage my tasks to the extent that Guerry does. For me, my agenda is more of a display of my daily log although some tasks do find their way into my agenda. Regardless, I found his discussion of his organization of tags to be very helpful.

No matter how you use Org mode, you should take a look at Guerry’s post. He has a lot of good ideas that you may find useful.

Posted in General | Tagged , | Leave a comment

Decreasing Emacs Load Time

A week and a half ago, Bozhidar Batsov stirred up a storm by claiming that Emacs startup time doesn’t matter. There was much foaming at the mouth but I agreed with Batsov: Emacs startup time hardly every matters. When it does, it is in very special circumstances that, happily, most of us never experience.

At the end of my post on the matter, I said that if your Emacs startup time is lengthy, it probably indicates a problem with your configuration. Batsov apparently believes the same and in a new post offers some advice for addressing that problem.

He frames his discussion in terms of the use-package macro that most people use. The secret, he says, is to delay loading packages until they are needed. That makes sense because loading a single package won’t take long but loading, say, a hundred may add significant time to your init time. By deferring the loading, you speed up Emacs’ startup time at the cost of adding a tiny delay later when you first actually need a package.

Batsov’s suggestions are a bit complex but the TL;DR is to avoid the :preface, :init. and :config keywords. You should definitely read his post for the details. Ironically, he doesn’t follow his own advice because, as he says, Emacs startup time doesn’t matter.

Posted in General | Tagged | Leave a comment

Emacs For Everything

Joshua Blais has an interesting post that looks at the idea of using Emacs for everything. That’s a familiar meme for us Emacsers, of course, but you don’t often see a careful, considered examination of the idea. Blais is an Emacs user so his post is, naturally, supportive of the idea but he does try to give both sides of the issue.

Blais’ main argument is built around the flow concept. Interrupting a knowledge worker’s flow can have devastating effects on their productivity. These interruptions include context switches and one study suggests that context switching and multitasking takes up around 60% of our working time. That seems high to me but whatever the value, it’s certainly significant.

One of the virtues of Emacs is that virtually all your text based tasks can be done in Emacs. That’s significant because the editor provides a uniform interface to all those tasks. Indeed, you can even slip it into other apps with packages like Emacs Everywhere that allow you to bring up an Emacs window to edit some app’s text area. For example, I use it with iMessage so that I can compose my texts in Emacs.

The advantage to doing most things in Emacs is that you avoid context switches and can better stay in the flow. A secondary benefit, as least for me, is that it provides a single set of muscle memories to deal with. As I’ve said before, I do better with a single set of keybindings so folding everything possible into Emacs is a win for me.

Blais also considers and dismisses the argument that Emacs takes so long to learn that you never regain the time “lost” to learning it. Even a few seconds thought is enough to recognize that idea for the silliness it is but Blais makes the point that if you aren’t using Emacs you’re still spending time learning other utilities that Emacs would otherwise handle. I know this first hand. Before I came to Emacs I was a long time command line user and spent years learning to use it effectively. Now I rarely use the command line; everything I need to do I can do from within Emacs.

Blais’ post is well worth a few minutes of your time whether or not you’re an Emacs user. Take a look.

Posted in General | Tagged | Leave a comment

AI And Em Dashes

My old colleague and friend Watts Martin has an interesting and amusing post on em dashes and their indication of AI generated text. As many of you know, Irreal is an em dash friendly site [1, 2, 3, 4] and we spend a good portion of our pixel budget on them.

I was, therefore, surprised to discover from Martin’s post that according to LinkedIn influencers, real people don’t use em dashes—they use hyphens—and therefore em dashes are a sure sign of AI generated text. Once I got over the notion of a “LinkedIn influencer” and what that could possibly mean, I read Martin’s explanation for this bizarre and clearly erroneous belief.

His explanation would make a fine Red Meat Friday post. The TL;DR is that LLM AIs are, by and large, trained on polished text where the use of em dashes is natural and common, whereas, sadly, many people can’t write at all. That is, their reading and writing is restricted to things like emails or business memos that haven’t had the benefit of even a first editing pass, let alone a final polishing. Most of these people don’t read enough “good” writing to even know what it looks like.

Those of us who do use em dashes should feel flattered. We are, apparently, at least as good at writing as the current AIs. Of course, I’d prefer the comparison to be to Iain M Bank’s Minds—this is Irreal, after all.

Posted in General | Tagged | Leave a comment