Subject: bug#62762: 'make' often errors with "Org version mismatch" after pulling a new version of the code

From: Ihor Radchenko <[email-masked]>
Date: Wed, 12 Apr 2023 09:03:48 +0000

Eli Zaretskii <[email-masked]> writes:

>> I mean, can we detect when the compiler is invoked from "make" in Emacs
>> source?
>
> I guess we ccoul define some environment variable in Lisp/Makefile?

That should be fine.

>> > I guess it means we are on our own, sigh...
>> 
>> You are not. In the worst case, we may add some flag into Org sources
>> that are inside Emacs tree. Something like `org-version-built-in-p' that
>> will be set to t only in the Emacs' version of Org.
>
> And what will that mean when org-version.el bumps its version?

My idea is to change `org-assert-version' in such a way that the check
is completely bypassed when `org-version-built-in-p' is non-nil (of when
some environment variable is set). As I said, `org-assert-version' is
not aiming for built-in Org compilation. Just for Org package
installation.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>