🥩 Red Meat Friday: Getting Disappeared

Hello. It’s me again, shouting into the wind and yelling at clouds. I’ve told you—warned you—over and over again to get off Google but you won’t listen. I’ve long since adopted the hard stance that I don’t care about your horror story. Lost several novels in progress? Don’t care. Lost a lifetime’s worth of pictures of your children? Don’t care. Lost your entire digital life? Sorry, you deserve it.

Still, it’s like looking at a train wreck. You know you should look away but you can’t. I keep thinking, “Why are people still doing that? It’s only going to end in tears.” But nobody listens. Of course, this is a niche blog for folks who like tech and things like Emacs so how many people have a chance to hear me?

How about someone with a larger audience. Someone like, say, Cory Doctorow. Still sort of geeky, I suppose, but at least he can get off his fingers when counting his followers. Here he is making exactly the same points I’ve been making and even using the same horror stories to point out the dangers.

A commonality among the stories he relates is that the people involved aren’t doing anything controversial—let along wrong—and they all felt secure in thinking, “Nothing bad will happen to me because I’m a good guy who’s doing nothing wrong.” Then they find themselves disappeared because some Google algorithm decided they are not worthy of being part of society.

Doctorow wants a legislative fix for this. Techies, of course, will scoff at that but hope springs eternal. Here’s a better solution: STOP USING THE SERVICES OF COMPANIES THAT ABUSE THEIR POWER IN THIS WAY. It may be a bit painful but not nearly as painful as waking up some day and discovering that all the pictures of your children or important, ongoing work has been deleted with no possibility of appeal. And, sadly, those are the least horrifying examples of what can happen.

Posted in General | Tagged , , | Leave a comment

Minimal Emacs Configuration Coda

My last Red Meat Friday rant was about the desire for minimal Emacs configurations on the part of some people and how I didn’t understand what they were perusing. Sebastián Monía, a frequent Irreal commenter, has his own take on the matter that he wrote about on his blog. He makes the case for a minimal configuration but at the end of the day, I don’t think we disagree.

He lays out why he prefers to use builtin functionality when he can. But the thing is, no one is arguing against that. I, too, prefer to stay in vanilla Emacs and add third party packages only when they provide something missing from the default install. That’s why several of the third party packages I’ve installed have since been moved to core: they fulfill a real need. Monía says that his configuration is about 1,700 lines. After more than 17 years with essentially no culling, mine is less than 2,500 lines including comments and code that I’ve commented out “just in case” I might need it later.

Both of us, I think, add packages only when they provide something new that can help with our workflow. As I said in my original post, I spent many years with just vanilla Emacs before I started adding any packages.

The desire to keep our configurations as simple as possible is different from seeking a minimal configuration for its own sake. You can tell the difference by the way people talk about it. If they say, “My configuration is less than X lines” or “My configuration is too long at Y lines” that’s probably a sign that they think a small configuration is a good thing per se.

Of course, it’s not a mortal sin to want a minimal configuration. It’s just, as I said before, that I don’t understand what the people pursuing it are after.

Posted in General | Tagged | Leave a comment

On The Origin Of Emacs

There’s a long simmering debate among hardcore Emacsistas about who what did what in the initial development of Emacs. Most of us know that Emacs began as a curated set of editing macros for the TECO editor. At the MIT AI Lab where all this happened back in 1976, virtually everybody used TECO but they all had their own set of macros.

In order to bring a little rationality to chaos, RMS and Guy Steele decided to select the best macros and offer them as a standard macro set. When you put it that way it doesn’t seem like much of an effort but there as a lot of work by a lot of people just to get things running the way they wanted them to.

All this was almost 50 years ago so of course memories are dim and there are disputes as to who was involved and how much they did. Jeremy Bryant has an interesting blog that considers Emacs, Lisp, and related matters. One of his entries considers the origin of Emacs. To some extent it depends on the recollections of those involved but Steele had a bunch of emails that he contributed to a long thread on Dan Weinreb’s blog.

The TL;DR is that RMS did most of the heavy lifting almost from the beginning. For the first few weeks Steele was heavily involved as were others. Take a look at the blog for the details. A lot of the discussion presumes a knowledge of TECO and its macro system but it’s possible to figure what was going on and who the major players were.

Emacs evolved significantly from those seeds and again RMS put in a huge amount of work. No Emacs user needs to know any of this, of course, but hard core Emacsers will probably find it interesting.

Posted in General | Tagged | Leave a comment

Casual Bookmarks

It’s getting harder and harder to keep up with Charles Choi and his casual-suite. He’s announced yet another app in the suite. This time it’s for bookmarks. Like the other apps in the collection, casual-bookmarks captures all the hard to remember commands in a transient menu so you don’t have to remember them. If, like me, you use several of the Casual apps, you can bind them all to the same shortcut so that there’s hardly anything to remember.

I use Bookmarks+ and have ibookmark-jump jump bound to a hydra that collects other window commands that I use frequently. Using a hydra is basically the same as using transient except that transient is builtin. Some folks prefer transient to hydra but they seem the same to me.

That said, my hydra has no bookmark commands other than bookmark-jump. I virtually never use those other commands except when it comes time to change my current tax file from one year to the next and then I just stumble about with which-key until I find what I need.

But that’s me. If you have the need to interact with the deeper layers of the bookmark system more often than I do, Choi’s app is probably just what you need. As with the other Casual apps, the menu stays out of sight until you explicitly call it and disappears as soon as it does what you
asked it for.

Take a look at Choi’s announcement for the details and to see what the menu looks like. If you’re a dropdown menu user, Choi has a link to a previous post that shows how to implement a menu for the bookmark system.

Posted in General | Tagged | Leave a comment

Prot On Use-package

Protesilaos Stavrou (Prot) has an excellent video on the fundamentals of the use-package macro. If you’re new to Emacs or are one of the few Emacs users who isn’t constantly tweaking your init.el, use-package is a macro you use in your configuration files that makes it easier to configure packages. One of it’s major features is that it automatically defers loading packages under several circumstances resulting in a decreased load time. That feature is especially useful for packages that you seldom use: they won’t be loaded until you actually need them.

The rules are a bit more complicated than you might think. Prot goes through several examples that illustrate how use-package decides what to load, when to load it, and how and when to configure it.

As of Emacs 29, use-package is builtin. Before that, it was a package from John Wiegley that lived on ELPA. Now that it’s builtin there’s no longer a need for special hacks to get it loaded before the rest of your configuration is processed.

When I converted my configuration to use-package, I simply searched for every instance of the require command and replaced it and the subsequent package configuration with a use-package call. There are doubtless exceptions but a good first approximation is that any require for a package should be replaced with use-package. It simplifies your init.el and, as I said before, can reduce your startup time with no effort on your part. Take a look at Prot’s video for the details.

The video is 35 minutes, 44 seconds long so you’ll have to schedule some time but it’s definitely worth your while. Now that it’s builtin, there’s no reason for not using it.

Posted in General | Tagged | Leave a comment

Apple and RCS

I don’t always agree with John Gruber but he’s dead on with his recent post about RCS. If you have even occasionally visited this galaxy, you will be aware of the ongoing battle between Google and Apple concerning the RCS messaging protocol. Android users have been whining for years about green bubbles and Apple’s failure to support RCS.

Now, after years of resistance, Apple has caved and agreed to support RCS. Gruber discusses why this is and why it’s a really bad idea. The reason for the caving is straightforward. China, other authoritarian governments, and even putatively democratic governments like the EU are insisting on it. RCS does not enjoy end-to-end encryption (E2EE) and governments everywhere love this because it allows them to monitor our communications—for the protection of the children of course.

The reason supporting RCS is a bad idea, Gruber says, is precisely because it does not have E2EE. He makes a very strong case that no protocol without E2EE should be adopted by anyone and this includes RCS and he points to the recent AT&T breach as proof of this. RCS is an old protocol without the safety that we have come to expect. Yes, it’s better than simple SMS but, as Apple has shown, we can do better and data privacy and safety demands that we do.

Gruber says that even if they wanted to, Google can’t fix this because RCS without E2EE is already deployed on millions of devices and handling things like key management are very hard problems. But, of course, Google doesn’t want to fix this because like all those government apparatchiks they like spying on our communications in support of their advertising business and have no interest in stopping.

Instead of complaining about green bubbles and other silliness, Android users should insist on a secure messaging protocol with E2EE. There are plenty of non-Apple solutions out there but Google finds it more convenient to put the blame on Apple for its own failures.

Posted in General | Tagged , | Leave a comment

A Vimmer Comes To Emacs

Nathan Dawit Chane has an interesting post on his journey from Vim to Emacs. I can relate to it because his journey is eerily similar to mine. Like him, I spent many years as a Vim user and could be legitimately said to be an expert user.

Like him, I tried Emacs several times but it never stuck. Unlike Chane, I gave up for trivial reasons. I didn’t like the default scrolling and “yank” meant precisely the opposite of what I was used to. Like Chane, I finally moved to Emacs because I started doing all—or at least most—of my programming in Lisp. Emacs—Paul Graham notwithstanding—is simply a better fit for that type of programming. I’ve sacrificed billions of pixels explaining that concept so I won’t relitigate it here.

What finally worked for Chane was to start with a simple Emacs install—complete with the standard Emacs bindings—and become comfortable with that before adding packages. When I started, before ELPA, adding packages was a lot harder so I spent a lot of time just getting used to vanilla Emacs.

Like most of us, Chane came to realize that Emacs was not just another editor but another way of working. It is, as I often say, a light weight Lisp machine that provides an operating environment complete with its own Lisp based programming language. It also happens to have a pretty good editor built in. The thing about that “pretty good” editor is that like everything in Emacs it can be tweaked to make it perfect for you and your workflow.

My sense is that Chane has not yet completely embraced the Emacs way but that he is well on his way. As I often say, Vim is a great editor but it exemplifies another way of working. You may like the Vim way better, which is fine, but if you’re looking for something that recapitulates the Lisp Machine way of working, Emacs is worth learning.

UPDATE [2024-07-27 Sat 17:07]: Added link.

Posted in General | Tagged | Leave a comment

🥩 Red Meat Friday: Minimal Configs

This Irreal post on dependencies and this one on Emacs bloat discussed the idea that many Emacs users have too many packages and other capabilities enabled in their Emacs configuration files. I’ve never worried about that because, really, there’s no reason to do so. Indeed, those who do worry about it mostly fall back on aesthetics as the reason for their worry.

Over at the Emacs subreddit, ptrtoj is complaining that he’s eliminated a lot of packages but his configuration is still over 500 lines long. He’s wondering what else he can do in his quest for a minimal configuration. His post got me thinking explicitly about the value of small configurations and the quest for them.

Here’s a heretical thought: why are minimal configurations a good thing and why should we pursue them? To be sure, every Emacs user eventually accumulates cruft in their configuration: packages they no longer use, workarounds for a bug in Emacs 22 that’s long since been fixed, customizations no longer serving a purpose, and other things they don’t need anymore. No one is arguing that we shouldn’t get rid of the cruft but that’s a bit different from seeking a “minimal configuration” as if it were a good thing per se.

I would argue that on the contrary a large configuration is a sign of users who have—probably over time—made the effort to optimize Emacs for their particular workflow. That a large configuration is, in fact, a sign of a serious—and possibly master—Emacs user.

On reflection, I don’t understand what those desiring a minimal conjuration are seeking or why they’re seeking it. In these days of virtually infinite memory and unlimited CPU power, a minimalism enforced for no clear reason doesn’t make sense.

Posted in General | Tagged , | Leave a comment

Dedicated Windows

Marcin Borkowski (mbork) has a very interesting post on something I didn’t know about: dedicated windows. The TL;DR is that dedicated windows are restricted—more or less—to the single buffer that they were displaying when they were set to dedicated.

Mbork’s use case is reading a technical book in one window while taking notes and trying code snippets from the book in another. He notes that if there’s an error when executing those code snippets Emacs will open an error window over your book. By marking the window as dedicated, you can avoid that and force Emacs to open a third window so you can see all the pertinent information.

Although dedicated windows have been in Emacs for some time, there’s never been an easy way of invoking them. That changed in Emacs 30. Now’s there a convenient key sequence to mark a window as dedicated (Ctrl+x w d).

To be honest, my workflow doesn’t have much use for this feature but, of course, that can change without warning so it’s nice to know that there’s a way of pinning a window to a particular buffer. If you think that you have a use for such a feature, be sure to take a look at Mbork’s post for the details. The easy UI won’t be available until Emacs 30.1 but you still set a window dedicated by calling the appropriate function. See the documentation for the details.

Posted in General | Tagged | Leave a comment

A (Too) Short Interview With Brian Kernighan

As you all know, I’m a big fan of Brian Kernighan. He’s not only the co-author of the iconic K&R book on C but also wrote a lot of of the Unix utilities that we all depend on today. Not least among those is the AWK utility. It’s one of the premier examples of a a little language or a domain specific language.

Kernighan is a master of the genre and has generated lots of examples, big and small. Even today, he maintains and improves the original AWK. Here’s a (very) short interview with Kernighan about his developmemt of little languages.

Kernighan, in his usual self-effacing way, downplays how innovative his inventions were. He says that associative arrays, while newish, were already pretty well known and the pattern/action paradigm underlying the AWK workflow was also known if not widely used at the time. In any event, he says, yacc and lex made it all easy.

Kernighan is a treasure and one of the few remaining people who were there at the beginning of Unix and can tell us stories of what it was like. The linked interview will take you less than a minute to read and is very much worth your while. Take a minute to spend some time with one of the luminaries of our craft.

Posted in General | Tagged , | Leave a comment