From: Ihor Radchenko <yantar92@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el
Date: Mon, 10 Apr 2023 16:58:00 +0000 [thread overview]
Message-ID: <878rezn087.fsf@localhost> (raw)
In-Reply-To: <u109do$jnb$1@ciao.gmane.io>
Max Nikulin <manikulin@gmail.com> writes:
>> What about creating org-assert-version.el file that will contain
>> something like
>>
>> (if (fboundp 'org-assert-version)
>> (org-assert-version)
>> (warn "<workaround for compilation>"))
>>
>> Then, instead of (org-assert-version) call, we can put
>> (load "org-assert-version.el") in Org libraries.
>
> I believed that the only way to make `org-assert-version' effective is
> to put org version in every Org compiled .elc file, so you suggestion
> makes version check useless.
Hmm. Not completely useless - it will still effectively compare between
Org version in org-version.el and org-assert-version.el. But indeed less
accurate.
> An earlier idea was to put
> `org-assert-version' *definition* to a separate file keeping call in
> each file as one time workaround to ensure that `org-assert-version' is
> defined while compiling when an older Org version is loaded to Emacs < 29.
Does it solve the problem with "make install" on Debian?
> Currently I do not understand:
> - Why presence of .el files in the same directory (old Org version) with
> .elc files affects result of compilation (at least for Emacs-28)?
I may be missing your point, but `load-prefer-newer' maybe?
> - Why even when the `org-assert-version' macro is defined, an error is
> signaled on attempt to load a compiled file with unexpanded
> (org-assert-version) call (a file compiled with warning "the function
> ‘org-assert-version’ is not known")?
This is because `org-assert-version' was not defined in Emacs during
compile time. During compilation, Emacs produces byte code calling a
function. AFAIU, the byte code is equivalent to
(funcall #'org-assert-version), which fails with error (try it with M-:).
> Unfortunately I did not bookmarked discussions containing details
> related to straight.el issues, so I am unsure if the problems are the
> same as for installing from ELPA by package.el.
straight.el has a special arrangement for compiling Org. See
https://github.com/radian-software/straight.el/blob/master/straight.el#L3133
Basically, it spawns a child Emacs process and thus does not struggle
with mixed compilation state. (I am not 100% sure about the "make
install" issue you encountered).
The main issue with straight.el is its design - straight.el has no
equivalent of `package-selected-packages' and instead loads the packages
as they appear in the init.el. It is a problem when some statement has
(require 'org) early in the config, before straight sets up the newer
Org version.
--
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>
next prev parent reply other threads:[~2023-04-10 16:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 7:26 [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el Bastien
2022-12-02 3:38 ` Kyle Meyer
2022-12-02 7:44 ` Bastien
2022-12-03 4:18 ` Kyle Meyer
2022-12-06 3:54 ` David Masterson
2022-12-06 5:44 ` tomas
2022-12-06 7:13 ` David Masterson
2022-12-07 11:43 ` Ihor Radchenko
2022-12-07 14:08 ` Max Nikulin
2023-03-29 13:38 ` Ihor Radchenko
2023-03-29 16:04 ` Max Nikulin
2023-03-29 16:52 ` Ihor Radchenko
2023-04-01 14:44 ` Max Nikulin
2023-04-02 8:35 ` Ihor Radchenko
2023-04-02 15:59 ` Max Nikulin
2023-04-02 16:44 ` Ihor Radchenko
2023-04-04 12:08 ` Max Nikulin
2023-04-04 13:29 ` Ihor Radchenko
2023-04-05 11:41 ` Max Nikulin
2023-04-08 16:47 ` Max Nikulin
2023-04-09 8:29 ` Ihor Radchenko
2023-04-10 6:13 ` Max Nikulin
2023-04-10 16:58 ` Ihor Radchenko [this message]
2023-06-04 10:58 ` Max Nikulin
2022-12-06 3:00 ` David Masterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rezn087.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=manikulin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.