Skip to content

Set your expectations for your org-mode system

This weekend I set up a Makefile for tangling and weaving one of my org documents. Wanting to automate it for the obvious reasons, I also wanted to have a “fresh” environment for the run. Actually, I was hoping that it would be faster, not just fresher.

Playing with the command line arguments for Emacs, I was stunned to get the tangling down to 30s. Could. Not. Believe. It. Down from 8 minutes! Then, I see the warning:

Insufficient requirements. Expected 8.2.6. Found 7.9.3

(From my memory, didn’t copy and paste it)

Uh oh. I screwed something up. Oops.

Glad I added a check!

All org users should have something like this in their code!

(when (not (version= (org-version) "8.2.6"))
  (display-warning
   'org-mode
   (concat
    "Insufficient requirements. Expected 8.2.6. Found " (org-version))
   :emergency))

There may be more

AddendunM 14-06-09

Thank you SHK and Alexander Baier for pointing out that I should be using version= instead of string-equal.

One Comment

  1. shk wrote:

    Better to use the version<, version<= etc. family of functions than string-equal.

    Monday, June 9, 2014 at 16:17 | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*