vfclists · 2022-11-26 01:19
I am trying to revert Org to version 9.3.8 in one of my profiles, which led me to ask [this question](https://www.reddit.com/r/emacs/comments/z3v5xu/is_there_a_way_to_pin_a_package_to_a_specific/) with the final resolution being [some sort of success](https://www.reddit.com/r/emacs/comments/z3v5xu/is_there_a_way_to_pin_a_package_to_a_specific/ixq8idj/)
No matter what I did the built-in org version seemed to persist until I hid its directory and create a new profile using the lockfile.
This warning seems to be at the heart of the problem
>Warning (straight): Two different recipes given for "org" (:repo cannot be both "https://git.savannah.gnu.org/git/emacs/org-mode.git" and "bzg/org-mode")
Is there some way to redefine the recipe for a package? It seems configuring it to choose one of `melpa` `gnu-elpa`, `git` or some other source must be the way to go.
It i early days for me with straight.
MitchellMarquez42 · 2022-11-26 04:37
If you have something else that depends on Org, straight will load it with the default settings. To avoid this, put everything that depends on Org below it in the init file.
nv-elisp · 2022-11-26 09:16
If you're willing to share your init file, I could more easily diagnose what's happening.
If the built-in version of Org was loaded despite your recipe, that indicates Org may have been loaded prior to straight installing Org. You could add the following to the beginning of your init file to hit the debugger when Org is loaded:
(eval-after-load "Org" '(debug))
The backtrace will show you what caused Org to load.
As /u/MitchellMarquez42 pointed out, when a package is installed its dependencies are installed as well. So if you install a package which depends on Org prior to installing the version of Org you want, a different recipe may be looked up in `straight-recipe-repositories`. Then when you explicitly request Org with your recipe, you get the warning.
It's a common issue (with Org especially because many packages depend on it) that is fixed in [Elpaca](https://github.com/progfolio/elpaca).