Using Org Mode

Aditya Athalye has a long(ish) and interesting post on how he uses org mode for writing and more. Like many of us, Athalye has used a lot of apps for keeping notes and publishing his blog and slides for his talks. He’s settled on Org for the sames reasons that many of us have:

  • It’s plain text so there’s no data lock-in.
  • It’s easily exportable to a variety of formats.
  • It has the ability to embed code with syntax highlighting.
  • It has the ability, through Babel, to execute that code and capture the results.
  • It offers a unified workflow for a variety of tasks.
  • Its Org markdown syntax is being adopted by a variety of (non-Emacs) apps.
  • It’s “local first” meaning that by default your data is held locally.

His post details how he uses Org and some of the Org features that he doesn’t use. He has no interest, for example, in using it for planning, time tracking, calendaring, or as a “second brain”. He’s content to use it for note taking and publishing.

He’s found, as have I, that Org can take over your life in the sense that it replaces most of your other applications. Sure, there’s still Email, RSS, music, and the rest but Org can subsume most of your record keeping requirements.

As I said, the post is a bit long but it’s a good example of one man’s use of Org mode and how it came to dominate part of his digital life.

Posted in General | Tagged , | Leave a comment

Org Pretty Table

Just a quickie today about something you may or may not care about. The reason you may not care about it is that it only affects the display of your local Org buffer—in particular, the display of tables. If you’re like me, you don’t care about that type of stuff; the default Org display is fine. Other folks disagree and they are no more nor no less correct than I, they simply have different opinions and sensibilities. Some people really enjoy having even their intermediate results look as nice as possible.

For those folks, Matus Goljer (Fuco1) has a nice package that overlays the bare-bones default table boundries with their unicode equivalents. My first thought was that the package would be more useful if it exported these changes to HTML, PDF, and the rest but, of course, that’s just silly. The export backends already take care of that so there’s no need for an external package to do it.

The org-pretty-table package simply makes the Org version of your tables look better. If this appeals to you, by all means install it. If it doesn’t, don’t worry about it: your final product will still look good.

Posted in General | Tagged , | Leave a comment

Happy 50th Birthday to Dark Side Of The Moon

Every year on this date, Irreal interrupts its normal programming to celebrate the birthday of Pink Floyd’s iconic Dark Side of the Moon. As I’ve mentioned before, the album is one of the best selling albums of all time. It spent just a couple weeks short of 3 decades on the 200 best selling albums list.

This year is special. It’s the 50th anniversary of the album. My daughter reports that even kids in her middle school class are talking about it. Think about that: kids talking about an album that was probably released before their parents were born.

The Irreal tradition is to feature a video of one of Pink Floyd’s songs to celebrate the event but this year is different. Because it’s the 50th anniversary, the band is holding a competition for the best animation featuring one the songs from Dark Side of the Moon. Here’s Nick Mason, the band’s drummer, explaining the competition:

It’s certainly possible that a few Irreal readers could produce an entry for this contest. I have no idea of what the prizes are but what could be better than having your animation and name linked with the best rock band of all time?

Posted in General | Tagged | Leave a comment

The Programmer Who Broke The Internet

I just came across a story that offers us several lessons. It’s a tale about a programmer who withdrew a trivial function from NPM and subsequently caused several applications to fail. Some of failures were second order effects in that the failing application’s authors had never heard of the function but it was used in functions that they did use directly.

The function itself simply padded a string on the left with spaces to reach a specified a specified string length. As I said, it’s a trivial function (the implementation is only 11 lines) that anyone—even a rank beginner—could write but it was available in some random library so why reinvent the wheel?

All went well until a billion dollar corporation wanted to use the name of one of the programmer’s other packages and asked him change the name of his. When he refused, they threatened legal action and got NPM to side with them and assign the name to the billion dollar corporation. In a fit of—justifiable in Irreal’s opinion—pique, the programmer withdrew all his code from NPM including the aforementioned left padding function. Things went south immediately as several applications started failing to build.

There are a couple of obvious lessons here. First, exhortations to avoid the NIH syndrome notwithstanding, it pays to avoid deep dependencies, especially those you can’t rely on. It’s fine to depend on, say, the C library (or whatever) and other libraries that are part of the programming language environment, but when you start depending on random libraries untethered to the language runtime you’re asking for trouble.

Second, it’s wise to avoid depending on repositories like NPM that may side with big corporations rather than do the right thing. At least according to the story at the link, the programmer was clearly in the right and the corporation had no argument other than muscle in the form of money on their side.

It seems almost paranoid to say you should avoid using NPM packages on the ground that it’s extraordinarily fragile but as this story demonstrates, sometimes a little paranoia is called for. Of course, some packages offer services that are far too complex to be worth implementing on your own but a left padding function is not among them. Neither the primary application developer nor the secondary library developer should be depending on such things.

Afterword

Over at chaitanya.dev there’s a post that gives a few more details about the controversy. He reaches pretty much the same conclusions that I did: beware gratuitous dependencies.

Posted in General | Tagged | Leave a comment

⋆Scratch⋆ For iOS

Alvaro Ramirez has a cute iOS application called ⋆scratch⋆. The idea is that it provides an Emacs-like scratch buffer on your iPhone. If you’re like me, your first reaction is, “why would I want this?” But the use case is those situations where you want to capture a note as seamlessly as possible. One reason you wouldn’t need it is that iOS has the Notes app that’s for exactly that purpose.

I use Notes all the time. In particular I use it for my Memo Book where I record the significant events of my day. But notes has a bit of friction. You have to choose the appropriate note or start a new one. The nice thing about ⋆scratch⋆ is that you just bring it up and write whatever you want. It’s got some simple Org-like formatting but that’s not really necessary.

I wasn’t really convinced I needed it but it was only 99¢ so I bought it on a whim. A couple of days later I was out to dinner with some friends who told me about a wine they really liked. I thought it was worth trying out so I brought up ⋆scratch⋆ to capture its name. It was seamless and easy and just like that I became a ⋆scratch⋆ fan.

I’ve only had the app for a few days so I am by no means an expert on its use but the nice thing is that there’s not much to know. Bring it up and capture your data. You can share it or erase it or start a new scratch buffer but all that is after that fact. When you want to capture some data, you just bring up the app and capture it. I recommend it to iPhone users who occasionally want to capture some data.

Posted in General | Tagged | Leave a comment

ChatGPT From Within Emacs

We Emacs maximalists are always on the lookout for tasks that we can integrate into Emacs in our never ending quest to stay in Emacs as much as we can. Vivek Haldar has added another task to the list of things we can do within Emacs. He has a short video demonstrating his code to access ChatGPT from within Emacs. His method depends on a Python script to do the heavy lifting and some Elisp to deal with the Emacs interaction. There are links to both pieces of the code with the video.

If you’re an Emacser and interested in experimenting with ChatGPT, this may be a worthwhile app to include in your setup. I still think, perhaps erroneously, of ChatGPT as a sort of magic trick. It seems magical when you see it but if you look under the hood, it’s actually fairly easy to see what’s going on. The key to the results—given how it works—is the training data. If you’ve ever noticed how much nonsense there is on the Web, you’ll also understand some of the anomalous results ChatGPT occasionally produces.

Regardless, ChatGPT can be useful if you keep in mind what’s going on in the background. And, of course, it’s going to get better. Probably a lot better so it’s worthwhile laying down some infrastructure for it in your Emacs configuration.

Haldar’s video is a couple seconds short of 4 minutes so you can watch it pretty much at will. It’s definitely worth a watch if you have any interest at all in the intersection of Emacs and ChatGPT.

Posted in General | Tagged | Leave a comment

EKG Version 0.2 Changes

Andrew Hyatt has a new video that describes the changes to EKG version 0.2. I wrote about EKG back in February. The TL;DR is that it’s a note taking app that links notes similar to, say, org-roam but with some interesting differences in operating principals. EKG is available on Melpa if you want to try it.

Version 0.2 adds a couple more functions, info documentation, and some general bolt tightening. The two most significant additions are

Templating
Templates are a way of adding text to any note sharing the tag of the templates. The implementation is different from other templating systems you may be used to. Take a look at the video for the details.
Embddings
This is the most interesting change. Embeddings are a way of capturing similarities among notes. It’s more general than notes sharing terms. Hyatt gives the example of noodles and pasta. The embedding functionality will consider these similar even though noodles and pasta are not the same thing. Generating embeddings is a complex operation beyond the capabilities to Emacs so the chore is outsourced to OpenAI. That fact has some possibly negative consequences that Hyatt discusses in the video.

The video is 17 minutes 27 seconds long so it should be easy to fit in but it won’t make any sense if you haven’t watched the first video that describes EKG and explains what it does.

Posted in General | Tagged | Leave a comment

Pretty Org Reports

Torstein Krause Johansen has a short video up on how he makes his Org reports pretty. It’s really pretty simple and not at all mysterious: he writes his Org as usual but adds a bit of CSS. Of course, that works only for HTML but you can do similar things with PDF and probably most of the other export formats.

Johansen adds a clocktable block to the end of his report so that he gets a nice report of the time spent on each of the items. The table in the pretty report ends up looking very nice.

Johansen doesn’t give a link to his CSS file but here it is. He uses the resulting prettified reports mostly to share with his colleagues. If you’ve been seeking an easy way to generate better looking reports, take a look at his video.

The video is only 4 minutes, 53 seconds long so it’s easy to fit in. The only problem with the video is the audio level. It was apparently recorded at low volume and even when played at full volume it’s hard to hear parts of it. Even so, it’s worth 5 minutes of your time. It’s a great example of how flexible Emacs and Org mode can be.

Posted in General | Tagged , | Leave a comment

SCO Twenty Years Later

It’s hard for those of us who were there to believe but there is a good number of practicing software engineers who not only don’t remember but perhaps weren’t even born at the time of the SCO/IBM lawsuit over Linux. The TL;DR was that SCO decided to rescue their failing company by suing IBM for misappropriating Unix trade secrets and giving them to the Linux project.

If you weren’t there, it’s hard to understand the profound effect the suit and ensuing debacle had on us and our profession. It consumed a huge proportion of our mental cycles and generated significant anger. I remember checking Groklaw several times a day, especially once the suit came to trial. Engineers volunteered to attend the trial and report back to Groklaw, which invariably had trial news first. Even the lawyers used Groklaw as a resource. Like Linux itself, Groklaw was crowd sourced and open source.

LWN has a nice article celebrating the twentieth year anniversary of the suit. It does a great job describing what the suit was about, the community reaction to it, and why it ultimately failed. As the article points out, the suit paradoxically turned out strengthening Linux rather than weakening it.

If you were there, the article is a nice trip down memory lane. If you weren’t, the article will give you an idea about an event that cornered the attention of virtually everyone in our industry for a long time. Even years afterward, SCO would manage to revive some aspect or other of the suit. SCO and their suit now seem suitably dispatched but like the undead, we can never be sure.

Posted in General | Tagged , | Leave a comment

Red Meat Friday: Low Contrast Themes

The minions, ever vigilant for opportunities to engage in another skirmish in the light vs. dark theme war, brought this to my attention and insisted that I run with it.

It’s not really a light/dark theme issue but it is related. It’s possible, of course, to have low contrast text with a light theme but you almost always see it with dark themes. A horrible example is dark gray on black or—even worse—dark blue on black. It’s essentially unreadable but some folks think it looks cool. Those of us with aging eyes are not as enthusiastic.

The minions are jumping up and down with glee about that tweet but maybe we should stop feeding the trolls: quit rendering low contrast text already.

Posted in General | Tagged | Leave a comment