Straight.el is worth looking into for this. Has served me well for similar use cases. BR Gustav Get Outlook for iOS ________________________________ From: Emacs-orgmode on behalf of Tim Cross Sent: Sunday, March 21, 2021 10:35:00 PM To: emacs-orgmode@gnu.org Subject: Re: trivial software engineering'ish question: switching org's Greg Minshall writes: > hi. i occasionally want to switch from the org package to a git > version, then back again. and, i want to avoid the dread "mixed > installation". > > i'm wondering is there a way people do this other than simply > installing/deleting the package version? > As I understand it, the critical part is when Emacs compiles the org files to get the *.elc versions. Provided you do not have any org functionality loaded during that compilation process, everything should be OK. The 'mixed' versions problem arises because you go to compile a different version and Emacs includes definitions already loaded from another version, generating *.elc files with mixed versions. Once org is compiled, the critical part is having the org version you want show up first in the load-path, so the problem becomes one of just managing the load-path entries appropriately. You could just ensure the version you want is higher in the load-path or you could go the 'paranoid' route and have code which removes the version you don't want from the load-path. In the past, what I've done is have the git version of org in a specific directory which I build with a separate process from the command line using the make recipes in the repository - essentially just configuring and running make. I then have some code in my init.el file which sets that version at the start of my load-path when I want to run it and which I comment out when I just want to run the version installed by package.el. I also use the use-package macro to load my org configuration and have two different blocks for that - one loading the git repo version and one loading the org-plus-contrib version I normally use. I just comment out the one I don't want to use. I probably could write some elisp to automate this, but to be honest, I switch between org versions so rarely, commenting/uncommenting parts of my init.el file is easy enough. I don't do any of that at the moment as I've not needed to run from the git repo since I switched to spacemacs and the spacemacs setup already has the necessary workflow to ensure new versions of org are compiled in a clean environment. Have not yet thought about how I will need to add git based org when using spacemacs. Suspect All I'll need to do is adjust the load-path as part of the init to reference the git sources before any org functionality is loaded. -- Tim Cross