From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +CIfAsg/NGTAmgAASxT56A (envelope-from ) for ; Mon, 10 Apr 2023 18:56:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cMMBAsg/NGSTigAAauVa8A (envelope-from ) for ; Mon, 10 Apr 2023 18:56:40 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 52D95146F1 for ; Mon, 10 Apr 2023 18:56:39 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pluny-0007Ir-Nr; Mon, 10 Apr 2023 12:55:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plunw-0007IX-QB for emacs-orgmode@gnu.org; Mon, 10 Apr 2023 12:55:44 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plunu-0007sX-Di for emacs-orgmode@gnu.org; Mon, 10 Apr 2023 12:55:44 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 59C5124018C for ; Mon, 10 Apr 2023 18:55:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1681145739; bh=xax407SCzOWwIypX/R+gmmPrWJ+FwCkkoIbbpor/4XM=; h=From:To:Cc:Subject:Date:From; b=OfJRwc36MAv0QPc7O+QScAE7Q0d+rRCTe9EqJegH+PtMR8Z+FeZidIFY3DEwUSsvt PIB0VBkLDvEYtcwMXDta02eGDxRK6QigAH/iw99AHgjLaA9pOUeYQk6kF+6F7WA8z3 AGBKCLWugCkr0+BaGHzG3wDp2X2saBrUTprGa+aSno7THm2dycObG8xpY6QXVQVFGV +3P+G5xaezQ/zRYV5yZaylIijSl/bybqPjnZ/sTr86nu9u+EpDTmzeIW/kpJLp1OGu yf+1vHZ/7l62/CeC1o59tkGCsqaT5kzCm2imBfEBwwcFY8E5ZUBeSvQqrQQAjLabpG BRlfTyL5QcgEg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PwFTk6fHdz6tvy; Mon, 10 Apr 2023 18:55:38 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el In-Reply-To: References: <874juewk4k.fsf@kyleam.com> <87r0xi5jx7.fsf@gnu.org> <87o7obn0dp.fsf@localhost> <877cuzmreg.fsf@localhost> <87ile5o3vb.fsf@localhost> Date: Mon, 10 Apr 2023 16:58:00 +0000 Message-ID: <878rezn087.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681145799; a=rsa-sha256; cv=none; b=L+NVoFWxdzRTj9xVem6AMvgKDwIWMzFQOaBfXRZPFsxuo7DVtyjtxkzLgJizUCNnVY5J+7 l/vaeQOnfnrBaA6RebH7t7Ca+Rt1TuUZC1listyN1Q9/Fr36UlQXuVfHejXFNnlSCyvh75 pGWfJnCAmUZW+IIQdC1OaXLKuWThj42xjipnVhQgxnvqS6/cgdrdtDcQccKK9NAHODFsZm jpxW6v3g6YkTB0LPvtttx1xSbZ0xYYcoewlOQjauPh/mO4zuUSP0TvZxhncle//yETZY57 OfKk+yVeUE4pzhIadVZOaL3fzXbDVtL7bZWd9hnbopeHB5ExVm3d22wvYhZVDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OfJRwc36; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681145799; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6PO85hu16E83ik4u6alwah5+/l9mtCfsyl7IsaQGG30=; b=hYXfl71HMGrj+mPgpo4UdouYNHeyoHfo9aXeKdUIOUq3pEDqiTWz9PbZLXlpaeQ85dNvF2 rNtvG2bKOGhW68Sf81BtSJFvN1MQXe40WpuN6spouZYtmmrfL5mT9my9xEAP+E/zRu/inC xmhY3ZT1smgyOFMiXElfiizNAYhvMe9EhOX7E0zdE0jK5cWdJkOwec9gfpI3gQ9TwfR1bN adXciNk01oNndjbnvdrcZuS4sGgnrwwTo9NS6dIGnMevgbttIvmKwnMc0AOKQD0gCWGYsE i+drInxMwjrXdCks9EieGxEPYKtf1y04i2iXeHqIEzGseHdREpCTTPok+/FmFA== X-Migadu-Spam-Score: -4.72 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OfJRwc36; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Spam-Score: -4.72 X-Migadu-Queue-Id: 52D95146F1 X-TUID: jAxnwh699q2O Max Nikulin writes: >> What about creating org-assert-version.el file that will contain >> something like >>=20 >> (if (fboundp 'org-assert-version) >> (org-assert-version) >> (warn "")) >>=20 >> 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=20 > to put org version in every Org compiled .elc file, so you suggestion=20 > 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=20 > `org-assert-version' *definition* to a separate file keeping call in=20 > each file as one time workaround to ensure that `org-assert-version' is=20 > 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= =20 > .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=20 > signaled on attempt to load a compiled file with unexpanded=20 > (org-assert-version) call (a file compiled with warning "the function=20 > =E2=80=98org-assert-version=E2=80=99 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=20 > related to straight.el issues, so I am unsure if the problems are the=20 > 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. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at