2

I upgraded Org-mode to the latest version on the master branch (according to How to install latest version of org mode?) and now I get this error every few seconds:

Error running timer ‘org-indent-initialize-agent’: (void-function org-time-
add) [8 times]

When I run org-version, I get 9.1.9, instead of the 9.3.3 from the master branch; yet I don't have this problem with just my local version.

What is the problem, and how can I fix it?

0

I found the culprit in opening org files before loading the new version:

(add-to-list 'load-path "~/code/org-mode/lisp")
(require 'org-loaddefs)

In a comment in that thread, I mentioned that the above loading commands failed to load 9.3.3 if I ran (org-version) first, so I suspect that running any org command fixes the Org version to the built-in version of org mode and that loading a more recent version introduces compatibility issues.

When I run the code to load the new Org version before any other Org command, org mode runs fine.

See this answer for details on the mixed installation of built-in and latest versions:

The main idea is that you need to make sure that Org mode is set up, using the new bits that you downloaded only. Emacs comes with a version of Org mode bundled up with it, but that is inevitably older than what is available from the Org mode git repo. It is important to avoid loading any piece from the bundled up version or else you might end up with a "mixed" installation (there are many hits for that on the Org mode mailing list).

As I mention in a comment, and @Tobias has verified in another comment, you do not need to byte-compile the new version - you only need to make autoloads. That creates an org-loaddefs.el file, so that all the common entry points into org will, when first invoked, load the appropriate file first. It is important ... to set the load-path before loading the org-loaddefs.el file: otherwise, you may end up with the dreaded "mixed" install I mentioned above.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.