radian-software / radian

🍉 Dotfiles that marry elegance and practicality.
MIT License
491 stars 47 forks source link

Prevent loading of outdated org files #508

Closed haji-ali closed 1 year ago

haji-ali commented 2 years ago

In radian.el, there are two lines that are supposed to prevent loading of outdated org files that come shipped with emacs. https://github.com/radian-software/radian/blob/b86946f9d87060d81dc04c1d00a14c8b9d576739/emacs/radian.el#L689-L690

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.

raxod502 commented 1 year ago

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.)

haji-ali commented 1 year ago

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.

raxod502 commented 1 year ago

No worries!