Ihor Radchenko <yanta...@gmail.com> writes:
> Tim Cross <theophil...@gmail.com> writes: > >> What would really be needed is some way to check when org is going to be >> compiled that no existing org functionality is loaded. Doubt this can be >> easily done within org itself because of a chicken and egg problem - you >> would have to load org to run the code to check if org is loaded. > > I attached a tentative patch checking if org is loaded. It is not > ideal, but it can capture some scenarios. > > The patch will not work if older org.el is loaded before newer version > of Org. Though we may put extra checks in other lisp files. > > WDYT? > > This is along the lines of what I was thinking. Of course, the big limitation is requirement org.el is not loaded. I would imagine it is rare for org to be loaded and org.el not to be? However, I think this sort of approach i.e. warning if there is an attempt to upgrade org when org is already loaded, is the way to go. Achieving this in a clean and reliable manner is the challenge. False positives are an issue as that would likely prevent legitimate upgrades.