Update On The Org-9.6 Problem

Yesterday, I wrote about Org-9.6 failing to load after my weekly update. I’m happy to report that due to the advice of the excellent Irreal readers Fran Burstall and Mike S, I have resolved the problem.

The problem turns out to be that files from the builtin Org 9.5.5 were out of date and causing the org-assert-version macro to fail. The secret is to install the new Org before any .org files are loaded causing files from the builtin Org to be loaded. That can happen, for example, if you have Org agenda files, which will be loaded before you’ve done anything with Emacs other than load it.

If you’re having the same problem, here’s what I did to resolve it:

  1. Uninstall Org-9.6
  2. Make sure the Org-9.6 directory in your Elpa repository is deleted
  3. Start Emacs with the -Q option
  4. Install Org-9.6 with package.el
  5. Quit Emacs and restart it.
  6. Check that you’re running Org-9.6 with Meta+x org-version

My understanding is that this problem occurs because Org has a builtin version which can easily interfere with a later version that you’re trying to load. It’s a good thing to keep in mind.

Posted in General | Tagged , | Leave a comment

PSA: Beware of Error With Org 9.6

My usual routine is to update my Emacs packages on Sunday. After my last update, I restarted Emacs and Org wouldn’t load, complaining that org-assert-version was an invalid function. After a bit of messing around, I uninstalled Org-9.6 from my Elpa repository and deleted all the files. When I restarted Emacs, I got the builtin version of Org, Org-9.5.5, which worked perfectly.

The Org mailing list has a short thread on the problem but it’s hard to figure out what’s going on. Apparently org-assert-version is intended to deal with the repository being corrupted by files from different versions. There’s been a bit of pushback on org-assert-version and a patch intended to fix the invalid function problem by Bastien also received some pushback so it’s not clear when the issue will be resolved.

I’m pretty certain it’s not a mixed versions problem because I nuked my Org-9.6 repository, did a fresh install, and still got the error. I’m happy enough running 9.5.5 but I do wish this would get resolved.

In the mean time, if you see this problem, just uninstall 9.6 and let the builtin version take over. The Org maintainers are very good at getting things like this fixed so I’m confident that when I do my updates this coming Sunday, the situation will be resolved.

Posted in General | Tagged , | Leave a comment

Howard Abrams On Why You Should Use Eshell

Regular Irreal readers know that I’m a fan of Howard Abrams’ posts and videos on Emacs. Abrams gave a talk at EmacsConf 2022 on the Top 10 reasons why you should be using Eshell. He felt that the talk was a little compressed so he wrote a separate blog post that covers the same material.

I found that the best strategy is to listen to the talk and then read the post to fill in any details that you might have missed in the video. The video ran to 14 minutes so it should be easy to find time for it.

Like much useful software, Eshell is pretty easy for trivial operations but also has powerful, advanced features that are very useful but harder to learn. The canonical example of this is file glob filters. They’re also available in Zshell and I’m always promising myself to learn them but unless I use them all the time I tend to forget the details.

Abrams also demonstrates some of his bespoke code that he uses to make using Eshell easier. For applications that require things like cursor addressing, he uses vterm but for most things he prefers Eshell. The nice thing, he says, is that Eshell is both a shell and an Elisp REPL at the same time. Again, the syntax is a bit different from Bash or Zshell so you need to use it regularly to internalize it.

Spend 14 minutes with the video and if you like what you see, take a look at his blog post. Definitely worthwhile if you do a lot of shell work. And, of course, you can stay in Emacs while you’re doing it.

Posted in General | Tagged | Leave a comment

Zamansky Returns

It’s Advent of Code time again and, as is his wont, Mike Zamansky is meeting the challenge and blogging about his results. Even better, he’s posted a video on his solutions to the first two problems.

The video isn’t about Emacs directly but, of course, all the work is done in Emacs. Because Zamansky mostly uses Clojure for his hobbyist programming, he uses the Cider package for his programming and the video serves as a nice illustration of using Cider and Emacs as a very nice programming environment.

Although the video is nominally about Clojure, his solutions would work, mutatis mutandis, with any Lisp. He uses the threading macros, which although not strictly necessary make things a little clearer. If you program in any of the Lisps, you’ll almost certainly enjoy the video and his solutions to the problems.

Irreal readers know that Zamansky is planning to retire at the end of the Spring semester but if he continues to produce videos like this one, we’ll all be pleased. Even if the videos aren’t specifically about Emacs, it’s useful to see examples of using Emacs to solve real problems. Regardless, enjoy this video and let Zamansky know you liked it so we can guilt encourage him to produce more. I always learn a lot from his videos and hope he produces more.

Posted in General | Tagged | Leave a comment

A Browser-based Org File Viewer

Kiran Gopinathan has built an interesting little app to view Org files in the browser. If you’re like me and want to stay in Emacs as much as possible, you may be wondering anyone would build such a thing. Gopinathan recognizes that and address it in his reddit post announcing the project.

It’s not too hard to imagine using this to share Org files with your unenlightened colleagues who don’t use Emacs. Gopinathan appears to use it as a way of providing a nice presentation of his time tracking data. I’m sure others can think of more applications for something like this.

The GitHub repository has animated GIFs to show the app in action. If you think you might be interested in such a thing, take a look at the GitHub repository. It explains the full functionality with those animated GIFs.

Posted in General | Tagged , | Leave a comment

EmacsConf 2022 Reminder

Just a quick reminder that EmacsConf 2022 is tomorrow and Sunday. If you’re interested in some really good talks about Emacs, you can enjoy the conference from the comfort of your computer/tablet screen.

They’ll also be making the videos available later so you can watch even if you have other obligations or the times are inconvenient when the conference is running.

Posted in General | Tagged | Leave a comment

Iedit Video

Tony Aldon has a short, interesting video on iedit. If you’re not familiar with iedit, you should be. It’s one of my favorite refactoring tools and I use where others might use multiple-cursors or query-replace. Like multiple-cursors, once a piece of text is selected, all matching text is also highlighted and changes to any of the instances is made to all the others.

The selection process is interesting. If you place the cursor on some item, the selection is basically what’s returned by thing-at-point. If you select a region, the text in that region is the selection.

Aldon demonstrated something that I didn’t know about iedit: if you specify a zero prefix, iedit will consider the text in the current function only. That makes it easy to refactor a single function. It turns out that iedit has a lot of functionality so you should check out the doc but almost all uses—at least for me—simply involve selecting some text and calling idedit. Then you can edit all occurrences of that text at once.

I’m not sure why iedit isn’t better known. As I said, I find it one of the most useful refactoring tools. If you haven’t already, you should give it a try. Aldon’s video is more than enough to get you started. If you like what you see, read the doc file to get more information.

Posted in General | Tagged | Leave a comment

Emacs 29 Changes

In yesterday’s post I reported that Eli Zaretskii had cut the Emacs-29 release branch. That was good news because it meant that Emacs 29.1 itself was on its way. Lucien Cartier-Tilet (Phundrak) has a much more comprehensive post that parsed the NEWS file entry and spells out what we can expect with Emacs 29.

The major enhancements are

  • Eglot
  • Tree-sitter
  • Installation from source with package.el
  • Wayland
  • Precompilation of Elisp files
  • Native access to SQLite databases
  • HaikuOS support
  • Major mode for C#

There are also several minor enhancements. You can read all about those and the details of the major enhancements in Phundrak’s post.

Emacs 28 saw the introduction of native compilation and was, therefore, a major release and a huge step forward. Emacs 29 also has several major enhancements and even if you don’t judge it as groundbreaking as Emacs 28, it’s still an important step forward and will bring many important enhancements to our favorite editor.

Be sure to take a look at Phundrak’s post to see what’s coming. As I said in yesterday’s post, Emacs 29.1 is still a ways out but the process is underway and we will soon see the fruits of all the effort that our heroic Emacs developers have devoted to this release.

Posted in General | Tagged | Leave a comment

Emacs-29 Release Branch and Org Mode 9.6

Eli Zaretskii just announced that he’s cut the Emacs-29 release branch. Emacs 29.1 is still some time away; Zaretskii says that’s he’s hoping to have the first pretest in a couple of months. Still, it’s great to see progress being made on the next release.

As always, thanks to Eli and all the other hardworking devs who selflessly donate their time to make all this possible. So much for Emacs being ancient, moribund technology that nobody but a few greybeards care about. From Org mode to Magit to Tree sitter, Emacs is on the cutting edge of editor technology and I have absolute faith that it will stay there.

And speaking of Org mode, Bastien just announced the release of Org mode 9.6, a major release. Follow the link for all the details. Again, thanks to all involved for their work in bringing us update.

Posted in General | Tagged , | Leave a comment

Use Closed/Open Intervals For Programming

In Mathematics, especially Real Analysis and Topology, the use of open and closed intervals is endemic. The open interval \((a,b)\) is the interval \(a < x < b\) while the closed interval \([a,b]\) includes the endpoints: \(a \le x \le b\). There is also the notion of a closed/open interval \([a,b)\): \(a \le x < b\).

You’ve probably noticed that operators in most programming languages operate on closed/open intervals. A common example is the sub string operator, substr say, found in many languages. They all work pretty much the same. The function substr(a,b) specifies the string of bytes starting at byte \(a\) up to but not including byte \(b\). If you’re like me, you’ve probably occasionally found this annoying. If you want bytes 2, 3, and 4, it seems natural to write substr(2,4) rather than substr(2,5).

Fernando Hurtado Cardenas has a post that explains this seeming anomaly. Although using a closed interval seems more logical and has a nice symmetry, it often leads to unexpected edge cases and brittle code with a lot of special cases. The worst thing is that the closed interval works most of the time. It’s those easy to overlook corner cases that trip you up. Cardenas discusses some of those edge cases and offers a pretty good argument that the annoying closed/open interval is the right thing. Take a look at his post. If nothing else, you’ll feel better about those operators using closed/open intervals.

Posted in Programming | Leave a comment