From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uL5iA2X4N2SIQgEASxT56A (envelope-from ) for ; Thu, 13 Apr 2023 14:41:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6HEvA2X4N2S4LAEAauVa8A (envelope-from ) for ; Thu, 13 Apr 2023 14:41:09 +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 708292D61E for ; Thu, 13 Apr 2023 14:41:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmwFG-0003Px-RZ; Thu, 13 Apr 2023 08:40:10 -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 1pmwF9-0003OQ-9z for emacs-orgmode@gnu.org; Thu, 13 Apr 2023 08:40:05 -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 1pmwF2-0001VG-KC for emacs-orgmode@gnu.org; Thu, 13 Apr 2023 08:40:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EA9DD24023E for ; Thu, 13 Apr 2023 14:39:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1681389594; bh=IWsHE12E/vDjJD5NaYLIOsGkcy4XJVkbXqPDwxxBydE=; h=From:To:Cc:Subject:Date:From; b=A2Oj1OOfT7MDCL7wYLJHktSqvr6d+5F9/OuJ21ws/SSpHISjS4kbArol5EM67FGDS vJHDNwulwYez8wex7ZA4wZmMx3bvWE1wlnblcmqMLdLs3Z+tf3S4OWTLbA2zZGASwV OvZVYvPzBwL1L/KwLed5IbBuHMWVSoY7kvfNAMX3uIxoqJRWwSmo7GIiNLUDJjtf4B 2c02tJXenwAHGx4w5tLgLa8Iycu4HWy5VnD29IgIzA0f+YiiwRZutf3eBaWAw8jPkz O1tDcv6w2cEM7JsiOEcxap8dbC1aCGE09N5dZjY0PJSRjm3MmArPil/alFoKgZrS8/ R5Bn3eX74nDtQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PxzgF1Sr4z9rxH; Thu, 13 Apr 2023 14:39:53 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH v2] Add compat.el support to Org (was: [POLL] Use compat.el in Org? (was: Useful package? Compat.el)) In-Reply-To: References: <87sfx7degz.fsf@gmail.com> <87v8ks6rhf.fsf@localhost> <87r0t3gahd.fsf@localhost> <87wn2ujk27.fsf@localhost> <87jzymk3dq.fsf@localhost> Date: Thu, 13 Apr 2023 12:42:23 +0000 Message-ID: <87o7nsdkcw.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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=1681389668; a=rsa-sha256; cv=none; b=PnhGI9BFpNJKzWUttZg4Hnj3/GGypo/Mbv+j8J3M+92NCU8w6d5d+dOEcii39oikK1Ev0Q XJLKbRz0z4irnBolUsfXofNgueiBVngipFEqkh3AJa7DcedyBcBr/ntcNG1/cSHP1dBXMY jvESa1/Ni8EtCDPq2wMJjOcdqq7eFj+Af3ES9Q73Svlb+81ywl4yCl6Q4az14iV8/TtVWb knSzoza31rmn5WG7XPS1pu5S2vCGc4OW/9mvzlSiXTXbW1BQtmc79e3JiETm+eVZ8smNty fW8yk1qmX8RV7T3Zb38DnDfXW0p5HGwuakH1eUSzygXiUOAxm0tVHKYp0ttRow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=A2Oj1OOf; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681389668; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mHbzfNqsdLBz5L4ACpJPMydposh/JPXglrqO8T9izSs=; b=TTwR+Q4iSc0oR9Z7qlmslM+zeTAgUO/KX6d/TrsWZfMauy7GFui/EF0yyEc3vq0QM+dHRC /38L2bN44MK9M1MP4eSA0zqOW1SS3HKnCZoL9ZRbMpXcakrR/lqOTMu2jM3+em1aae+cWw v+Q60EPU3Jgd3e3ZP3aO2pXxmAerSs/WdldmPS440aRecN4KU/TIwH/Bi8CDbTd2N6txU2 Zp+N2KnHkRhNtYyq2rX0vJITqUCiVDzsBx5sMD5zpCz299IOMHViHkclIN+GfYUZxOqB1d LJyG1ASzI7yGWvO/hs6xdLiVZTIAg3FAtBxQyxkfKIgseUBM9isIuBCeyj4PTw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.21 X-Spam-Score: -6.21 X-Migadu-Queue-Id: 708292D61E Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=A2Oj1OOf; 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"; dmarc=pass (policy=none) header.from=posteo.net X-TUID: OUyuEYIBF1c9 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Max Nikulin writes: >> +;; Package-Requires: ((emacs "26.1") (compat "29.1.4.1")) > > Is there a way to express (or (compat "29.1.4.1") (emacs "28.1")) to=20 > avoid installing compat in the case of sufficiently new emacs? E.g.=20 > dpkg/apt allows such alternatives. No, AFAIK: D.8 Conventional Headers for Emacs Libraries =E2=80=98Package-Requires=E2=80=99 If this exists, it names packages on which the current package depends for proper operation. *Note Packaging Basics::. This is used by the package manager both at download time (to ensure that a complete set of packages is downloaded) and at activation time (to ensure that a package is only activated if all its dependencies have been). Its format is a list of lists on a single line. The =E2=80=98car=E2= =80=99 of each sub-list is the name of a package, as a symbol. The =E2=80=98cadr=E2= =80=99 of each sub-list is the minimum acceptable version number, as a string that can be parsed by =E2=80=98version-to-list=E2=80=99. An entry that lac= ks a version (i.e., an entry which is just a symbol, or a sub-list of one element) is equivalent to entry with version "0". For instance: ;; Package-Requires: ((gnus "1.0") (bubbles "2.7.2") cl-lib (seq)) The package code automatically defines a package named =E2=80=98emacs= =E2=80=99 with the version number of the currently running Emacs. This can be used to require a minimal version of Emacs for a package. > Early I asked concerning compat-29.1.3. I would prefer to install=20 > elpa-compat system package to avoid network activity in response to=20 > make. Required version matters for those who builds packages for=20 > backport repositories for various linux distributions. It allows to=20 > decide if it is necessary to provide newer elpa-compat or it is enough=20 > to package elpa-org. We can put older version require now, indeed. However, later we should not constrain ourselves about bumping compat version as necessary. Considering Debian lifecycle, it is pretty much guaranteed that we will require the compat version that is not installed by Debian, eventually. In any case, see the attached additional patch. >> compat.el is required for "compile" target. Compilation will simply fail >> with older Emacs. And "test" triggers "compile". > > There are different types of build systems. Some of them allows to=20 > specify which dependencies should be pulled, some do not. My expectation= =20 > is that make does not attempt to manage dependencies. For me it is OK to= =20 > type an additional command to install them and to fail otherwise. Sure. And you will have such option (EFLAGS). However, I decided to enable auto-downloading by default to not break the previous working compilation instructions. It may, however, be worth documenting EFLAGS in WORG. See the attached patch. > In my opinion > >> + @$(FIND) $(pkgdir) \( -name \*.elc \) -exec $(RM) {} + > > command tells that package management capabilities in Emacs are rather=20 > rudimentary (in comparison to e.g. python toolchain). That is why I am=20 > in favor to more manual dependency management. Notice that I am not=20 > against an option to do it from make. May you elaborate what you mean by "more manual"? What concrete change in the patch do you have in mind? > Untested: > > $(FIND) $(pkgdir) -name \*.elc -delete > > "@" for silencing is intentionally dropped, parenthesis are unnecessary=20 > for single condition. Looks fine, except that now we have part of the targets using $RM variable and part of the targets ignoring it. I am not sure if it is a problem. I am slightly in favour of keeping the existing approach with $RM. >>> default.mk is included from top level Makefile only. >>=20 >> Not sure here. I just noticed that GITVERSION got re-calculated many >> times when looking at debug output of make. (It was slowing things down >> significantly). GITVERSION is in targets.mk though. > > GITVERSION is defined as ?=3D, so it is a variable with deferred=20 > evaluation. Immediately evaluated variable may defined using :=3D That's what I did in one of the patches (use :=3D). >>> pkgdir =3D $(top_builddir)/pkg-deps >>=20 >> How to define top_builddir? If also via `pwd`, I see not much difference. > > I consider it as self-documenting code. Intermediate variable makes it=20 > apparent for readers that the directory is relative to the top of the=20 > package file tree. Agree. Will do. See the attached. > Since out of source tree builds are not supported, I would consider=20 > adding emacs version to path. The idea is to allow keeping installed=20 > packages when switching between several emacs versions. Done. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-mk-default.mk-pkgdir-Make-it-more-clear-that-we-inde.patch >From c5ba5773e69d16930fc12db6fbe0d907fae926cd Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Sat, 8 Apr 2023 19:05:37 +0200 Subject: [PATCH 1/4] mk/default.mk (pkgdir): Make it more clear that we indent to use top git dir * mk/default.mk (top_builddir): New variable storing top-level directory. (pkgdir): Use the new variable. --- mk/default.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mk/default.mk b/mk/default.mk index 67bf96c2e..92a3942da 100644 --- a/mk/default.mk +++ b/mk/default.mk @@ -32,7 +32,8 @@ TMPDIR ?= /tmp testdir = $(TMPDIR)/tmp-orgtest # Where to store Org dependencies -pkgdir := $(shell pwd)/pkg-deps +top_builddir := $(shell pwd) +pkgdir := $(top_builddir)/pkg-deps # Extra flags to be passed to Emacs EFLAGS ?= -- 2.40.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-mk-Separate-third-party-package-dirs-for-different-E.patch >From ddebc0e86b43e655b057927ca9869143232c3ee5 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Ihor Radchenko Date: Mon, 10 Apr 2023 19:57:24 +0200 Subject: [PATCH 2/4] mk: Separate third-party package dirs for different Emacs versions * mk/default.mk (EMACS_VERSION): New variable holding current Emacs version, according to EMACS. (pkgdir_top): New variable holding top pkgdir, parent of per-Emacs version directories. (pkgdir): Set as a sub-directory of pkgdir_top named as Emacs version. * mk/targets.mk (uppkg): Do not clear .elc files. This is no longer needed as we do not need to worry about .elc being used by different Emacs version. (cleanpkg): Update, deleting the whole top pkgdir. --- mk/default.mk | 4 +++- mk/targets.mk | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mk/default.mk b/mk/default.mk index 92a3942da..bd6efeb6f 100644 --- a/mk/default.mk +++ b/mk/default.mk @@ -6,6 +6,7 @@ # Name of your emacs binary EMACS = emacs +EMACS_VERSION := $(shell $(EMACS) -Q --batch --eval '(message "%s" emacs-version)' 2>&1) # Where local software is found prefix = /usr/share @@ -33,7 +34,8 @@ testdir = $(TMPDIR)/tmp-orgtest # Where to store Org dependencies top_builddir := $(shell pwd) -pkgdir := $(top_builddir)/pkg-deps +pkgdir_top := $(top_builddir)/pkg-deps +pkgdir := $(pkgdir_top)/$(EMACS_VERSION) # Extra flags to be passed to Emacs EFLAGS ?= diff --git a/mk/targets.mk b/mk/targets.mk index 072106237..2171159ac 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -105,7 +105,6 @@ endif uppkg:: $(info ========= Installing required third-party packages) @$(MKDIR) -p $(pkgdir) - @$(FIND) $(pkgdir) \( -name \*.elc \) -exec $(RM) {} + -@$(INSTALL_PACKAGES) up0 up1 up2:: @@ -167,4 +166,4 @@ cleantest: } cleanpkg: - -$(RMR) $(pkgdir) + -$(RMR) $(pkgdir_top) -- 2.40.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0003-Makefile-Document-new-targets-in-make-helpall.patch >From a96ccb3b4d8b534e3d5a7bcccada368b0a220b69 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Ihor Radchenko Date: Thu, 13 Apr 2023 14:33:16 +0200 Subject: [PATCH 3/4] * Makefile: Document new targets in make helpall Document the newly added cleanpkg and uppkg targets. --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index f476a3ea7..5e0e0fdff 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,7 @@ helpall:: $(info Cleaning) $(info ========) $(info make clean - remove built Org ELisp files and documentation) + $(info make cleanpkg - remove third-party packages downloaded via make uppkg) $(info make cleanall - remove everything that can be built and all remnants) $(info make clean-install - remove previous Org installation) $(info ) @@ -81,6 +82,7 @@ helpall:: $(info Convenience) $(info ===========) $(info make up0 - pull from upstream) + $(info make uppkg - download third-party packages required for compilation) $(info make up1 - pull from upstream, build and check) $(info make up2 - pull from upstream, build, check and install) $(info make update - pull from upstream and build) -- 2.40.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0004-lisp-org.el-Require-lower-Compat-version.patch >From 0f5b5b445b649d6dda0a2637cc52ef6b6fed90e1 Mon Sep 17 00:00:00 2001 Message-Id: <0f5b5b445b649d6dda0a2637cc52ef6b6fed90e1.1681389559.git.yantar92@posteo.net> In-Reply-To: References: From: Ihor Radchenko Date: Thu, 13 Apr 2023 14:36:42 +0200 Subject: [PATCH 4/4] * lisp/org.el: Require lower Compat version Compat 29.1.3.2 is pre-installed on current Ubuntu 23.04. Do not require later version as it is (1) not yet necessary, (2) will make life slightly easier for people who do not want to download staff unnecessarily. Link: https://list.orgmode.org/orgmode/u09ejk$vi1$1@ciao.gmane.io/ --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 065813acf..26128815f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7,7 +7,7 @@ ;;; org.el --- Outline-based notes management and organizer -*- lexical-binding: ;; Maintainer: Bastien Guerry ;; Keywords: outlines, hypermedia, calendar, wp ;; URL: https://orgmode.org -;; Package-Requires: ((emacs "26.1") (compat "29.1.4.1")) +;; Package-Requires: ((emacs "26.1") (compat "29.1.3.2")) ;; Version: 9.7-pre -- 2.40.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-dev-org-build-system.org-Document-newly-added-target.patch >From 1d90f3459b9a51502dc40d683fafb45803335eb4 Mon Sep 17 00:00:00 2001 Message-Id: <1d90f3459b9a51502dc40d683fafb45803335eb4.1681389714.git.yantar92@posteo.net> From: Ihor Radchenko Date: Thu, 13 Apr 2023 14:32:20 +0200 Subject: [PATCH] * dev/org-build-system.org: Document newly added targets and options (Make Targets =mk/targets.mk=): Document EGLAGS and EPACKAGES variables. (Cleaning): (Compatibility and Convenience): Document cleanpkg and uppkg targets. --- dev/org-build-system.org | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev/org-build-system.org b/dev/org-build-system.org index 37d07fe5..a3a7d8e8 100644 --- a/dev/org-build-system.org +++ b/dev/org-build-system.org @@ -118,6 +118,13 @@ ** Make Targets =mk/targets.mk= be useful in some situations. The following variables are considered stable: +- =EFLAGS= :: Additional flags passed to Emacs executable. Applies to + all targets. +- =EPACKAGES= :: Additional packages to install before compilation. + This is useful to install optional packages for + test suite. The packages will not be installed, if + already available in the ~load-path~ that can be passed + via =EFLAGS=. - =TEST_NO_AUTOCLEAN= :: Define to a non-null value to keep the test directory around for inspection. This is mostly useful for debugging the test suite. @@ -214,6 +221,7 @@ ** Documentation ** Cleaning - =clean= :: Cleans in =lisp/= and =doc/=. +- =cleanpkg= :: Cleans in =pkg-deps/=. - =cleanall= :: Cleans everything that can be cleaned, including several types of backup files, so do not use this when you have active edit sessions! @@ -224,6 +232,7 @@ ** Compatibility and Convenience - =up0= :: Updates the current Git branch from upstream by doing a =git pull=. +- =uppkg= :: Download packages to be available for =make compile=. - =up1= :: Does =up0= and then builds and checks Org. - =up2= :: Does =up1= and installs Org if there was no test error. - =update= :: Does =up0= and then builds Org. Does not test. -- 2.40.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--