Org Mode 9.5.3

I somehow missed this yesterday but Bastien has announced the release of Org-mode 9.5.3. It’s a bug release so it’s probably not urgent to install it unless you’re being bitten by one of the bugs.

Bantien’s announcement notes that the next release, Org 9.5.4, will be released with Emacs 28.2.

As always, thanks to everyone involved in getting this release out to us. Org is incredibly important to my workflow and I couldn’t do most of what I do without it.

Posted in General | Tagged , | Leave a comment

Tony Aldon On Catch/Throw

Here’s another post from Tony Aldon. Sacha already covered it in Emacs News but it’s interesting enough that it deserves another mention. The post is about catch/throw and examples of its use.

Aldon starts with some simple made up examples of using the catch/throw paradigm. He shows some of the ways it can be used. Most of the variation is in specifying the symbol that names the catch block but he also shows some examples of nested catch blocks.

After the simple introductory examples, Aldon presents some real examples from the Emacs source code. They’re more complicated, of course, and involve more code than just the catch/throw but they do show catch blocks in the wild.

The main takeaway about catch/throw is that it’s a mechanism for non-local exits—the throw can even be in a separate function—and is not an error mechanism like the try/catch sequence in Python, Javascript, C#, and many other languages. Its quintessential use is to break out of loops. A nice example is a dolist loop: there’s no way to specify an exit criterion so the catch/throw mechanism is perfect for exiting the loop when some criterion is satisfied.

Posted in General | Tagged | Leave a comment

Tony Aldon: Another Wgrep Workflow

Ever since I read Abo-abo’s post on using wgrep to edit multiple files, I’ve been a huge fan of using grep to search for some regular expression in multiple file, write enable the results buffer with wgrep, make changes to the results, and save those changes back to the original files. Although there are multiple workflows to accomplish this. they all involve using one of the grep commands to search for the regexp in multiple files, modifying the grep results, and then saving the results back to the files. This is an extraordinarily powerful technique that’s easy to generalize.

Tony Aldon has a post that offers another variation on the theme. It’s basically the same except that he uses rg.el to perform the grep duties. It’s very similar to what I do except that I use counsel-rg (part of the ivy swiper package) to do the searching.

Regardless of the details, the grep/wgrep paradigm is a powerful one and definitely worth knowing. It can make a complex refactoring utterly simple. The takeaway from all the posts on the matter is that you can use whatever flavor of grep you like and just write enable the grep results buffer to make changes that are reflected back to the original files.

Posted in General | Tagged | Leave a comment

Never Say Never

Some time ago, I stopped following politics and even stopped watching the news or reading a newspaper. I’m a much happier person since I did. Still, sometimes it means that I miss something important to me.

The latest such example is on the Pink Floyd front. If you’ve been around for a while, you know I’m a huge fan and consider them to best rock band in history. Of course, the band has long since dissolved and there’s not much news to be had. Roger Waters left the band decades ago, Rick Wright is dead, and iconic guitarist David Gilmour has been adamant that he is finished with Pink Floyd and has no interest in resurrecting the band. He relented when Wright died so that he and drummer Nick Mason could do a tribute album for him. That was in 2014 and although Gilmour, Mason, and Waters are still performing, none of them has appeared as Pink Floyd.

Then the Ukraine war happened. It turns out that Gilmour’s daughter in law, artist Janina Pedan, is Ukrainian and he has two grandchildren who are half Ukrainian. He was very frustrated that there was nothing he could do to support the Ukrainians until Pedan sent him a video of Andriy Khlyvnyuk, a member of the Ukrainian band Boombox, singing an a cappella version of a Ukrainian anthem. Gilmour realized that he could put this to music and in just a couple of weeks had put something together. He called Mason, who enthusiastically signed on, and along with a couple of other long time Pink Floyd backing members recorded the song as Pink Floyd and made a video.

You can see Gilmour being interviewed on CNN about the song and watch the video itself here. All proceeds from the sale of the song are being donated to the Ukrainian relief efforts so if you’re looking for a way to help the Ukrainians and are a Pink Floyd fan, purchasing the song is an excellent way of doing so.

Posted in General | Tagged | Leave a comment

How I Spent My Summer Vacation

Well, not me: Tom Lyon. His post was actually entitled My Summer at Bell Labs and tells the story of his summer internship at the Labs. Regular readers know I’m a sucker for this type of thing so of course I have to share it.

At the end of his junior year at Princeton, he applied for a summer internship at Bell Labs. He’d done some work with moving Unix to the IBM 370 so of course he wanted to work with the Unix group. The problem was that the Unix group was primarily a research organization and weren’t very active with the intern program so Lyon just applied to the normal intern program.

In an incredible stroke of luck, Ken Thompson went to lunch with Lyon and his interviewer and learned of Lyon’s work with porting Unix to the 370. As a result, he was invited to work with Dennis Richie and Steve Johnson who were working on porting Unix to the Interdata 8/32 minicomputer. Lyon’s job was making the user programs portable.

He says that his senior year at Princeton was a disappointment to him because after his experience at the Labs, he couldn’t take his courses seriously. He said they were interfering with his education.

If like me, you enjoy reading stories about the early days of Unix and the people involved in building it, take a look at Lyon’s post. It’s fairly short and a quick read but enjoyable nonetheless.

Posted in General | Tagged , | Leave a comment

Emacs and Calibre

Garjola Dindi has a very interesting post on using Calibre from within Emacs. Dindi already read his books from within Emacs using nov.el for Epubs and pdf-tools for PDFs but because he manages his library with Calibre, he had to leave Emacs and open Calibre to handle administrative chores on his library.

Recently, he (re)discovered calibredb.el and realized that he could use it to handle those administrative tasks without leaving Emacs. Calibredb.el wants to use ebook-reader and evince to open books so Dindi had a make a simple adjustment for that. Otherwise, everything worked out of the box.

I do almost all of my reading on an iPad so this doesn’t come up for me even though I have used Calibre on my laptop in the past. I sometimes read technical books on my laptop but I usually just fire up pdf-tools directly to do it. Dindi reminded me, though, that there’s a lot of benefit to reading technical material on a laptop: it’s easy to take notes with Org-mode and to leave bookmarks or other links into the book you’re reading.

The downside is that I haven’t been very diligent about organizing my books so I always have to go searching for them. That’s exactly the problem that Calibre solves, of course, so Dindi’s post has inspired me to consider reinstalling Calibre and getting my library in shape. At least for technical books, that makes a lot of sense.

Posted in General | Tagged , | Leave a comment

ERC: The Builtin Emacs IRC Chat Client

Derek Taylor over at DistroTube has a nice video up on ERC, the builtin Emacs IRC chat client. IRC is, of course, invisible to most of the general public and maybe even some of the younger nerds. It’s a very old chat protocol that predates the Web and was popular back when Usenet was still an important way of sharing information. It’s sort of like the old Unix talk application but it’s run on a remote server and supports multiple people.

The #Emacs channel, for example is a place where Emacs users and developers can hang out, ask questions, and discuss matter important to the community. Sort of like Twitter but without the crazy people.

Taylor first gives a demonstration of vanilla ERC without any configuration. It’s surprisingly useful that way and probably more than adequate for occasional users. Then he goes over his, fairly minimal, configuration and shows the difference it makes in a session.

Most of his configuration just involves setting up some useful defaults—such as his nickname, IRC server, and the like—to make signing onto a session a bit simpler. It’s probably easier for new users to simply fire up ERC without worrying about configuration. The configuration can come later when they decide to become regular users.

The video is 14 minutes, 51 seconds so it should be relatively easy to fit in. If you’ve been curious about IRC and are an Emacs user, Taylor’s video is an excellent way to learn enough to try it out.

Update [2022-04-16 Sat 17:45]: pubic → public

Posted in General | Tagged | Leave a comment

Monorepositories

One of the controversies—probably not ascending to the level of holy war—in our field is whether we should keep our version controlled source code in several repositories or a single monorepository. The correct answer is, of course, “it depends”. Still, there’s a widely held belief that monorepositories are not a good thing.

Except that Google, Facebook, and Twitter all use them and love ’em or hate ’em they indisputably have a lot of talented engineers who we can presume know what they’re doing. Dan Luu is another developer who believes that monorepositories can be a good thing.

Luu got tired of explaining why he believes this so he wrote it down in a blog post. In it, he lists the advantages of using a monorepository instead of several repos. These advantages are:

Simplified Organization
That’s pretty much obvious. With per project repos or some similar arrangement it’s hard to know how to structure things. With a monorepository, everything lives in a single repository and many of the structuring problems disappear.
Simplified Dependencies
With separate repositories, it’s hard to keep the versions of separate components in sync. With a monorepository, everything has the same version.
Simplified Tooling
With multiple repositories, build and other tools have to understand the relationship between the code in the individual repositories. That problem is easier in a monorepository.
Cross Project Changes
When there are interproject dependencies, changes can get complicated regardless of whether there is one or many repositories but with a monorepository it’s much easier to coordinate a big change that involves multiple projects.

Luu has much greater detail for each of these so if the matter interests you, be sure to take a look at his post.

Posted in General | Tagged | Leave a comment

A Second Brain in Plain Text

Knowledge workers—which includes engineers, of course—often find they’re trying to hold too much information in their heads. When that happens, they frequently turn to what’s popularly known as a “second brain”. This can take many forms. There are dedicated applications, Zettelkasten implementations, and home brew solutions for it but is can be as simple as a set of notes. Of course, to be useful they have to be searchable, which means the user has to impose some structure on those notes.

Junji Zhi is a software engineer at Gusto Engineering who found himself needing a second brain. He started with the usual assortment of general tools such as Evernote, Apple Notes, Slack, and many others but wasn’t happen with any of them. He finally settled on using a plain text file as a second brain.

He started with a simple text file but quickly discovered that it needed a bit of structure to be usefully searchable. After a while, he moved his notes to an Org file. That brought him an outline structure, better formatting, and even syntax highlighting for his code. The Org file is still plain text so he’s not locked into any particular application. He can, if he feels the need, easily move those notes to any other application.

Although Zhi doesn’t mention it, Org-mode has a template system that can greatly simplify the input of items into the database and handle structuring it by date automatically. If you’re looking for a simple way of implementing a second brain, take a look at Zhi’s post.

Posted in General | Tagged , | Leave a comment

Managers Want An End To Work From Home

It’s no secret that many middle managers recognize the existential risk that working from home represents to their jobs. It’s no surprise, therefore, that they are doing everything they can to put an end to it.

According to an article in Fortune, managers are fed up with work from home and 77% say they will fire or reduce the pay of those who refuse to return to work. That’s a tough position but it may be those managers are whistling past the graveyard. According to a second Fortune article, offices are obsolete and so are the managers who insist employees must return.

Keith Ferrazi and Kian Gohar say that just as companies have come to realize that they can’t dictate how, where, or when then their customers choose to interact with them, they must also realize that the same is true with their employees. They dismiss the notion that work from home is an aberration due to COVID-19 and say that managers are in denial if they believe it will go away once the pandemic ends.

The authors say companies that have had less than satisfactory results from work from home are due to their trying to overlay the digital way of working on the old, analog protocols. Worker, as evidenced by the Great Resignation, are not willing to put up with the old ways of doing things any longer.

Right now, employees are in a position to insist on their demands but as the first article points out, that won’t be the case forever. Sooner or later it will be an employers’ market and job seekers won’t have as much leverage. One hopes that by that time, companies will have adapted to the new realities.

Posted in General | Tagged | Leave a comment