radian-software / radian

🍉 Dotfiles that marry elegance and practicality.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevent loading of outdated org files

haji-ali opened this issue · comments

In radian.el, there are two lines that are supposed to prevent loading of outdated org files that come shipped with emacs.

radian/emacs/radian.el

Lines 689 to 690 in b86946f

(straight-register-package 'org)
(straight-register-package 'org-contrib)

This works well if one uses (use-package 'org) to load org. However, if I load a package which requires org using the traditional (require 'org) then the old org packages are loaded instead. This is because the load-path is updated only when (use-package 'org) is called.

What is the correct way to handle this? I currently have the command (use-package 'org) in the top of my local init file, but I am wondering if such a statement should be included in radian instead.

Such a statement is, in fact, included in Radian: https://github.com/raxod502/radian/blob/68e7fd41a20429456a1938430e6e13e6c0a3029b/emacs/radian.el#L4079

You're definitely right about the potential for an edge case where a package loads Org, but doesn't declare a dependency on it. However, this doesn't appear to be the case for any of the packages loaded in Radian, so we should be safe at least in the current state of the world. If you load a package in your local init-file, then it will come in after everything from Radian is loaded, so the Org from straight.el should already be loaded. (Assuming that you're installing your configurations within radian-local-on-hook after-init.)

I honestly can’t remember the issue I was mentioning here. Apologies.

Closing this for now while I investigate. Will reopen if I come up with something.

No worries!