Three Useful Emacs Packages

Emacs-Elements has a short video that describes three useful packages that save various pieces of Emacs state. The three packages are:

  1. real-auto-save
  2. persistent-scratch
  3. session

The first, real-auto-save, saves the file you’re working on when Emacs is idle for a configurable number of seconds. Most people probably wouldn’t want this globally applied so you can set hooks to only do it for the type of files you want to automatically save.

The persistent-scratch package does just what it says. It will save your scratch file across Emacs sessions. That’s handy for folks who actually use it to take notes and don’t want to lose those notes when they restart Emacs.

Finally, session saves things like the values you’ve stored in registers. Follow the link to see a list of all the things that session saves. I’ve never been a fan of this sort of thing but many people are so if you’re one of them, take a look at the package.

The video is only 6 minutes, 17 seconds long so you can probably watch it while you’re waiting for your coffee to cool. These packages are good examples of small Emacs apps that help you adapt Emacs to work the way you want it to.

Posted in General | Tagged | Leave a comment

Marks and Regions

David Wilson has a new video out on efficient text selection in Emacs. You can’t really understand text selection in Emacs without understanding the mark. The basic fact is that the currently selected text—the region in Emacs lingo—is the collection of characters between the mark and the point.

Wilson explains how to select text regions by setting the mark and then moving the point. When you have a region defined, you can perform any of several operations on it. That can be anything from simple cuts and copies to more esoteric things like changing the case of every character in the region. Mostly, you learn those commands as you go along but the first thing to learn is efficient ways setting the region.

Emacs, as you’d expect, has many shortcuts to set the mark and then move the point to some predetermined place. For example, there are commands to mark the current word, paragraph, page, or buffer. There are even move specialized commands for Lisp code that deal with things like marking the current s-expression or function definition.

Of course, that’s only half the story about marks. You can also jump to them. Even more, they’re saved in a special structure called the mark ring. Thus, one can jump to the last \(n\) marks where \(n\) is the size of the mark ring. The mark ring has 16 entries by default but, being Emacs, it is, of course, configurable.

Wilson explains all this and more in the video so be sure to take a look. His demonstration of the global mark ring falters a bit at the end but it’s still a very worthwhile video. The video itself is about 28 and a half minutes so plan accordingly.

Posted in General | Tagged | Leave a comment

Red Meat Friday: How Not To Design Signs

As promised, no journalists were harmed in the posting of this Red Meat Friday. Instead, via Karl Voit, I present this example of really atrocious design.

The perpetrators of this mess doubtlessly thought they were cleverly using color to guide the eye but forgot that the (Western) eye is much more likely to be guided by left-to-right, top-to-bottom linearity. Or maybe it’s the other way around. Who can tell?

Posted in General | Tagged | Leave a comment

And You Don’t Mess Around With Jim

The late Jim Croce famously sang

You don’t tug on Superman’s cape
You don’t spit into the wind
You don’t pull the mask off the old Lone Ranger
And you don’t mess around with Jim

Cloudflare has another item for that list: “You don’t patent troll Cloudflare.” That should have been obvious to everyone after they essentially destroyed Blackbird Technologies when Blackbird tried filing a spurious patent suit against them. Cloudflare responded by offering a bounty for prior art not only on the patent Blackbird was asserting against them but for every patent in Blackbird’s portfolio.

Sadly, some people are slow learners. Another non-practicing entity (NPE), an outfit called Sable Networks, decided to try its luck and asserted patent infringement against Cloudflare on four of its patents. Cloudflare was not amused and has launched another bounty program for prior art on all of Sable’s patents.

You can read the details and a list of the patents on Cloudflare’s post about the suit. It’s too bad that other large companies—such as Cisco and Juniper—caved to Sable and bought them off. That’s what NPEs depend on: that it’s cheaper to settle than to fight. It takes a company like Cloudflare, or Newegg before them, to do what’s right and smash these trolls and the bridges they hide under to pieces. After a while the trolls learn that you don’t mess around with Jim.

Posted in General | Tagged | Leave a comment

Bastien on Using TODO Lists Efficiently

Bastien Guerry, longtime maintainer and advocate for Org-mode, has a few thoughts on using TODO list efficiently. His thoughts are distilled from 15 years of using Org to keep his TODO list and schedule his tasks.

The chief challenge, he says, is using your TODO list as a tool and not letting it become a burden. Doing it correctly takes discipline and without that discipline the TODO list can become formulaic and burdensome. Happily, Guerry has discovered some principles that can help avoid these problems.

The first principle is to distinguish between notes and TODO items. Things you want to remember should not appear as tasks. Notes are not (necessarily) actionable and should not appear in your TODO list until they are.

A second and related principle is to write concise and focused task items. That means basically just listing the task without a lot of context or explanatory material. That content, if needed, should be linked to not included in the TODO item.

Finally, take care of your agenda. That means not adding TODO item until and unless they are needed and have a specific date they need to be done. Nice-to-do or “someday” items should be in your notes, not your TODO list. You can migrate them from your notes to your TODO list when you are ready to schedule them on a specific date.

Take a look at Guerry’s post to get the details. He’s got some useful ideas if you’re serious about using TODO lists to become better organized.

Posted in General | Tagged , | Leave a comment

The Post Office and Surveillance

The U.S. Postal Service (USPS) has fallen on hard times. The Internet, email, FedEx, and UPS have been eating their lunch for years. It’s not hard to see why. A first class letter costs 55¢ with delivery time measured in days. Once you have Internet access, which just about everyone does, email is essentially free and delivery is immediate. Even Aunt Millie has more or less given up on snail mail. What the Internet is doing to letter delivery, FedEx, UPS, and even Amazon are doing to package delivery: the USPS delivers about 7.3 billions packages a year while FedEx, UPS, and Amazon together deliver about 12.6 billion.

What, then, to make of this Yahoo! News article about the USPS monitoring social media for posts about protests? The post office is hemorrhaging money and can barely carry out their legitimate roles. Why are they involved with this? Irreal is not alone in its confusion; no one understands why this happening. Putting aside its dubious legality, the experts can’t understand why the USPS was tasked with this instead of, say, the FBI or Homeland Security.

What’s odd is that the USPS has been doing better—from a customer service perspective—lately. It’s hard to see why they would embrace this sort of distraction. Despite their boilerplate attempt at justification, this operation doesn’t seem to have anything to do with delivering the mail or the type of problems Postal Inspectors generally deal with.

And speaking of Yahoo! News, their horrendous, very user-unfriendly site reminds me why I’m always surprised to discover that they’re still a thing. Just go look at the article to see what I mean.

Posted in General | Tagged | Leave a comment

Two Quickies

Ten Years At This Location

Irreal will be 12 years old in July but 10 years ago today I published my first post at irreal.org. Before that, Irreal was hosted at Blogger and I posted sporadically at best. Once the blog got its own domain, it felt more official and I tried to write more regularly. Eventually, I started posting everyday, which in retrospect seems a little silly but it’s a habit now.

Native Compilation has been merged

Native compilation was, indeed, merged over the weekend. It’s still an optional feature for now but Eli has indicated that he hopes to make it the default in Emacs 28. Again, it’s extraordinary that such a major feature could be integrated so quickly.

Posted in Blogging, General | Tagged , | Leave a comment

Multiple Help Buffers

Marcin Borkowski (mbork) posted a potentially helpful tip on multiple help buffers. I say “potentially helpful” because his use case is pretty niche and it’s hard to think of others that are essentially different. Regardless, If you need multiple help buffers, mbork shows you how.

His particular need was to compare the doc strings of two functions. If I had that need, I would probably have followed the help buffer to the source of the first function and then brought up the help for the second function. The source of the first function contains the doc string, of course, so I could compare them with a single help buffer. Mbork’s solution is arguably simpler. Take a look at his post to see how he did it.

I often comment on Borkowski’s posts but I don’t mention all of them. If you’re interested in honing your Emacs skills, his blog is a good one to follow. It’s low volume—a post every week or two—so you won’t be overwhelmed. If, like me, you have an RSS feed, you should consider adding his blog to it.

Posted in General | Tagged | Leave a comment

The Open Office Is Dead

Open offices are dead. At least that’s what the sociopaths who foisted them off on protesting office workers—but never their bosses for some reason—say. An article in Fast Company says that the architects who have been pushing the open office concept on their customers have changed their minds.

Sort of. First of all they ignore the most salient fact about open offices: they are germ exchanges that COVID-19 have rendered no longer feasible. Increased employee illness was always a problem with open offices but it was largely ignored by employers seduced by the cheaper buildout they offered. That’s no longer possible and probably won’t be for some time.

Secondly, they haven’t really repudiated their past designs; they’ve just changed them a bit. Take a look at the Fast Company article or these concept sketches from one of the architectural firms. They all look like open offices to me but with cute names like “The Library,” “The Plaza,” and “The Avenue.” The Library, for instance, is claimed to solve the noise and disruption problem by having a “no talking” policy as if no one has ever thought of that before.

It remains to be seen if employees will tolerate this nonsense after experiencing the comfort of distraction free working from home. I get that not everyone likes working from home and that—for some reason—some folks even like open offices. But most people don’t and are apt to object on the grounds that these open spaces are dangerous and inefficient.

I’ll be a lot less cynical about open offices in general and these “new” designs in particular when I see the bosses using them and taking advantage of all the things they offer their employees. I’m not holding my breath though.

Posted in General | Tagged | Leave a comment

Native Compilation Will Probably Be Merged This Weekend

Eli Zaretskii writes that absent the discovery of any last minute blockers, native compilation will be merged into master this weekend. A problem with symlinks prevented the merging last weekend. At this point there are no more issues known so the merge can proceed.

On the one hand, it seems like it’s been a long slog. On the other, it’s amazing how fast things have come together. Once it’s widely available, this feature will make all our lives better and easier. Many many thanks to Andrea, Eli, and everyone else who’s worked on this.

Posted in General | Tagged | Leave a comment