Moving Among Emacs Windows

Once you discover the utility of having multiple windows in a single Emacs frame, the question of how to switch between those windows arises naturally. Emacs, of course, has you covered. You can use Ctrl+x o to cycle between windows. That’s great if you have only a couple of windows in a frame but it becomes tedious when there are multiple windows. That, of course, happens often once you get used to making maximum use of Emacs.

Marie K. Ekeberg over at TheMKat has a solution. It’s a nice solution in the sense that it’s built into Emacs so you can use it without adding anything extra. That solution is windmove. Ekeberg didn’t like the default bindings but, as she says, it’s easy to change them to whatever is comfortable for you.

I used windmove for a while but I have since moved to ace-window, a wonderful app from abo-abo that, when invoked, labels each visible window with a number that you can use to select that window you want to move to. I’ve bound it to Ctrl+x o so I didn’t have to learn a new binding. The nice thing is that if there are only two windows—my usual situation—ace-window will simply switch to the other without further ado.

When I brought up the ace-window repository while writing this post, I noticed that there are a bunch of possible actions available. I never use any of them except switching but you may find some of them useful.

The TL;DR is that if you routinely have more than two windows in a frame, ace-window is a must have app. I’ve been using it for years and wouldn’t want to live without it.

Posted in General | Tagged | Leave a comment

Organizing A Book In Org Mode

Somehow, I missed this great reference to Ron Galloway’s outline for using Org mode to organize a book. Fortunately, Sacha had me covered with her excellent Emacs News.

If you haven’t written a book before, it may be surprising how necessary Galloway’s template is for the actual mechanics of writing a book. Even if you’re organized and divide your book into a main file and separate files for each chapter, you’ll soon discover that you want some place to put notes, log your progress, track your references, and brainstorm ideas.

Every author solves these problems in different ways with different file structures but Org is especially amenable to providing a useful framework for organizing these things.

I wrote my books before I discovered Org mode—or perhaps before it existed—but my structure was essentially the same. The nice thing about Org is that you can access—and work on—all those files from a single top level file.

If you’re writing or considering writing a book, take a look at Galloway’s outline. It’s an excellent starting point for our own project.

Posted in General | Tagged , | Leave a comment

Unique Card Decks Revisited

Five years ago, I wrote about an interesting factoid that Paul Graham posted (probably to Twitter) concerning how many unique orderings of a standard 52 playing card deck there are. Almost all Irreal readers will immediately raise their hands shouting, “I know, I know! 52!.”

The point of that post was to get a feel for how large 52! really is. It’s way bigger than your intuition tells you it is. The TL;DR from that post was that every time you pick up a well shuffled card deck it is almost certainly unique for all time, past and future.

Over at czep.net there’s an interesting post that takes another look at 52! and how unimaginably large it is. To do this, the post proposes a series of games. In one such game, you start a timer counting down from 52! to 0 once a second and walk around the equator taking one step every billion years. When you complete the circuit, you take a single drop of water from the Pacific ocean and start again. When the Pacific ocean is dry, you place a single sheet of paper on the ground, refill the ocean, and start again. When the sheets reach from the Earth to the sun, check the timer and you’ll notice that the leftmost digits still haven’t changed.

Take a look at the post. It’s astounding how large 52! really is even though at \(\approx 8 \times 10^{67}\) it may not seem that large to those of us used to dealing with large numbers. If you have to perform 52! operations, you’re never going to finish.

Posted in General | Tagged | Leave a comment

The Downside Of Living A Digital Life

Regular readers know that for several years I’ve been endeavoring to live a “digital life”. What that means—more or less—is eschewing pencil and paper, paper bills, checks, dead tree books, physical credit cards, and even things like keys when I can. My goal is to be able to manage my life from my computer and to be able to leave the house with nothing but my phone. I’ve pretty much met those goals except for my car keys and driver’s license.

It’s no surprise that all this depends critically on two things:

  1. Electricity to charge device batteries
  2. A reliable Internet connection

As Milton recently made clear, that infrastructure can be fragile. The bunker lost power for 3 days and with it, any semblance of living a digital life. My devices were all charged up, of course, but that doesn’t last long when you’re trying to get things done and they can’t be recharged. I have a backup battery that kept our two phones charged but we did have to cut way back on usage.

WiFi was down—and therefore our “Smart Home” as well but cell phone service was still on so we had broadband service when we absolutely needed to get on the Internet or text someone. As I said, there’s nothing like wondering how you’re going to charge your phone to make you positively stingy about its use.

Fortunately, the bunker is overflowing with dead tree books acquired before I started down the digital life path so we were able to keep ourselves amused. Seven years ago, I bought a four pack of these Etekcity Lanterns, which provided light for reading and other things when it got dark. I don’t use them very often but they’re wonderfully useful when you need them. They’re bright and the batteries (AA) last for a long time (up to 50 hours according to Etekcity). I changed out the original batteries for the first time during the latest outage. If you—even sometimes—lose power you really should invest. They’re cheap and reliable and can help ease you through a power outage.

In any case, Irreal’s adventure in roughing it is over and we’re glad to be back living a digital life.

Posted in General | Tagged | Leave a comment

Milton After Action Report

Here I am. We just got power back today at 15:19. We did have broadband—although the signal was weak—but I didn’t have enough power on my laptop to compose a reasonable post. As you might imagine, everyone we know in the world was texting asking how we were so I was doing my best to conserve my phone battery. The weather people are saying this is the worst hurricane in the Tampa area in a hundred years.

The good news is that the bunker survived without any damage. There was plenty of tree branches all over the area but no downed trees in our immediate area, although there were some trees down fairly close to the bunker. Lots of people in the Tampa area did suffer significant damage but most of that was storm surge.

Tomorrow Irreal will continue its quest for world domination. The minions and I are hoping that we’ve seen the last of significant hurricane events for the year. Two in two weeks are more than enough.

UPDATE [2024-10-13 Sun 10:12]: buffer → bunker (thanks to Michael Ashley for the heads up)

Posted in General | Tagged | Leave a comment

Writing With Emacs Redux

Four years ago I wrote about James Gill’s list of Emacs resources for writers. It was a curated list of resources that addressed writing prose of various sorts with Emacs. In April, I revisited the list. Judging from what I wrote, I had forgotten about my first post.

Now, I’m writing about it again because of Gill’s latest post about the list. In it, he says that surprisingly to him, that repository is the most popular of all his Github repositories. It’s not surprising to me because it’s a really great resource.

What was surprising to me, as I read down the his list, is how any are things that I have written about on Irreal. You may or may not think of that as an indication of quality but one thing for sure, it’s indicative of how interesting they are to me.

Regardless, if you use Emacs to write prose—for a blog, for reports, for articles, or even for books—you should take a look at this list. There’s sure to be something useful to you in it.

Posted in General | Tagged | Leave a comment

Milton Outage Alert

Sigh. This is yet another warning of an impending Irreal outage due to a hurricane. This time it’s Milton, which intensified very rapidly into a Cat 5 hurricane. There are two very bad pieces of news for the Irreal Bunker.

  1. Milton is forecast to hit Tampa directly
  2. The winds are currently 180 MPH, although they may diminish as the storm approaches Tampa

As usual, the real danger is storm surge. The bunker is probably safe from that: it’s not in a flood zone (and believe me, Florida understands flood zones).

It’s still a little early to say exactly what’s going to happen but we will almost certainly lose power, possibly for several days. If that happens, I’ll try to post updates using broadband if the broadband network stays up. If not, Irreal will disappear for a while but we’ll be back and resuming our quest for world domination forthwith.

For those of you interested in the details, Milton started as a wide area low in the Gulf of Mexico just like Helene but it intensified much more rapidly and the steering currents are sending it right to Tampa instead of North Florida. Here’s the latest track from the National Hurricane Center.

UPDATE

I’m publishing this today although we won’t see any effects until Wednesday night. Right now, Marvin has weakened a bit to a Cat 4 but it could restrengthen when it moves over the loop current (an area in the Gulf of very warm, deep water). I’ll probably be able to push at least one more post before Marvin arrives.

Posted in General | Tagged | Leave a comment

Emacs Configuration Can Be Easy

A frequent complaint we hear from n00bs is that Emacs out of the box is unusable, that it’s really hard to configure, and so you need something like Doom to get going. Generations of Emacs users have put the lie to that. Lots of us have been starting with vanilla Emacs and configuring it to our needs for 40 years.

Over at the Emacs subreddit, permetz suggests that it’s fine to have a simple configuration that builds on default Emacs. Permetz has been using Emacs since 1983 and considers himself a power user but he has a simple config file that mostly consists of setting a few variables to adjust things to his liking.

That’s how I started. Back then I was still writing in C so I spent a bit of time getting Emacs to indent C the way I liked. As I went along I added some packages and wrote some custom Elisp for bespoke operations that no one else would need. Even so, after 16 or 17 years my init.el is still pretty small and I could easily trim it down by getting rid of stuff I no longer need or use.

Permetz’s message is don’t be afraid of starting small from vanilla Emacs and having a simple configuration. You’ll be surprisingly productive and your init.el can grow organically as your needs change.

Posted in General | Tagged | Leave a comment

Why You Still Don’t Mess Around With Jim

I’ve written before about the dangers of messing around with Jim [1, 2]. The reference is to a wonderful Jim Croce song explaining the dangers of messing around with a bad man by the name of Big Jim Walker. The two posts above are about Sabel Networks (a patent troll) messing around with Cloudfare by bringing frivolous patent suits against them.

Cloudfare was not amused and offered a bounty on prior art for not only the claimed patents but for all of Sabel’s patents. They demolished Sabel at trial and in the end Sabel agreed to

  • Pay Cloudfare $225,000.
  • Donate all its patents to the public

If other big companies would take the same principled stand that Cloudfare does, we could put an end to these parasites. Sadly most companies find it cheaper and easier to settle, which is why patent trolls continue to prosper.

In any event, Croce had it right. You don’t mess around with Jim.

Posted in General | Tagged | Leave a comment

Commercial Surveillance: Out Of Control

It’s been a while since the minions and I indulged ourselves in a good privacy rant. You can consider that remedied with this post. The EFF is reporting the results of an FTC report on how companies abuse their users’ privacy.

It’s not pretty reading. Companies routinely use customer data in ways not anticipated by their users. That includes selling or sharing it with third parties. All of this is in service of their targeted advertising business, of course. They want to build a dossier about your interests and activities and have no concern at all for your privacy. They don’t even pretend that they do.

The EFF says that self-regulation and other light-weight solutions have failed and that it’s time for a legislative fix. Irreal is inclined to be skeptical about the utility of letting politicos into the room They almost always cause more problems than they fix. Still, something has to be done.

The EFF has several legislative fixes they’d like to see implemented. Companies whose business models depend on targeted advertising won’t care because they’ll find a way to circumvent them. That is, all except for one: outlawing targeted advertising altogether.

The ban would have to be airtight and carry draconian penalties. In Irreal’s, admittedly cynical, view that’s not going to happen. Even if such legislation were proposed, the lobbyists would drain every single drop of blood out of it. There is, after all, serious money involved.

The FTC’s recommendations are completely toothless and would easily be skirted by the advertising companies. We should, I guess, be happy that they’re at least taking notice.

Something has to be done before the peasants show up with pitchforks and torches. No one wants that even though the whining from the advertisers about how unfair it all is would be amusing.

Posted in General | Tagged | Leave a comment