Emacs 28.1

Yesterday, Eli bumped the version of Emacs to 28.1. I wasn’t sure if there would be further release candidates coming but at the time the release had not appeared on any of the FTP servers nor had there been a release notice posted to emacs-dev so even though I wrote a post I was hesitant to publish before I knew what the status of the release was.

Today, the official announcement was posted to eval-devel and the tarballs are available in the usual places so Emacs 28 is finally with us. As usual, we all owe Eli and the other maintainers who contribute their time and skills to ensuring that Emacs is a living, up-to-date piece of software.

My project for this evening is the compile and install the new release. With any luck, tomorrow’s post will be brought to you by Emacs 28.

Posted in General | Tagged | Leave a comment

April Fools Day

At the risk of putting my nerd credentials at risk, I have a confession: I really hate April first and all the Internet silliness that goes with it. Many of the April fools day posts are extremely well done and I never know what to take seriously so I end up discounting what are probably serious posts.

I’ve always assumed that my dislike was the result of my curmudgeonly demeanor and that I was an outlier but a recent (Twitter) poll suggests that I may not be alone:

It is a Twitter poll and the respondents are probably all followers of a single person but I draw comfort from it nonetheless.

I know the silliness will go on and that there’s nothing I can do about it but get off my lawn anyway.

Posted in General | Leave a comment

Vanity Fair on the Origin of COVID-19

Vanity Fair has a long article on the origin of COVID-19 and the political maneuverings surrounding it. Additional documents have surfaced since the virus’s origin first became an issue.

The TL;DR is that there was always substantial doubt from the Virology community about the official zoonotic explanation for its genesis. Substantial efforts from Fauci, Daszak, and others were exerted to shutdown those doubts and to cast the lab leak explanation as an anti-science conspiracy theory.

The picture that emerges is not pretty: it’s of a group of scientists doing everything they could not to find the truth but to suppress it. Daszac, in particular, is portrayed as a lightweight concerned only with the funding and survival of his nonprofit, the EcoHealth Alliance.

Vanity Fair makes the case that the gain of function research going on at the Wuhan Institute of Virology and funded by the EcoHealth Alliance shouldn’t have been happening because of a 7U.S. Government moratorium on such activities. Daszak, however, offered a quibbling argument that the moratorium didn’t apply to his research and his enablers at the National Institutes of Health agreed.

Like other articles about COVID’s origin, Vanity Fair doesn’t reach a conclusion on that. What is clear, though, is that a major cover up took place and is still going on. One doesn’t have to be a cynic to wonder why. As virologist Simon Wain-Hobson put it, “[The group of scientists pushing the claim of natural origin] want to show that virology is not responsible [for causing the pandemic]. That is their agenda.”

Regardless, the major lesson in all this for me is that we have to shut down this dangerous gain of function research before these people manage to kill us all.

Posted in General | Tagged | Leave a comment

The Power of Emacs

I saw this tweet by Daniel Nemenyi today:

He makes a good point. With Emacs it’s pretty easy to solve a lot of problems that would be absolutely opaque with most other editors let alone the software whose name must not be mentioned.

If you follow the thread, he explains that the error was caused by his using follow-mode with LaTeX-mode. That meant that bottom of screen calculations had to be constantly made. Notice that there’s no particularly high powered debugging going on here. He simply ran the profiler, discovered where Emacs was spending its time, and used that to figure out what had happened.

Another example of the power of Emacs.

Posted in General | Tagged | Leave a comment

An Emacs User Looks at Acme

I’ve written before about the Acme editor. The first time it was about Russ Cox’s video tour of Acme. The second was Vince Foley’s take on Acme as an Emacs user. Those were almost 10 years ago so perhaps it’s time for another look.

Ben Hancock has a post entitled The Tao of Acme that is another Emacs user’s look at Acme. His post differs from Foley’s in that he came away from the trial an Acme convert. As I’ve said before, there’s a lot to like about Acme but there’s also a lot the average Emacs user—including me—finds off-putting.

First, Acme is almost completely mouse driven. Its author, Rob Pike, is a believer in mouse driven navigation and believes it to be faster than the keyboard alternative. Any Emacs user who has bothered to master Emacs navigation and uses something like Avy to move around the visible buffer is going to beg to differ on that and probably adamantly take the opposing position. If your editing strategy includes eschewing the mouse at all times, you’re not going to like Acme.

The other thing that new Acme users complain about is the lack of syntax highlighting. Again, this is Pike’s personal choice and was done on purpose.

If the above doesn’t bother you, there’s a lot to like about Acme. A look at Cox’s video will give you a good idea. A major difference from Emacs is that almost nothing is built in. If you need a specialized regular expression search, say, you provide it with a shell script. In a way, that means Acme provides an even more personalized environment than Emacs but at the cost of having to implement all your specialized commands yourself.

Acme is an interesting editor that many might find attractive. It’s available on most platforms now so you don’t have to be running Plan 9 to use it.

Posted in General | Tagged , | Leave a comment

Another Paean to RSS

Radosław Miernik has a post that’s another paean to RSS. He explains what RSS is, how it works, and its advantages to the reader. It’s mostly used to track blog entries but its application is actually broader. Basically any site that posts periodic content can offer an RSS feed to alert their readers when there’s something new.

Miernik uses the free version of Feedly, which, he says, works well for him because he doesn’t need to search the entries or interface his reader to other applications. For Emacs users who do want those capabilities, the very best choice I know of is Elfeed. You can manage, read, classify, and search your feeds directly from Emacs. As I’ve said before, I can’t recommend Elfeed enough.

I’m always a little confused when I read a post like Miernik’s, though. They usually start by accepting that RSS is a lost technology that deserves to be resurrected. I inevitably do a double take whenever I read that. To me, RSS is like the air: it’s something that’s just there. An essential and necessary part of the environment. I don’t know where the notion that RSS is a technology lost in the sands of time comes from but it’s certainly not my experience.

I suppose there’s a certain type of person who thinks that now that Google no longer supports it, RSS has ceased to exist. I think that Google got out of the RSS game for a reason and that that reason benefited them and not us. Regardless, RSS is a valuable service to those who follow multiple sites and I join Miernik is praising it and encouraging others to make use of it.

Posted in General | Tagged , | Leave a comment

Taking Yegge’s Advice

Last week, I wrote about Steve Yegge’s latest Emacs video, Emergency Emacs. The video was mostly about rebinding the Emacs commands that he uses frequently to be as easy to type as possible. One of his rebindings was to replace Meta+< and Meta+> with Ctrl+x t and Ctrl+x e for beginning-of-buffer and end-of-buffer.

It seems like I’m always moving to the top or bottom of the buffer so I type Meta+< and Meta+> a lot. Truth to tell, I kind of like the bindings but they are clumsy to type. I have to move my left hand to hold down Shift and Meta and type < or > with my right hand.

The new bindings are much easier to type and, as Yegge says, you can do it with one hand. I’ve been using them for only a couple of days and they still haven’t been burned into my muscle memory so I have to think about them first. Still, they’re already faster than the old bindings and I’m glad I changed. If you find yourself moving to the top and bottom of the buffer frequently, you should consider making the change too. It’s a bit of pain to retrain your muscle memory but it will make you more efficient.

Posted in General | Tagged | Leave a comment

REPLs and Interactive Programming

Mikel Evins has a post from back in December of 2020 that recently popped up in my feed for some reason or another. It’s an interesting post about one of my favorite programming topics: interactive programming. In it, Evins examines REPL driven, interactive programming and why not all REPLs are created equal.

As he says, plenty of languages and development environments have REPLs these days but most of them don’t support interactive programming the way that, say, LISP REPLs do. He gives the example of a function, foo, calling a function bar that does not exist. In most systems that’s a fatal error or crash. In LISP you simply get dropped into a breakloop where you can examine the current run time environment, change variable values, or even define the bar function. When you’re done, the original computation resumes with the modified environment.

It’s hard to provide this type of programming environment and you can’t just bolt it on as an afterthought. It has to be planned from the start the way languages like LISP and Smalltalk are. The characteristic that divides real REPLs from the pretenders is that you have complete access to the compiler and run time while you’re programming. The best examples I know of showing how powerful this can be are from Magnar Sveen and Kris Jenkins that I wrote about here. If you want to see the technique brilliantly demonstrated, watch Jenkins build a Spotify client right before your eyes in 16 minutes.

If you’re unfamiliar with interactive programming, take a look at Evins’ post and be sure to watch the Sveen and Jenkins videos. It’s my favorite way of programming and it may turn out to be yours too.

Posted in Programming | Tagged | Leave a comment

Searching As You Like It

Álvaro Ramírez likes that Emacs’ customizability means that you can make it behave exactly the way you want it to. He illustrates this with a simple but useful bit of Elisp that implements what he describes as a DWIM search.

Ramírez is a fan of abo-abo’s great Swiper search function but doesn’t like the way it interacts with keyboard macros and multiple-cursors. To fix that, his function checks if he’s defining a keyboard macro and if so, falls back to the default isearch-forward. If he’s not defining a keyboard macro, the function checks if he’s currently invoked multiple cursors. If so, it calls phi-search to do the search. Phi-search is search/replace package that works well with multiple cursors. Finally, in the default case he simply calls Swiper but arranges for searches to wrap around and automatically use any highlighted region as the search term.

All of this is simple and easy to do but arranges for searches to act just the way Ramírez wants them to. Like yesterday’s post, this serves as another example of how Emacs allows us to automate tasks we do all the time so that our workflow is more frictionless.

Posted in General | Tagged | Leave a comment

File Templates in Emacs

Jeremy Friesen has to write a weekly summary of his team’s work. That summary has a fixed format so management provided a template for it. Being an Emacs user, Friesen, of course, wanted to write his report in Emacs.

He wrote a bit of Elisp that allowed him to insert the template into and Emacs buffer and configure the buffer. This is a common need and other Emacs users may want to do something similar. Friesen writes his report in Markdown so he sets the buffer with the template to markdown-mode. Other Emacs users may prefer to use something else such as Org-mode but it’s easy to tweak his code to do that.

All of this can be done “manually”, of course, but having everything wrapped up in a single function streamlines your workflow and makes day-to-day chores easier. If you’re like me, you probably have several things like this: simple multistep tasks that you could easily automate but just haven’t bothered to. I find that after a while I reach a threshold where I think, “It’s crazy that I keep doing this by hand all the time, I’m going to automate it.” The sad thing is that it takes me so long to reach that threshold.

The real message of Friesen’s post is not about templates but about automating those simple tasks that seem like they’re not worth the effort until they do.

Posted in General | Tagged | Leave a comment