M-x Occur

Kristoffer Balintona has a nice post on Emacs occur. If you have moderate familiarity with Emacs, you have probably used occur on occasion. I use it all the time but still wasn’t aware of everything it could do.

Happily, Balintona is here to fill in the blanks. The information is all there in the documentation, of course, but it’s easy to miss it when skimming through the doc looking for the information that you need.

The first significant thing is that you can restrict the action of Occur to a specific region of the target buffer. You probably won’t want to do this very often but it’s easy to see how it could be useful. The second significant thing is the number of lines of context.

You can specify how many lines of context before and after the matching regex to include but you can also specify a string in which case what is displayed acts as a replacement string. You certainly won’t need that capability a lot but when you do, it’s perfect.

Take a look at Balintona’s post or the documentation for the details. This is another example of how learning Emacs is a lifelong endeavor. You learn bits and pieces of a certain functionality but later discover that it’s much richer than you believed.

Posted in General | Tagged | Leave a comment

Is Emacs Practical For Real World Use

In another in a seemingly unending sequence of such questions, sav-tech, over at the Emacs subreddit asks if Emacs is useful in practical life. I’m not sure what he thinks all we Emacs users are doing if it’s not practical but let’s take his question as being in good faith.

As usual, all the action is in the comments. The main thing that I noticed is that people using VS Code and the like always say that it does what they need right now. That’s because those editors are configured to provide the conventional services. It’s great. There’s no setup required, you just start using it to do what you need to do.

The problem is what comes next. Sooner or later you’re going to need to do something that the VS Code developers didn’t consider and you’re going to be out of luck. With Emacs, you’re also going to find yourself wanting to do something the developers hadn’t anticipated. The difference is that with Emacs you can simply add the capability. Often this doesn’t require anything more than a keyboard macro or some shortcut configurations. If you learn a little Elisp, you can make Emacs do anything you want.

Sav-tech says that someone on Discord told him that Emacs is a monolithic editor, takes only 20–40 minutes to learn, and, anyway everyone is using VS Code now. That’s a fact free statement by someone who has no idea what he’s talking about. Read the comments if you want your faith in the judgment of software engineers restored.

You can use Emacs, VS Code, or whatever works best for you but let’s at least try to keep the discussion informed.

Posted in General | Tagged | Leave a comment

Compile Angel

James Cherti has announced a new package, Compile Angel. The idea is to keep all your Elisp files compiled with both the byte compiler and the native compiler. It has modes to compile any outdated “binaries” when a modified Elisp file is saved or when one is loaded. Both compilations are important because byte compilation helps Emacs to load faster while native compilation, of course, help Emacs run faster by generating native hardware code.

In his announcement, Cherti explains how Compile Angel differs from auto-compile. The TL;DR is that Compile Angel is lighter weight and compiles more files than auto-compile.

This seems like a nice package. Strictly speaking, it’s not necessary, of course, but it’s another way reducing the friction of maintaining your Emacs installation. Unless you’re the type of person who enjoys a completely hands-on approach to system maintenance, Compile Angel is probably worth looking into.

The project GitHub repository is here but except for the code is essentially the same as the announcement.

Posted in General | Tagged | Leave a comment

Profoundly Ignorant And Proud Of It

It’s easy to be snarky about management—especially the suits—and Irreal has certainly indulged itself often. In case you think such snark is unwarranted, I offer this sad example for your consideration.

It demonstrates everything that can go wrong when people with no technical skills nevertheless feel inclined—and entitled—to make decisions that aren’t really any of their business and for which they are eminently unqualified. Take a look at their description of Emacs:

“An old fashioned and slow text editor created by Canonical for use with the Ubuntu operating system”.

There’s not a single part of that description that’s correct. You Vim guys can stop laughing now. Here’s the description of Vim:

“Developed by CentOS, an editor with a steep learning curve”.

I guess that’s a slightly better description than the one for Emacs in that “with a steep learning curve” might be said to be accurate. On the other hand, these same suits are happy to embrace Neovim so, again, they have no idea what they’re talking about.

I can’t imagine working for a company that would presume to tell developers what editor they should use let along one that justifies their decisions with such a complete lack of knowledge of what they’re talking about.

All I can say is that if you are working for this company or one like it you should start looking for other employment forthwith. Even if your preferred editor is on the approved list, management’s attitude and presumption will eventually reach out to bite you.

Posted in General | Tagged | Leave a comment

Why Programmers Need Doors

Talk about carrying coal to Newcastle. It is, I think, safe to say that every Irreal reader already knows why programmers need doors that can be closed. It’s well plowed ground involving familiar concepts such as “being in the flow” and “building castles in your mind”. The ideas go back at least to the 1987 Lister & DeMarco book Peopleware: Productive Projects and Teams.

Shenisha has a very nice summary of the problem on her substack. There are, she says, two types of work: interruptable work and noninterruptable work. Interruptable work can be safely interrupted with no effect on productivity. Uninterruptable work is the type that can’t easily be restarted when interrupted.

The sad reality is that most people perform interruptable work and don’t understand noninterruptable work and its importance. They think nothing of dropping by a programmer’s desk to ask a random question because it would never occur to them that it would be a problem. It certainly wouldn’t be for them.

As I said, this is familiar territory. Or at least I thought it was. But reading some of the comments—presumably from programmers—I’m not so sure. What to make of this comment for instance? It shows such a lack of understanding of what productive programmers do and how they work that one can only hope that Kenny_log_n_s is not a programmer. I read the replies to his comment fully expecting a roasting but incredibly they were generally supportive.

It seems, sadly, that this is a never ending battle. Nonprogrammers are never going to understand the idea of flow and those of us that depend on it will continue to struggle to convince them of an idea that is deeply counterintuitive to them.

Posted in General | Tagged | Leave a comment

Travelling With A Smartphone

If you’ve been reading Irreal for a while, you know that one of my goals is to be able to leave my house with nothing but my iPhone. That’s possible right now if you live in the right state, have the right car, and have a smart lock on your door. The right car and the smart lock mean you don’t have to carry keys. Living in the right state means you can carry a digital license on your phone. You can use Apple Pay virtually everywhere now so you don’t need to carry credit cards no matter where you live1.

When I wrote about this previously, there were still a couple of holdouts on accepting Apple Pay but now virtually everyone—except Walmart, of course—accepts Apple Pay and I hardly ever use an actual credit card anymore. In the meantime, Florida implemented a digital license but then suddenly suspended the program and withdrew the app from the app stores. They’re currently looking for a new vendor and expect to start up again next year. I’m hoping that something happens before I die. There really is no excuse for having to carry around a physical card just so you can drive.

The Florida suspension of its digital license program is a step backwards in my quest to be wallet free but the general situation does appear to be improving. Over at Sunset, Sarah Yang, a self professed Luddite, has an informative article on all the ways you can use your smartphone for travelling even if “travelling” simply means going to the supermarket or your favorite restaurant. In addition to replacing your credit cards, you can also put your plane or theater tickets on your phone. If you’re staying at a hotel, the chances are good that you can replace your room key with an electronic key on your phone or even automate your check in. If you live in or visit a city with mass transit, you can probably put a pass on your phone too.

Smartphones are well on their way to replacing our everyday carry. That doesn’t begin to capture all their uses, of course, but it’s certainly a significant one. I, for one, can’t wait for the holdouts to get onboard

Footnotes:

1

At least in the U.S. I’m not sure what the situation is in other parts of the world is but it seems as if Apple Pay and its Android analog have near universal penetration.

Posted in General | Tagged | Leave a comment

🥩 Red Meat Friday: Emacs For Word

In what has to be the silliest question of the week, Kiiwyy, over at the Emacs subreddit, asks do you use Emacs as a substitute for Word. In particular, he’s wondering if people use Emacs for class or project notes. He says he uses Word for these and wonders what other people are doing.

In the first place, the concept of using Emacs as a replacement for Word seems backwards to me. Emacs can do so much more than Word that the question makes more sense the other way around.

The only real strength of Word is that all the normals use it so it’s sometimes necessary to produce a Word document for collaboration. The canonical example, and virtually the only one mentioned in the comments, is resumes. The other required Word use is in some publishing domains. A number of Journals, particularly in the humanities, insist that papers be submitted as Word documents. Similarly some book publishers really want Word documents—although they tend to be a bit more flexible—because it facilitates their production flow.

The commenters are, almost to a person, unsympathetic. They all note that—other than resumes—there really is no reason to use Word. Even if the final recipient requires a Word doc, you can always export an Org document to Docx so even for resumes you can maintain it in Org and export it to Word, PDF, or HTML as circumstances demand.

Sure, if you’re a secretary writing business letters for your boss, use Word. In most other situations, it’s hard to see why you would. Emacs has so much more to offer and, really, is just as easy to learn so why use word and worry about losing your document when Microsoft has a hiccup?

Posted in General | Tagged , | Leave a comment

Why Isn’t There An Emacs 2?

Over at the Emacs subreddit, Available-Inside1426 asks why there isn’t an Emacs 2. By that he means a rewrite of Emacs to address what he sees as problems with Emacs. Those problems include the usual silliness like a better GUI implementation, better mouse support, a client-server architecture, and so on. The only improvement he suggests that makes sense to me is implementing threads.

Of course, everyone would like Emacs to have a robust thread implementation but the problems are legion. Here’s an account of one brave soul’s attempt to implement them. The TL;DR is that in the end he gave up because there’s just too much shared state built into Emacs.

One thing you hear all the time and that Available-Inside1426 repeats is that “Emacs was made for a different world”. I don’t know what that means. Sure, Emacs was made in a different world but I don’t think it’s true that it was made for a different world. After all, it was made to edit text as efficiently as possible and in that it still performs better than any other editor. My cynical suspicion is that what “made for another world” really means is that it doesn’t have enough bling, and is not centered on point and click.

Emacs development is, in fact, proceeding apace and everyone with even a bit of software development experience knows that rewriting a mature system always ends in tears. Emacs doesn’t need to be rewritten. Sure, some things would benefit from improvement but that exact process is always underway. Your pet wish may not be as high on the list as you’d like but if it’s worthwhile, it will certainly be implemented eventually. Who knows? Maybe we’ll even get a good thread model.

Posted in General | Tagged | Leave a comment

The End Of The Story (Finally)?

If you’re a younger engineer, this probably won’t mean much to you but if you’ve been around since, say, the turn of the century it’s a huge story. Darl McBride has died and, oddly, no one seems to have noticed. McBride was at one time the bête noire of the open source movement. That was due to his Quixote-like suit against the Linux community claiming that they stole source code from Unix, which as the CEO of SCO, he claimed his company owned.

As it turned out, the courts ruled against his ownership claims and the suit died only to rise again and again phoenix-like every time it was putatively put to rest. If you weren’t there at the time it’s hard to understand its effect on the open source community. We all—all of us—obsessed about the case daily and religiously followed Groklaw, which often seemed to know more about what was happening than the lawyers involved.

The legacy of the SCO suit is that when its architect died, no one noticed. Linux, of course, has prospered and I’m pretty sure SCO, in whatever guise, has ceased to exist. Think of it as a moral lesson about the wages of turning to lawyers instead of actual engineering to save a dying company.

Posted in General | Tagged | Leave a comment

CFPB: Customers Own Their Bank Data

The Consumer Finance Protection Bureau (CFPB) has ruled that, essentially, consumers own their banking data and banks must make it easy to retrieve that data and, if they wish, transfer it to another institution. That’s big news and another chapter in the FTC’s recent ruling that companies must make it as easy to quit a subscription as it is to sign up for it. I wrote about that here and here.

It’s the same issue as the FTC’s ruling because banks have been using the same tactics to keep their customers in the stable. They make it as hard a possible to transfer your data and thus change banks. The banks are, of course, upset that they will have to share their data with competitors but as the EFF says, it’s not their data, it’s yours.

All of this is important because banks charge wildly different fees for their various services and their policies make it impossible to comparison shop. Banks love that, of course, and you can be sure that they won’t acquiesce to this ruling quietly. Indeed, they are already suing the CFPB to block the rule. It’s for our own good, of course. Just ask them. The CFPB, it seems, is specifically authorized to make rules such as these so the banks may have a hard time convincing the courts.

Let’s hope that the CFPB prevails and that the banks are forced to stop these abusive practices. Let them, for once, compete on the quality of their offerings rather than laying down bear traps.

Posted in General | Tagged , | Leave a comment