From unknown Mon Aug 18 14:19:45 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#66554 <66554@debbugs.gnu.org> To: bug#66554 <66554@debbugs.gnu.org> Subject: Status: [PATCH] Add the public API of Compat to the core Reply-To: bug#66554 <66554@debbugs.gnu.org> Date: Mon, 18 Aug 2025 21:19:45 +0000 retitle 66554 [PATCH] Add the public API of Compat to the core reassign 66554 emacs submitter 66554 Philip Kaludercic severity 66554 wishlist tag 66554 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 15 05:36:05 2023 Received: (at submit) by debbugs.gnu.org; 15 Oct 2023 09:36:05 +0000 Received: from localhost ([127.0.0.1]:51202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrxXY-0004WT-GZ for submit@debbugs.gnu.org; Sun, 15 Oct 2023 05:36:05 -0400 Received: from lists.gnu.org ([2001:470:142::17]:47758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrxXT-0004Vo-KD for submit@debbugs.gnu.org; Sun, 15 Oct 2023 05:36:03 -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 1qrxWx-00077b-GP for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2023 05:35:27 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrxWu-0001bl-U3 for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2023 05:35:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D1C0A240101 for ; Sun, 15 Oct 2023 11:35:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697362522; bh=tFJyG5aJ7wZoVNA19jJPL/bNpcAiI14BN9R4o8FkOw8=; h=From:To:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=gGK9iPiSXLyyckFyNmOTGlJuR6W8fSs+WFIZQwbJn/8ICzh0ZsuRulwQDnFZGEEfE gOqLv38lUA08PsBmVLD38xP4zMqRJO78QqzVT2+SjR9gACnOgQATnUEb/t5Uo7T+0I eqgIaQMoHM5gOlMszBrgaq/u32qTWhOUc+Wy8GlnxkO6E4j2VTwGzV9g+H0F7kFygn xA66exceeo73hV5CGjIHpYt5e22o0GITdLhD7X93kThwQGobEKs4zMQroEkK6quv+d X240cMSyEz6R4E1fGxBAqAwLhtMuhoYltn+1oDZlbSzXv6uc9tSo2/sfwBfIXArVUp wusG1neFQuYxw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S7Zpy3G1Cz9rxQ for ; Sun, 15 Oct 2023 11:35:22 +0200 (CEST) From: Philip Kaludercic To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add the public API of Compat to the core Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Sun, 15 Oct 2023 09:35:22 +0000 Message-ID: <87pm1ggrdx.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Tags: patch See https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00260.html for the background behind this proposal. In GNU Emacs 30.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-10-13 built on quetzal Repository revision: 97959349651a8fb170c1c754e73a4d86ed24d018 Repository branch: master System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-pgtk --with-imagemagick --with-tree-sitter' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-the-public-API-of-Compat-to-the-core.patch >From 9ab5748d0e93c84c36c5559a4cda2087b3a24560 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 13 Sep 2023 12:26:22 +0200 Subject: [PATCH] Add the public API of Compat to the core * lisp/emacs-lisp/compat.el: Add stub file with minimal definitions, so that core packages, that haven't been installed from ELPA, can make use of the public API and use more recent function signatures. * lisp/progmodes/python.el (compat): Remove 'noerror flag, because Compat can now be required without the real package being available. --- lisp/emacs-lisp/compat.el | 61 +++++++++++++++++++++++++++++++++++++++ lisp/progmodes/python.el | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 lisp/emacs-lisp/compat.el diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el new file mode 100644 index 00000000000..4c60093b6be --- /dev/null +++ b/lisp/emacs-lisp/compat.el @@ -0,0 +1,61 @@ +;;; compat.el --- Pseudo-Compatibility for Elisp -*- lexical-binding: t; -*- + +;; Copyright (C) 2021-2023 Free Software Foundation, Inc. + +;; Author: \ +;; Philip Kaludercic , \ +;; Daniel Mendler +;; Maintainer: \ +;; Daniel Mendler , \ +;; Compat Development <~pkal/compat-devel@lists.sr.ht>, +;; emacs-devel@gnu.org +;; URL: https://github.com/emacs-compat/compat +;; Version: 1.0 +;; Keywords: lisp, maint + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The Compat package on ELPA provides forward-compatibility +;; definitions for other packages. While mostly transparent, a +;; minimal API is necessary whenever core definitions change calling +;; conventions (e.g. `plist-get' can be invoked with a predicate from +;; Emacs 29.1 onward). For core packages on ELPA to be able to take +;; advantage of this functionality, the macros `compat-function' and +;; `compat-call' have to be available in the core, usable even if +;; users do not have the Compat package installed, which this file +;; ensures. + +;; Note that Compat is not a core package and this file is not +;; available on GNU ELPA. + +;;; Code: + +(defmacro compat-function (fun) + "Return compatibility function symbol for FUN. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + `#',fun) + +(defmacro compat-call (fun &rest args) + "Call compatibility function or macro FUN with ARGS. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + (cons fun args)) + +(provide 'compat) +;;; compat.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4b940b3f13b..bf0e27bc786 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -264,7 +264,7 @@ (eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. (require 'treesit) (require 'pcase) -(require 'compat nil 'noerror) +(require 'compat) (require 'project nil 'noerror) (require 'seq) -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 22 15:48:08 2023 Received: (at control) by debbugs.gnu.org; 22 Oct 2023 19:48:08 +0000 Received: from localhost ([127.0.0.1]:48199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1queQh-0006T3-PS for submit@debbugs.gnu.org; Sun, 22 Oct 2023 15:48:08 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:45477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1queQe-0006R3-Kk for control@debbugs.gnu.org; Sun, 22 Oct 2023 15:48:06 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-507b18cf2e1so3460060e87.3 for ; Sun, 22 Oct 2023 12:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698004050; x=1698608850; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=ksnt2g3X/non8Hq/d4hLcr3P49VKejcnLnLx7eLXbvU=; b=aELUjmzha6iYWyulKNFjoHrXdpwSj1ne/WNWiR+bShHsVzVxp/K5o023sURWf2569a itfSlDf0iRFR1o+0aGDJ77W/SdPQQFTCfS/sl4WdSsoNI/G2fcFToWazzggP1N4krJcd Duc5Mfp0unNmXVAr4P4AjZ02OPNq4osKn2mkNHS8fNA9Hj920UPuGZZ8lS6q6yn7Pmaz bnqxmhvvLqjd6+AatnqqpVRSz6qSekepGAr0C3wR8QaRYgdRu1WbUSMtCUsRsrC3Y0RM yoQhTHJBbgiS/3z5/6HUAot6+XrGY6YMqQC03CS0SlO7A1h/IzguYyu2N+kGncQ+o4TM 3sfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698004050; x=1698608850; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ksnt2g3X/non8Hq/d4hLcr3P49VKejcnLnLx7eLXbvU=; b=tTLqT5Lv6jDUcbgHznjDUcIOq4p1UayGozpdr3yaqeUkRpT4Uvp9E1eshQpAdqTAos 39mYzBJ4izkBuSmyLccB/g7WvHuc/z7ucuw27hpj9IyMPIL7AJSQXCBk2zLnyhJjXSEm X8Gvd0dr83Lgs9G5eC6rWzXfNiT5G9b76PsbBhdtTFWDQd377z+ro3pkybF1UmuDPmCu UsagNyODs8WmkwFrX5jS+vZJBr91RfhVQ+BuZOrqXXsQbD31cjDTSMMF7dH4Mf5Cj2la J0CHDfthxf4n+L+wVQSCItq1n+wcSlf/kDPDVbA1YmFobhTI1Mc2D9LcPE2A/r9WKEm+ BApA== X-Gm-Message-State: AOJu0Yw6TFMm9n8Qgr16aJdsbOWRMuS/LzlJrXfyIU61ftlaUxsOQzcT bo7LaZtqLFMTg7r9q5R6/Dhd8LUNt1Uwzqc9fqneoMks/gc= X-Google-Smtp-Source: AGHT+IGlDsVBIS01eLs3J3TjIJFOIsNiqEc8dMNTYQJ62UMPwNRD9n70VQnIbUGmXA7I6dGH6QYlHZyJO1tkDgLTt8A= X-Received: by 2002:a2e:a99d:0:b0:2c0:d21:39de with SMTP id x29-20020a2ea99d000000b002c00d2139demr6569485ljq.42.1698004050187; Sun, 22 Oct 2023 12:47:30 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 22 Oct 2023 12:47:29 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Sun, 22 Oct 2023 12:47:29 -0700 Message-ID: Subject: control message for bug #66554 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 66554 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 10 17:02:10 2024 Received: (at 66554) by debbugs.gnu.org; 10 Jan 2024 22:02:10 +0000 Received: from localhost ([127.0.0.1]:43370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNgeH-0004RY-Lu for submit@debbugs.gnu.org; Wed, 10 Jan 2024 17:02:10 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:42218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNgeF-0004RH-Cz for 66554@debbugs.gnu.org; Wed, 10 Jan 2024 17:02:08 -0500 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5534dcfdd61so8275837a12.0 for <66554@debbugs.gnu.org>; Wed, 10 Jan 2024 14:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704924123; x=1705528923; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=IuSUN2OKZveCib2erTu41b5fN8QqaV+kFwfKQGDOBzQ=; b=hlStahtSDB4jMapU+5suzqjilXzyyjA0hr9aIBjh7Od9vcNsGWNDvqe2cuCkRZBy2e 2EiG+5BkzY3xmfi5XDb0t+/esVMqMl2qh5VOaX+lb6lxz5uVEnuuleRrIzXs0o1IStdG l5T7wnjRRhK0yGE9Hh2KkNRlMoBKHD/iDqPFXebPGu0me0pYIlpk9nkyc6SaMBPtlv7a nL9GRJnJdAfsrdSNLok4lC0+Vq+Zc9KV5eOWEDfl0PyJ5hxVAgARmmO1jCqid6miFmt9 sUfF3kUZ9vkdzxTbFgfuQsZPBoEqQK+BBGZzKDLwI5LlWYOxSk4bOCETCdIhFtuc/vNH dBUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704924123; x=1705528923; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IuSUN2OKZveCib2erTu41b5fN8QqaV+kFwfKQGDOBzQ=; b=cgZ+WNlg5Cf3PfLVpMyW00vreD+PZixzpzL6NEydVu3OIZh8I6URh7ETvdRhdjCHhw kRmQjdaO2X2AUdxIPdi1It2h8rhfyrdgATkeoXttPt2XIaOt+v6GwnBqnYEbZNVGxLfj 3ZYhobvp5nP8T4jbeCcEMUbbwQfB30oTXlGyys6uBRoqCEAxgHNDaXhWEcFEF7Cp69Wr UU9N+KxGorqUh4z1wAq7CW/8gBv2IxE0iUMMb32ijOnHakLhwGUk2p4leGUCbvnOnTAY RF47j/h6G3ioCG85As8zUkwf8iv9wM7lt4rjX9N9kcSQ3eXCpE9hS3e6yhcj+D/qDtLb oxng== X-Gm-Message-State: AOJu0YxttSx5v8fpeV5b/5h1tCqwTK5MqW4b+2uryLrK15q16ZTnJsVS s5JYDpYo0aWPnRlO4RBh17UqcD8Lu1ImD7uS0QM= X-Google-Smtp-Source: AGHT+IHx9YpkePYIylFq0MEZmHe8Fy/g3LK+X5TMOx2RfrblUt2Kdb3K3FKlp+UDNNwCYMemRXWcok7pQe4zPdqQarA= X-Received: by 2002:aa7:c304:0:b0:558:308f:db04 with SMTP id l4-20020aa7c304000000b00558308fdb04mr143389edq.18.1704924122609; Wed, 10 Jan 2024 14:02:02 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 10 Jan 2024 14:02:02 -0800 From: Stefan Kangas In-Reply-To: <87pm1ggrdx.fsf@posteo.net> (Philip Kaludercic's message of "Sun, 15 Oct 2023 09:35:22 +0000") References: <87pm1ggrdx.fsf@posteo.net> MIME-Version: 1.0 Date: Wed, 10 Jan 2024 14:02:02 -0800 Message-ID: Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core To: Philip Kaludercic Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > See https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00260.html > for the background behind this proposal. I'm fine with this, and see the same benefits as described above. I'd like to hear if Eli and Stefan M has anything to add, though, so I'm copying them in here. > From 9ab5748d0e93c84c36c5559a4cda2087b3a24560 Mon Sep 17 00:00:00 2001 > From: Philip Kaludercic > Date: Wed, 13 Sep 2023 12:26:22 +0200 > Subject: [PATCH] Add the public API of Compat to the core > > * lisp/emacs-lisp/compat.el: Add stub file with minimal definitions, > so that core packages, that haven't been installed from ELPA, can make > use of the public API and use more recent function signatures. > * lisp/progmodes/python.el (compat): Remove 'noerror flag, because > Compat can now be required without the real package being available. > --- > lisp/emacs-lisp/compat.el | 61 +++++++++++++++++++++++++++++++++++++++ > lisp/progmodes/python.el | 2 +- > 2 files changed, 62 insertions(+), 1 deletion(-) > create mode 100644 lisp/emacs-lisp/compat.el > > diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el > new file mode 100644 > index 00000000000..4c60093b6be > --- /dev/null > +++ b/lisp/emacs-lisp/compat.el > @@ -0,0 +1,61 @@ > +;;; compat.el --- Pseudo-Compatibility for Elisp -*- lexical-binding: t; -*- > + > +;; Copyright (C) 2021-2023 Free Software Foundation, Inc. > + > +;; Author: \ > +;; Philip Kaludercic , \ > +;; Daniel Mendler > +;; Maintainer: \ > +;; Daniel Mendler , \ > +;; Compat Development <~pkal/compat-devel@lists.sr.ht>, > +;; emacs-devel@gnu.org > +;; URL: https://github.com/emacs-compat/compat > +;; Version: 1.0 > +;; Keywords: lisp, maint > + > +;; This program is free software; you can redistribute it and/or modify > +;; it under the terms of the GNU General Public License as published by > +;; the Free Software Foundation, either version 3 of the License, or > +;; (at your option) any later version. > + > +;; This program is distributed in the hope that it will be useful, > +;; but WITHOUT ANY WARRANTY; without even the implied warranty of > +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;; GNU General Public License for more details. > + > +;; You should have received a copy of the GNU General Public License > +;; along with this program. If not, see . > + > +;;; Commentary: > + > +;; The Compat package on ELPA provides forward-compatibility > +;; definitions for other packages. While mostly transparent, a > +;; minimal API is necessary whenever core definitions change calling > +;; conventions (e.g. `plist-get' can be invoked with a predicate from > +;; Emacs 29.1 onward). For core packages on ELPA to be able to take > +;; advantage of this functionality, the macros `compat-function' and > +;; `compat-call' have to be available in the core, usable even if > +;; users do not have the Compat package installed, which this file > +;; ensures. > + > +;; Note that Compat is not a core package and this file is not > +;; available on GNU ELPA. > + > +;;; Code: > + > +(defmacro compat-function (fun) > + "Return compatibility function symbol for FUN. > +This is a pseudo-compatibility stub for core packages on ELPA, > +that depend on the Compat package, whenever the user doesn't have > +the package installed on their current system." > + `#',fun) > + > +(defmacro compat-call (fun &rest args) > + "Call compatibility function or macro FUN with ARGS. > +This is a pseudo-compatibility stub for core packages on ELPA, > +that depend on the Compat package, whenever the user doesn't have > +the package installed on their current system." > + (cons fun args)) > + > +(provide 'compat) > +;;; compat.el ends here > diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el > index 4b940b3f13b..bf0e27bc786 100644 > --- a/lisp/progmodes/python.el > +++ b/lisp/progmodes/python.el > @@ -264,7 +264,7 @@ > (eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. > (require 'treesit) > (require 'pcase) > -(require 'compat nil 'noerror) > +(require 'compat) > (require 'project nil 'noerror) > (require 'seq) From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 01:51:45 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 06:51:45 +0000 Received: from localhost ([127.0.0.1]:58482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNoum-0000Cz-Pd for submit@debbugs.gnu.org; Thu, 11 Jan 2024 01:51:45 -0500 Received: from server.qxqx.de ([49.12.34.165]:57055 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNoui-0000Ch-B5 for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 01:51:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3Vzci7PWtyqNexsxWxDIsxQjaam3kSqUYfHcuyr7DIo=; b=Vct42dB+YXutLbZeMXtd2Y5WoD tMGRtYEPLbLgBCB5oZsq5qglZo+WBtUwOAFiQul931uOGw/OKtQwFa3rZCvR6BtcZnn67hRDrLWGn Ep7IIcOZW8Uj1MRITk+GJmUNXZWSIrIp6j1EgSwIwymsafsYUpOg+QDu/RqysJjKPY0Y=; From: Daniel Mendler To: Stefan Kangas Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: (Stefan Kangas's message of "Wed, 10 Jan 2024 14:02:02 -0800") References: <87pm1ggrdx.fsf@posteo.net> Date: Thu, 11 Jan 2024 06:27:59 +0100 Message-ID: <87bk9scucg.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , eliz@gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > Philip Kaludercic writes: > >> See https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00260.html >> for the background behind this proposal. > > I'm fine with this, and see the same benefits as described above. > > I'd like to hear if Eli and Stefan M has anything to add, though, so I'm > copying them in here. Thanks. I also want to make sure that we specify the Compat version somewhere in the package builtins, such that Compat won't be installed if it is not needed, e.g., when a package requires (compat "30.1.x") and is installed on Emacs 30. Philip, what is needed to achieve this? It seems to me that this is not yet handled in the proposed patch. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 02:55:06 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 07:55:06 +0000 Received: from localhost ([127.0.0.1]:58602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNpu5-0004Qz-O1 for submit@debbugs.gnu.org; Thu, 11 Jan 2024 02:55:06 -0500 Received: from mout02.posteo.de ([185.67.36.66]:55809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNpu3-0004QO-Ns for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 02:55:04 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 947A2240105 for <66554@debbugs.gnu.org>; Thu, 11 Jan 2024 08:55:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1704959700; bh=phFLWon7VJQvGmQBPZg/u6mUurjz8ZZ+NFZ4rf8e+m8=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=RvHaihiaqPuU3oJtTyTukyFxVHtwyTZaZfHfVfv6q6TX/v5FYz85g+g2JMChLwblN H23chT3gYXMwg3EG1Jn3uANyJDTtJ3kXawtZsnMmYik/A12BWvtDjY4+oTKIA2P2VI Kui9WNltMrotB6Y5nv7vyxF+dv3GyCd6+USQ542iwrfPcRReiMrD4qAQ/nyfeE79TJ K9ZKR3OjKEeyEfNuMC2cGqaCJGV7Hu/j1fteBk4gBV+INLiqpcX6HDOJ2V+RjyD6f6 3cW84LQWVkxmbvlOsH5r/GIfK9YlCYjV0xmUQHgLcVPQDE+SIxvBuDIubt/D4LXky4 nAwE9vVzHhWCg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T9cQW0b9Nz6tmv; Thu, 11 Jan 2024 08:54:58 +0100 (CET) From: Philip Kaludercic To: Daniel Mendler Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87bk9scucg.fsf@daniel-mendler.de> (Daniel Mendler's message of "Thu, 11 Jan 2024 06:27:59 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 11 Jan 2024 07:54:58 +0000 Message-ID: <87y1cwpanh.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Kangas , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Daniel Mendler writes: > Stefan Kangas writes: > >> Philip Kaludercic writes: >> >>> See https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00260.html >>> for the background behind this proposal. >> >> I'm fine with this, and see the same benefits as described above. >> >> I'd like to hear if Eli and Stefan M has anything to add, though, so I'm >> copying them in here. > > Thanks. I also want to make sure that we specify the Compat version > somewhere in the package builtins, such that Compat won't be installed > if it is not needed, e.g., when a package requires (compat "30.1.x") and > is installed on Emacs 30. Philip, what is needed to achieve this? It > seems to me that this is not yet handled in the proposed patch. If I am not mistaken, all we would have to do is to adjust the version number in the patch to the current Emacs version -- and update it whenever Emacs is updated. I have a slight concern that this could be easily forgotten, if it isn't hooked into some update scripts. > Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 03:06:43 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 08:06:43 +0000 Received: from localhost ([127.0.0.1]:58651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNq5K-0007Qq-Q9 for submit@debbugs.gnu.org; Thu, 11 Jan 2024 03:06:43 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:36989 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNq5G-0007QT-7Z for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 03:06:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tLGrYyKpFipQAzqLAi+bXtrshJWZio2Mk0cAR5Jt9DQ=; b=wsa02ZrGUPHcUh1JAmXq0ZsB9E 6C0QuK4vzD6k5zqANnuKPajX2fPeo80vcoYOKoj3e7sNRkAI288zuyOYGKyQG5MH633uvUhqc4300 /EenDUqkXFWpC4PlY4KRb/38hWBmXJ+xhLE65b5I+jk2CTYX/8PFUeNqXpjEPLi8wiCo=; From: Daniel Mendler To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87y1cwpanh.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 11 Jan 2024 07:54:58 +0000") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> Date: Thu, 11 Jan 2024 09:06:34 +0100 Message-ID: <877ckgpa45.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Kangas , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: >> Thanks. I also want to make sure that we specify the Compat version >> somewhere in the package builtins, such that Compat won't be installed >> if it is not needed, e.g., when a package requires (compat "30.1.x") and >> is installed on Emacs 30. Philip, what is needed to achieve this? It >> seems to me that this is not yet handled in the proposed patch. > > If I am not mistaken, all we would have to do is to adjust the version > number in the patch to the current Emacs version -- and update it > whenever Emacs is updated. I have a slight concern that this could be > easily forgotten, if it isn't hooked into some update scripts. Okay, I see. The specified version should probably be something like 30.1.999 to make sure that packages requiring any Compat 30.1.x version will not download the ELPA package? Is there a place where we could add a warning to make sure that bumping the version won't be forgotten? Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 05:32:51 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 10:32:51 +0000 Received: from localhost ([127.0.0.1]:58789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNsMl-0004Sl-AW for submit@debbugs.gnu.org; Thu, 11 Jan 2024 05:32:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNsMj-0004SX-ED for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 05:32:50 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNsMf-00052K-IQ; Thu, 11 Jan 2024 05:32:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QAqESWq1a8/WuxIQv5cXPfwCPKmJ2Ku4NJjOeB4LXs8=; b=T7IWrdmR1g2B IiX3awOdzPzO2fFSzX8eQz546Ci1eM44dRBq/xuKBGarofMdqzkRiWtMqLlrvKqQvcyC28NxjP13m FrblnSwOyQDmLpyRQ10ZlCkfSP37leDmoNLK2oHvnC5lS4XBifV2ZQ4gpv9BMtSZNbGKvRHBF2XGl BJU/igGQRqMsVZsVJIylpO0eNmYq/L1c8GU1VRRiStRXyU4Iezn6vWB1A3fDmyGinSkNKuUGEp6+6 HvEdB3VcxI+7ujDZ+kmjNIwteleh+9lEiE9J82RjpV2ynk+80dkdA0eo5eebwPHFa7AMJ2pmgbO0k yQXrbtTPAS8dTruN9TDgJg==; Date: Thu, 11 Jan 2024 12:32:19 +0200 Message-Id: <83y1cwkvnw.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Wed, 10 Jan 2024 14:02:02 -0800) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Wed, 10 Jan 2024 14:02:02 -0800 > Cc: 66554@debbugs.gnu.org, eliz@gnu.org, > Stefan Monnier > > Philip Kaludercic writes: > > > See https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00260.html > > for the background behind this proposal. > > I'm fine with this, and see the same benefits as described above. > > I'd like to hear if Eli and Stefan M has anything to add, though, so I'm > copying them in here. I don't mind, but it sounds like the details of adding compat.el to core are not yet clear to all, and are still being discussed. Also, it sounds like we would need to modify compat.el for every release or something? if so, this should be in make-tarball.txt. It might be also a good idea to mention this in the ELisp manual somewhere. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 12:35:11 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 17:35:11 +0000 Received: from localhost ([127.0.0.1]:33763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNyxS-0007ll-HT for submit@debbugs.gnu.org; Thu, 11 Jan 2024 12:35:11 -0500 Received: from mout02.posteo.de ([185.67.36.66]:60573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNyxP-0007l8-Ia for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 12:35:09 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E8F39240105 for <66554@debbugs.gnu.org>; Thu, 11 Jan 2024 18:35:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1704994503; bh=iqBrWAcyR5PkI9jUZqRpRnpmL2CIWoicqBgRw1YvmWw=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=CYZ26klI7JSPE1X3nigtv/KYOZ7w4WWjmEzO8o7qS/4c5vg/pPrZkgpwGn9Z0QpU8 RprYO2NDfRFNg6Vp7xurJ5ktVCKfb+KNHj0hYFVe7DFcrSL7F+dtg2W9631OYxM6JS IviSzCv161ix9q9E26fTRoTySPB/M/kB/Kqa3chz+dLbbAU3g4yQeZ92SnFF7HynNj 1ZEsC3igNP1b16b3zh5nD4Pf5DUWk/p5tV3xfWXPN9z4zy755I29VaihVn7yfxsWAf W35Hf9Exr7n9BSW2VHZZT/SUvIa+GoDfuV1W1Dqvfl+ecBe928HAGrybbwhr9ROzdp EIJkKMPFIqDVw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T9sHp4y9Lz9rxD; Thu, 11 Jan 2024 18:35:02 +0100 (CET) From: Philip Kaludercic To: Daniel Mendler Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <877ckgpa45.fsf@daniel-mendler.de> (Daniel Mendler's message of "Thu, 11 Jan 2024 09:06:34 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 11 Jan 2024 17:35:00 +0000 Message-ID: <87mstbpyd7.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Kangas , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Daniel Mendler writes: > Philip Kaludercic writes: >>> Thanks. I also want to make sure that we specify the Compat version >>> somewhere in the package builtins, such that Compat won't be installed >>> if it is not needed, e.g., when a package requires (compat "30.1.x") and >>> is installed on Emacs 30. Philip, what is needed to achieve this? It >>> seems to me that this is not yet handled in the proposed patch. >> >> If I am not mistaken, all we would have to do is to adjust the version >> number in the patch to the current Emacs version -- and update it >> whenever Emacs is updated. I have a slight concern that this could be >> easily forgotten, if it isn't hooked into some update scripts. > > Okay, I see. The specified version should probably be something like > 30.1.999 to make sure that packages requiring any Compat 30.1.x version > will not download the ELPA package? Because of (version< "30.1" "30.1.1") we can just set it to the actual Emacs version. > Is there a place where we could add a warning to make sure that bumping > the version won't be forgotten? I think that admin/admin.el's `set-version' could be used like this: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/admin/admin.el b/admin/admin.el index 7fa2727aeb7..b8a9b41350a 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -115,6 +115,10 @@ set-version (set-version-in-file root "nt/README.W32" version (rx (and "version" (1+ space) (submatch (1+ (in "0-9.")))))) + (set-version-in-file root "lisp/emacs-lisp/compat.el" version + (rx (and bol ";; Version : " (1+ space) + (submatch (1+ (in "0-9.")))))) + ;; TODO: msdos could easily extract the version number from ;; configure.ac with sed, rather than duplicating the information. (set-version-in-file root "msdos/sed2v2.inp" version --=-=-= Content-Type: text/plain > Daniel Eli Zaretskii writes: >> From: Stefan Kangas >> Date: Wed, 10 Jan 2024 14:02:02 -0800 >> Cc: 66554@debbugs.gnu.org, eliz@gnu.org, >> Stefan Monnier >> >> Philip Kaludercic writes: >> >> > See https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00260.html >> > for the background behind this proposal. >> >> I'm fine with this, and see the same benefits as described above. >> >> I'd like to hear if Eli and Stefan M has anything to add, though, so I'm >> copying them in here. > > I don't mind, but it sounds like the details of adding compat.el to > core are not yet clear to all, and are still being discussed. Also, > it sounds like we would need to modify compat.el for every release or > something? if so, this should be in make-tarball.txt. As mentioned above, I think this could be automated. > It might be also a good idea to mention this in the ELisp manual > somewhere. This being "Compat"? --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 12:58:27 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 17:58:28 +0000 Received: from localhost ([127.0.0.1]:33833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNzJz-0002j5-Fo for submit@debbugs.gnu.org; Thu, 11 Jan 2024 12:58:27 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:58803 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNzJx-0002it-55 for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 12:58:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e55tOw2YGPTOBQHlNMNwZweelIqnUl1bPV9j91qkwIk=; b=TW5VdF84EIRpm+0M29WzmtLR4r sRpqRJD8521pKd8o+fstpjwZprv4qszBh68GC8DblSOBB+6KrGPnLSns8b6ny7efNpw2pijkZ7/c+ JToR/slSXv7SOU0aBr+k6kf8ScKh20Ajg9FoaQ4cALq4B8cc+FDAFu5F16gBSQCYpY90=; From: Daniel Mendler To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87mstbpyd7.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 11 Jan 2024 17:35:00 +0000") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> Date: Thu, 11 Jan 2024 18:58:19 +0100 Message-ID: <87h6jjah1g.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Kangas , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: >>> If I am not mistaken, all we would have to do is to adjust the version >>> number in the patch to the current Emacs version -- and update it >>> whenever Emacs is updated. I have a slight concern that this could be >>> easily forgotten, if it isn't hooked into some update scripts. >> >> Okay, I see. The specified version should probably be something like >> 30.1.999 to make sure that packages requiring any Compat 30.1.x version >> will not download the ELPA package? > > Because of > > (version< "30.1" "30.1.1") > > we can just set it to the actual Emacs version. No. We want a version larger than any Compat version corresponding to the current Emacs version. For example when there is compat-31.1.1.7 on ELPA and Magit depends on compat>=31.1 and Magit is installed on an Emacs 31.1, Compat should not be installed, since the builtin Compat already satisfies the dependency. However if Magit is installed on an Emacs 30.2, compat-31.1.1.7 should be installed. This means the internal Compat version on Emacs 30.1 should be like 30.1.9999, or another large enough version. >> Is there a place where we could add a warning to make sure that >> bumping the version won't be forgotten? > > I think that admin/admin.el's `set-version' could be used like this: > >> I don't mind, but it sounds like the details of adding compat.el to >> core are not yet clear to all, and are still being discussed. Also, >> it sounds like we would need to modify compat.el for every release or >> something? if so, this should be in make-tarball.txt. > > As mentioned above, I think this could be automated. I agree, it would be good to automate the version bump, such that it cannot be forgotten. >> It might be also a good idea to mention this in the ELisp manual >> somewhere. > > This being "Compat"? It makes sense to also mention Compat in the Elisp manual and refer to the Compat manual on ELPA. There we already document Compat usage for Emacs core packages, which should be updated accordingly (https://elpa.gnu.org/packages/doc/compat.html#Usage). Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 14:24:19 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 19:24:19 +0000 Received: from localhost ([127.0.0.1]:33925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO0f5-0004FW-58 for submit@debbugs.gnu.org; Thu, 11 Jan 2024 14:24:19 -0500 Received: from mout01.posteo.de ([185.67.36.65]:39509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO0f1-0004FI-Rs for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 14:24:17 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 95E30240027 for <66554@debbugs.gnu.org>; Thu, 11 Jan 2024 20:24:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705001052; bh=Q9cHS4F5NZoBg8J/D7Xsv8WC40mH0J4og3fVCkwILJQ=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=a7zS5J/9dcQ/eKKjwEJvBO3cTclsUhJDvCAei2TBK6D5yLfOGVSPHv4BZo+6Zvbo6 MDvSCoJY2fLJW2drZUJKl7LMYUE9K1jzbcwN5yERypKXgoAeLr9CkJZ0hvZdOrt0A/ d6h3zEg/tv8GUEfMNf8l/iflQFnIdxwl1qvg98zQzkrlkaa0L+XY+MiBB87fS2HyQr F+5bx8nd4+1EpTgOvUr7l54s3Emq1kAofLBLkEg+mYNdWiDFP7uuF0N3FocqLQLGDK WuU9yxvcbGRxdHHgH/1QUkXwvji4jfDlRnhBO6uBcVj9CV9W0yndbUaC8u4uGT/hKd 8J31TzoXp74Gg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T9vjl2cH8z9rxK; Thu, 11 Jan 2024 20:24:10 +0100 (CET) From: Philip Kaludercic To: Daniel Mendler Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87h6jjah1g.fsf@daniel-mendler.de> (Daniel Mendler's message of "Thu, 11 Jan 2024 18:58:19 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 11 Jan 2024 19:24:09 +0000 Message-ID: <87edenptba.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Kangas , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Daniel Mendler writes: > Philip Kaludercic writes: >>>> If I am not mistaken, all we would have to do is to adjust the version >>>> number in the patch to the current Emacs version -- and update it >>>> whenever Emacs is updated. I have a slight concern that this could be >>>> easily forgotten, if it isn't hooked into some update scripts. >>> >>> Okay, I see. The specified version should probably be something like >>> 30.1.999 to make sure that packages requiring any Compat 30.1.x version >>> will not download the ELPA package? >> >> Because of >> >> (version< "30.1" "30.1.1") >> >> we can just set it to the actual Emacs version. > > No. We want a version larger than any Compat version corresponding to > the current Emacs version. For example when there is compat-31.1.1.7 on > ELPA and Magit depends on compat>=31.1 and Magit is installed on an > Emacs 31.1, Compat should not be installed, since the builtin Compat > already satisfies the dependency. However if Magit is installed on an > Emacs 30.2, compat-31.1.1.7 should be installed. This means the internal > Compat version on Emacs 30.1 should be like 30.1.9999, or another large > enough version. My bad I mixed up what we wanted to achieve, in that case we could make use of `version-regexp-alist' might make this --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/subr.el b/lisp/subr.el index df28989b399..f5de5c3becf 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -6873,9 +6873,9 @@ version-separator Usually the separator is \".\", but it can be any other string.") - (defconst version-regexp-alist - '(("^[-._+ ]?snapshot$" . -4) + `(("^[-._+ ]?hyper$" . ,most-positive-fixnum) + ("^[-._+ ]?snapshot$" . -4) ;; treat "1.2.3-20050920" and "1.2-3" as snapshot releases ("^[-._+]$" . -4) ;; treat "1.2.3-CVS" as snapshot release --=-=-= Content-Type: text/plain so that (version< "30.1.hyper" "30.1.0.1") => nil (version< "30.1.0.1" "30.1.hyper") => t > >>> Is there a place where we could add a warning to make sure that >>> bumping the version won't be forgotten? >> >> I think that admin/admin.el's `set-version' could be used like this: >> >>> I don't mind, but it sounds like the details of adding compat.el to >>> core are not yet clear to all, and are still being discussed. Also, >>> it sounds like we would need to modify compat.el for every release or >>> something? if so, this should be in make-tarball.txt. >> >> As mentioned above, I think this could be automated. > > I agree, it would be good to automate the version bump, such that it > cannot be forgotten. > >>> It might be also a good idea to mention this in the ELisp manual >>> somewhere. >> >> This being "Compat"? > > It makes sense to also mention Compat in the Elisp manual and refer to > the Compat manual on ELPA. There we already document Compat usage for > Emacs core packages, which should be updated accordingly > (https://elpa.gnu.org/packages/doc/compat.html#Usage). Right, I agree. > Daniel --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 14:35:35 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 19:35:35 +0000 Received: from localhost ([127.0.0.1]:33941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO0py-0007DH-Qn for submit@debbugs.gnu.org; Thu, 11 Jan 2024 14:35:35 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:51654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO0pv-0007D2-Qu for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 14:35:33 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-55790581457so6135789a12.3 for <66554@debbugs.gnu.org>; Thu, 11 Jan 2024 11:35:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705001728; x=1705606528; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=Iso4hUTUow4qHptU+qyguQY1XngaTgfu256qdryqM4o=; b=lGh/2LJ2AQjpdWackBbtJuzE6QQFTvdTzXOhW7wrh5xCNazhm8AT2uqRF2nLCNxOtA puJfV4xSjkIltYOHfLwevjlVbBw7Zi471n7RK3FVLNdOjQFlXX2lKI8a+mO/ZE0Friql XkZpR4rtIhcb4xETw6ycy73dsU8hgnp+CW7GAo78jOsh6hUXQhtEKlEhVbx8wFfQAJqU 0n8BI5NWLxUz09jgdwfupmF3PfMAu0pgVD1Pl3ccAa/isok2tNspCKIkO4ZTMjjYYhA3 PdgBLCiQIeBn0pawhRoWGV/YdPkfEMPRSc0az1HTBAqi8lPrERldSxWlxkCL+CsdUqQM XVeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705001728; x=1705606528; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Iso4hUTUow4qHptU+qyguQY1XngaTgfu256qdryqM4o=; b=dZnNSvi+DwTKWtZF1MvaQA6xZcSWQzKRQR+B9IaRuvGqeAJCmce+xgHmCLsdK9PK2y 77WZHSdFZY4Geodq9bQPAg0bDqI/Yg7ZKr2Q5cFAhxNjWYs6w6MJXrh+n5g6BPZkYGd6 YffLfh4mwMmj5VMX8cfYrFaZw14Dq3bDpT7+LANt89p/6uXJPeSfjrR8AXR5K6Q1zwEc UX1Mj9p+TX3GdJ+a2B0PATUgD7klKxUlpFitlwBPQQxA5JYTmriAYsN9e1cMxQ/7eH/V c8slAV7/PoocKTm078I99Blr6nyf+9Pbu0lUWWDi7KUcbrHFQtflTS8Ys+GQJSG7n7dF pKkQ== X-Gm-Message-State: AOJu0YzpL66+tU3U7c1/bLcxOmE1lxrB3enSoAysVaez/MXLivLskNjg dx1bwGPvd+6FMsqEfxh3VFEPjtqjxZeUu+EVQgGR8yt5afs= X-Google-Smtp-Source: AGHT+IFumV0zX3iZ1w9PqscvsLvQm4Qx2I/imBkE7EMBfqHgz1s7CV9KYn5S32pErRQn5UhzU89dlY7rMrtScGtruVA= X-Received: by 2002:a05:6402:4315:b0:557:523e:c1ff with SMTP id m21-20020a056402431500b00557523ec1ffmr100299edc.76.1705001728246; Thu, 11 Jan 2024 11:35:28 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 11 Jan 2024 11:35:28 -0800 From: Stefan Kangas In-Reply-To: <83y1cwkvnw.fsf@gnu.org> References: <87pm1ggrdx.fsf@posteo.net> <83y1cwkvnw.fsf@gnu.org> MIME-Version: 1.0 Date: Thu, 11 Jan 2024 11:35:28 -0800 Message-ID: Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > I don't mind, but it sounds like the details of adding compat.el to > core are not yet clear to all, and are still being discussed. OK, thanks. There's no rush here, I think. I hope that people will speak up so that we can get a handle on those details. > Also, it sounds like we would need to modify compat.el for every > release or something? if so, this should be in make-tarball.txt. > > It might be also a good idea to mention this in the ELisp manual > somewhere. Philip, could you take a look at this and amend the patch accordingly? Thanks in advance. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 15:07:51 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 20:07:51 +0000 Received: from localhost ([127.0.0.1]:33986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1LC-00050o-ST for submit@debbugs.gnu.org; Thu, 11 Jan 2024 15:07:51 -0500 Received: from mout02.posteo.de ([185.67.36.66]:43449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1L8-00050X-Ct for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 15:07:49 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 36733240101 for <66554@debbugs.gnu.org>; Thu, 11 Jan 2024 21:07:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705003663; bh=6VyauT1wskRmDDzDPbCC0x74+ZLCTqjy/t/8Ex1i84M=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=gWZbUT85M+hiOVRRDe4lmEWHrkcE2k8trZL/fLj7wdQvOLz9wcNnQKrUqZ6i0Yo9f YUpFsDV2jTflaoruWlo+nJhDZ9Vm9oASaDmWsC+e+s5Ji7WCeMvrsGMGvkncVLAZ03 CQcAde+FWRa1eggGAoNz0+obicEzazkx+G35v6Jf5s5F+ybF6tl+/y+I1zcXX9YUoe LGIYQrCWxy9rMQK9PjS+3IxoW8Eol211r+Uv3DiAbzdQnFYBL2BwnHxK2FWOildUbM ot66vHxx3Hju32YxbFhYcGfe4a1zotr225mI1U4P40vJPPc+enLunrIuK6Kmlu+rqd bY9M6yNZVXY6w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T9wgy1V5Hz6twd; Thu, 11 Jan 2024 21:07:41 +0100 (CET) From: Philip Kaludercic To: Stefan Kangas Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: (Stefan Kangas's message of "Thu, 11 Jan 2024 11:35:28 -0800") References: <87pm1ggrdx.fsf@posteo.net> <83y1cwkvnw.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 11 Jan 2024 20:07:41 +0000 Message-ID: <87a5pbpraq.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Stefan Kangas writes: > Eli Zaretskii writes: > >> I don't mind, but it sounds like the details of adding compat.el to >> core are not yet clear to all, and are still being discussed. > > OK, thanks. There's no rush here, I think. I hope that people will > speak up so that we can get a handle on those details. > >> Also, it sounds like we would need to modify compat.el for every >> release or something? if so, this should be in make-tarball.txt. >> >> It might be also a good idea to mention this in the ELisp manual >> somewhere. > > Philip, could you take a look at this and amend the patch accordingly? > Thanks in advance. This would integrate my previous two suggestions: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-the-public-API-of-Compat-to-the-core.patch >From 83743d8c407cf5ef8a34816b88e9b28d890bc7f6 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 13 Sep 2023 12:26:22 +0200 Subject: [PATCH] Add the public API of Compat to the core * lisp/emacs-lisp/compat.el: Add stub file with minimal definitions, so that core packages, that haven't been installed from ELPA, can make use of the public API and use more recent function signatures. * lisp/progmodes/python.el (compat): Remove 'noerror flag, because Compat can now be required without the real package being available. * admin/admin.el (set-version): Update the version in the package header when setting the version. * lisp/subr.el (version-regexp-alist): Add non-numeric version string "compat", to ensure that the build-in compat is always preferred. (Bug#66554) --- admin/admin.el | 5 ++++ lisp/emacs-lisp/compat.el | 61 +++++++++++++++++++++++++++++++++++++++ lisp/progmodes/python.el | 2 +- lisp/subr.el | 4 +-- 4 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 lisp/emacs-lisp/compat.el diff --git a/admin/admin.el b/admin/admin.el index 7fa2727aeb7..bcf1be6ff67 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -115,6 +115,11 @@ set-version (set-version-in-file root "nt/README.W32" version (rx (and "version" (1+ space) (submatch (1+ (in "0-9.")))))) + (set-version-in-file root "lisp/emacs-lisp/compat.el" version + (rx (and bol ";; Version : " (1+ space) + (submatch (1+ (in "0-9."))) + "compat"))) + ;; TODO: msdos could easily extract the version number from ;; configure.ac with sed, rather than duplicating the information. (set-version-in-file root "msdos/sed2v2.inp" version diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el new file mode 100644 index 00000000000..b45b3ede633 --- /dev/null +++ b/lisp/emacs-lisp/compat.el @@ -0,0 +1,61 @@ +;;; compat.el --- Pseudo-Compatibility for Elisp -*- lexical-binding: t; -*- + +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. + +;; Author: \ +;; Philip Kaludercic , \ +;; Daniel Mendler +;; Maintainer: \ +;; Daniel Mendler , \ +;; Compat Development <~pkal/compat-devel@lists.sr.ht>, +;; emacs-devel@gnu.org +;; URL: https://github.com/emacs-compat/compat +;; Version: 30.1compat +;; Keywords: lisp, maint + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The Compat package on ELPA provides forward-compatibility +;; definitions for other packages. While mostly transparent, a +;; minimal API is necessary whenever core definitions change calling +;; conventions (e.g. `plist-get' can be invoked with a predicate from +;; Emacs 29.1 onward). For core packages on ELPA to be able to take +;; advantage of this functionality, the macros `compat-function' and +;; `compat-call' have to be available in the core, usable even if +;; users do not have the Compat package installed, which this file +;; ensures. + +;; Note that Compat is not a core package and this file is not +;; available on GNU ELPA. + +;;; Code: + +(defmacro compat-function (fun) + "Return compatibility function symbol for FUN. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + `#',fun) + +(defmacro compat-call (fun &rest args) + "Call compatibility function or macro FUN with ARGS. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + (cons fun args)) + +(provide 'compat) +;;; compat.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1148da11a06..c3f18692f61 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -267,7 +267,7 @@ (eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. (require 'treesit) (require 'pcase) -(require 'compat nil 'noerror) +(require 'compat) (require 'project nil 'noerror) (require 'seq) diff --git a/lisp/subr.el b/lisp/subr.el index df28989b399..007206ebf0e 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -6873,9 +6873,9 @@ version-separator Usually the separator is \".\", but it can be any other string.") - (defconst version-regexp-alist - '(("^[-._+ ]?snapshot$" . -4) + `(("^[-._+ ]?compat$" . ,most-positive-fixnum) + ("^[-._+ ]?snapshot$" . -4) ;; treat "1.2.3-20050920" and "1.2-3" as snapshot releases ("^[-._+]$" . -4) ;; treat "1.2.3-CVS" as snapshot release -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 15:12:04 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 20:12:04 +0000 Received: from localhost ([127.0.0.1]:33992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1PH-000575-SP for submit@debbugs.gnu.org; Thu, 11 Jan 2024 15:12:04 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1PE-00056Z-IS for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 15:12:01 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5DB8081001; Thu, 11 Jan 2024 15:11:56 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1705003915; bh=wi5GQdkzUpLSHN5C/MbG0s4LGPYMgJtt7FN5Cftxwuk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UdXk1UtXAXxw2rmuMPpcs3d37EvGK3Fjti14EP8bT6SNNpXyW54u38hHUeqpN0bjF dl9O+FhUUzReSidY0o4auOyEqC3kz4i+0HeO/vYeo0ab22cbw1sl/zuUAVTbipkN8+ Wu68CQ39GmAGV3ff7b7OTYu0TGITAyOPO+0AChSW5gQS/+riJLCBNLs1l5YR+Ohjdn GGE8woQFOAdb4FPCRlmFZ7cYw1xWyXYA+/TrhLSqP3hSuzrShkLF3oyA4JRfvOGWhC hwE8+OuaKGg9giS4+KOXmQnVxmuSjfchfwZav/5+sSSrR9R+ky1a3cmLzzoNGKDdxc fGgmTBY3aV2zg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3E31380A64; Thu, 11 Jan 2024 15:11:55 -0500 (EST) Received: from pastel (65-110-221-238.cpe.pppoe.ca [65.110.221.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0DDB4120351; Thu, 11 Jan 2024 15:11:55 -0500 (EST) From: Stefan Monnier To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87edenptba.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 11 Jan 2024 19:24:09 +0000") Message-ID: References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> Date: Thu, 11 Jan 2024 15:11:54 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.024 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: Daniel Mendler , eliz@gnu.org, Stefan Kangas , 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -6873,9 +6873,9 @@ version-separator > > Usually the separator is \".\", but it can be any other string.") > > - > (defconst version-regexp-alist > - '(("^[-._+ ]?snapshot$" . -4) > + `(("^[-._+ ]?hyper$" . ,most-positive-fixnum) > + ("^[-._+ ]?snapshot$" . -4) > ;; treat "1.2.3-20050920" and "1.2-3" as snapshot releases > ("^[-._+]$" . -4) > ;; treat "1.2.3-CVS" as snapshot release Relying on a change in `version-regexp-alist` open a can of worms. It's much simpler to make sure the GNU ELPA `compat` package uses versions of the form `30.0.NN` (or `30.1.NN` if it means it offers functionality from Emacs-30.2, tho hopefully we'll never get there). >>>> Is there a place where we could add a warning to make sure that >>>> bumping the version won't be forgotten? The addition cab done procedurally, as in ;;;;####autoload (push (list 'compat emacs-major-version emacs-minor-version) package--builtin-versions) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 15:24:16 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 20:24:16 +0000 Received: from localhost ([127.0.0.1]:34016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1b6-00086X-Em for submit@debbugs.gnu.org; Thu, 11 Jan 2024 15:24:16 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:44869 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1b4-00086K-Kr for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 15:24:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3oct1SUR5F0o0MM9EIfv57AZfgyiW/loNhjgaQVMocA=; b=MjQVN3GO9doVfrlBwe7FCk+gGs Igtzh3SuovAPOT6mCMQxO/jaLApAUBAta50w0HVFWfIXEY89o52P84J7mU7sIxWG0PiJLw4xPyB3y n/k5yqU+F0VnJJ/8Ihs7mYrTzZQSP1dSMK9M24MWKwFNLFRIN8wpa4ZHNex32L/xZqzY=; From: Daniel Mendler To: Stefan Monnier Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: (Stefan Monnier's message of "Thu, 11 Jan 2024 15:11:54 -0500") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> Date: Thu, 11 Jan 2024 21:24:10 +0100 Message-ID: <87bk9raaad.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , eliz@gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> --- a/lisp/subr.el >> +++ b/lisp/subr.el >> @@ -6873,9 +6873,9 @@ version-separator >> >> Usually the separator is \".\", but it can be any other string.") >> >> - >> (defconst version-regexp-alist >> - '(("^[-._+ ]?snapshot$" . -4) >> + `(("^[-._+ ]?hyper$" . ,most-positive-fixnum) >> + ("^[-._+ ]?snapshot$" . -4) >> ;; treat "1.2.3-20050920" and "1.2-3" as snapshot releases >> ("^[-._+]$" . -4) >> ;; treat "1.2.3-CVS" as snapshot release > > Relying on a change in `version-regexp-alist` open a can of worms. > It's much simpler to make sure the GNU ELPA `compat` package uses > versions of the form `30.0.NN` (or `30.1.NN` if it means it > offers functionality from Emacs-30.2, tho hopefully we'll never get > there). I had also considered to use versions like 29.0, 30.0, etc. for Compat. However this is unfortunately not what we have done for Compat so far. I argue that such versions are more confusing for package developers. If developers want to depend on Emacs 30.1 features, it is more natural to require (compat "30.1") in the package header. If you don't want to use `version-regexp-alist' what about my initial proposal of specifying a version like 30.1.9999 in the header of compat.el? Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 15:24:33 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 20:24:33 +0000 Received: from localhost ([127.0.0.1]:34019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1bM-000871-RS for submit@debbugs.gnu.org; Thu, 11 Jan 2024 15:24:33 -0500 Received: from mout01.posteo.de ([185.67.36.65]:34695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1bK-00086m-Th for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 15:24:31 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1A9BE240027 for <66554@debbugs.gnu.org>; Thu, 11 Jan 2024 21:24:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705004667; bh=FDYb8Lx38QUEPX1k8rqpY9EsvCTi6xso5oC3MfM8AZ0=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=or7GE6KXhp4tX7r2Zme5e8kOpGX2iP+0/D7fcHFNeUMiSFmREGlLxs0ZzTLqlrMcT cbspFlxSV/XcvXlLPHDufKivhZ4bgRYJDCQ34KOz5fwZawTD1F4aw1s+kNPwm1uM8C MKSVlQ6Y4+3J+X7HnsJ9QeMEv4OsYH263fSr0ssCqwuUMQRLG8SxxTQUHiaabaw6wy 7IZGEhoBeFTTFbUQe0FYI5p5Cj1LgVkXzhGD1zfDIQq6Smz9JN+jVfWSujxehZnnXP gi3+a6Ke08C4uJDj4Vecf4YqnrrrBiuAf94dH3/P2w9ETreByxsy1j+xpbsP53sCjC e0mXbozrbFv2A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T9x3G1c7nz9rxF; Thu, 11 Jan 2024 21:24:26 +0100 (CET) From: Philip Kaludercic To: Stefan Monnier Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: (Stefan Monnier's message of "Thu, 11 Jan 2024 15:11:54 -0500") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 11 Jan 2024 20:24:25 +0000 Message-ID: <875xzzpqiu.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: Daniel Mendler , eliz@gnu.org, Stefan Kangas , 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: >> --- a/lisp/subr.el >> +++ b/lisp/subr.el >> @@ -6873,9 +6873,9 @@ version-separator >> >> Usually the separator is \".\", but it can be any other string.") >> >> - >> (defconst version-regexp-alist >> - '(("^[-._+ ]?snapshot$" . -4) >> + `(("^[-._+ ]?hyper$" . ,most-positive-fixnum) >> + ("^[-._+ ]?snapshot$" . -4) >> ;; treat "1.2.3-20050920" and "1.2-3" as snapshot releases >> ("^[-._+]$" . -4) >> ;; treat "1.2.3-CVS" as snapshot release > > Relying on a change in `version-regexp-alist` open a can of worms. Out of curiosity, what are you thinking about? I know this is a hack, but the way I though about it, it should work. > It's much simpler to make sure the GNU ELPA `compat` package uses > versions of the form `30.0.NN` (or `30.1.NN` if it means it > offers functionality from Emacs-30.2, tho hopefully we'll never get > there). This would also be an acceptable fallback strategy IMO, with the minor annoyance that it might confuse some people into thinking that the ELPA package is out of date. >>>>> Is there a place where we could add a warning to make sure that >>>>> bumping the version won't be forgotten? > > The addition cab done procedurally, as in > > ;;;;####autoload (push (list 'compat emacs-major-version > emacs-minor-version) package--builtin-versions) If this work, I like this idea a lot! I'll test it out to see if this could simplify things. > > -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 15:40:55 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 20:40:55 +0000 Received: from localhost ([127.0.0.1]:34053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1rD-0002l1-Dz for submit@debbugs.gnu.org; Thu, 11 Jan 2024 15:40:55 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:58309 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1rA-0002km-Lo for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 15:40:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MRGMflJYxZpIUW7oSaO8X899tFisSG0XVaJiIRnWZho=; b=C5wsSWNpflAnDxYjjsQ0IMWQbV OrzQhAEp+d04+n5Hn5yBQjGwWHVLCLjrrCm83ckE68J7xhVXHvPtibUnwyAWmq54VOeqx62yYRob4 TEa1EecPZFVSUKApGLOpJWSo4oy7FJ47arQFoRjFq4LPyi7yS2HmgkSuOyhcy6axq8sE=; From: Daniel Mendler To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <875xzzpqiu.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 11 Jan 2024 20:24:25 +0000") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <875xzzpqiu.fsf@posteo.net> Date: Thu, 11 Jan 2024 21:40:47 +0100 Message-ID: <878r4va9io.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > Stefan Monnier writes: >> The addition cab done procedurally, as in >> >> ;;;;####autoload (push (list 'compat emacs-major-version >> emacs-minor-version) package--builtin-versions) > > If this work, I like this idea a lot! I'll test it out to see if this > could simplify things. Philip, could we push (list 'compat emacs-major-version emacs-minor-version most-positive-fixnum)? Wouldn't this solve the two problems we have - no manual version bump and Compat could keep its current version scheme? Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 15:43:22 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 20:43:22 +0000 Received: from localhost ([127.0.0.1]:34062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1tZ-0002pe-W1 for submit@debbugs.gnu.org; Thu, 11 Jan 2024 15:43:22 -0500 Received: from mout02.posteo.de ([185.67.36.66]:56433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO1tU-0002pM-J1 for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 15:43:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B3513240106 for <66554@debbugs.gnu.org>; Thu, 11 Jan 2024 21:43:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705005792; bh=2BR6v1vVQHX4fdKSdC8YAwQ6DdoCgtpgvbo30WLOy38=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=d5OUdq2HzkiWy3n0zVzzZTAs/oUzlfnfKZzgdK8gnahEP33HySbqyWsi7u/f4W4fR Oq8ZbdH1wzKpRnKlEb3syQI2bbPVcjd8oQbHs9zh+quL8z4qsFfD+ndkcefYntVeZo DWOIVAQ8EOrcXBWjqgCcC18PHLNgBK5PxlX7u6TxoJ2MVTf2oBKx6BJ7YALP+xmc/v C3AyXcgoAmY6QqPH+ZOn2HsSWjBiVentsfCaHgA0pK2yoix+u/0KIIs0DpxI8JRviJ HTLpHryQdEtnLG1yCi4JBwEuMHixO2COnPS7OietjJxILW1ZeDnSP/11/Gbmm43LrI Hn/7nTIZsGGNQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T9xSv3Vx8z6txs; Thu, 11 Jan 2024 21:43:11 +0100 (CET) From: Philip Kaludercic To: Daniel Mendler Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87bk9raaad.fsf@daniel-mendler.de> (Daniel Mendler's message of "Thu, 11 Jan 2024 21:24:10 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 11 Jan 2024 20:43:11 +0000 Message-ID: <87a5pbvbxc.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Daniel Mendler writes: > Philip Kaludercic writes: >> Stefan Monnier writes: >>> The addition cab done procedurally, as in >>> >>> ;;;;####autoload (push (list 'compat emacs-major-version >>> emacs-minor-version) package--builtin-versions) >> >> If this work, I like this idea a lot! I'll test it out to see if this >> could simplify things. > > Philip, could we push (list 'compat emacs-major-version > emacs-minor-version most-positive-fixnum)? Wouldn't this solve the two > problems we have - no manual version bump and Compat could keep its > current version scheme? Yes, I just tried it out and it works (and it doesn't work the way we want it to without `most-positive-fixnum'): --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-the-public-API-of-Compat-to-the-core.patch >From 303a8be8c3cbc9810517a76baf4fc806da3d5aee Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 13 Sep 2023 12:26:22 +0200 Subject: [PATCH] Add the public API of Compat to the core * lisp/emacs-lisp/compat.el: Add stub file with minimal definitions, so that core packages, that haven't been installed from ELPA, can make use of the public API and use more recent function signatures. * lisp/progmodes/python.el (compat): Remove 'noerror flag, because Compat can now be required without the real package being available. (Bug#66554) --- lisp/emacs-lisp/compat.el | 66 +++++++++++++++++++++++++++++++++++++++ lisp/progmodes/python.el | 2 +- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 lisp/emacs-lisp/compat.el diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el new file mode 100644 index 00000000000..b2c1125cb8d --- /dev/null +++ b/lisp/emacs-lisp/compat.el @@ -0,0 +1,66 @@ +;;; compat.el --- Pseudo-Compatibility for Elisp -*- lexical-binding: t; -*- + +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. + +;; Author: \ +;; Philip Kaludercic , \ +;; Daniel Mendler +;; Maintainer: \ +;; Daniel Mendler , \ +;; Compat Development <~pkal/compat-devel@lists.sr.ht>, +;; emacs-devel@gnu.org +;; URL: https://github.com/emacs-compat/compat +;; Keywords: lisp, maint + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The Compat package on ELPA provides forward-compatibility +;; definitions for other packages. While mostly transparent, a +;; minimal API is necessary whenever core definitions change calling +;; conventions (e.g. `plist-get' can be invoked with a predicate from +;; Emacs 29.1 onward). For core packages on ELPA to be able to take +;; advantage of this functionality, the macros `compat-function' and +;; `compat-call' have to be available in the core, usable even if +;; users do not have the Compat package installed, which this file +;; ensures. + +;; Note that Compat is not a core package and this file is not +;; available on GNU ELPA. + +;;; Code: + +(defmacro compat-function (fun) + "Return compatibility function symbol for FUN. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + `#',fun) + +(defmacro compat-call (fun &rest args) + "Call compatibility function or macro FUN with ARGS. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + (cons fun args)) + +;; To ensure that if the user has installed Compat X.Y.Z.A on Emacs +;; X.Y, that the this file is preferred by package.el, we +;; programmatically set the version of this file: + +;;;###autoload (push (list 'compat emacs-major-version emacs-minor-version most-positive-fixnum) package--builtin-versions) + +(provide 'compat) +;;; compat.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1148da11a06..c3f18692f61 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -267,7 +267,7 @@ (eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. (require 'treesit) (require 'pcase) -(require 'compat nil 'noerror) +(require 'compat) (require 'project nil 'noerror) (require 'seq) -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 11 16:01:46 2024 Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 21:01:46 +0000 Received: from localhost ([127.0.0.1]:34131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO2BN-0000CR-RS for submit@debbugs.gnu.org; Thu, 11 Jan 2024 16:01:46 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:52653 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rO2BL-00006G-FC for 66554@debbugs.gnu.org; Thu, 11 Jan 2024 16:01:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xrjKMAIt/ItMkOjx2Xg1TJWJCX49P/YYRAYHljNiG4k=; b=SYUOInbKnwDAASfy4HiB5VdzN4 qWjg3Gxk4VpYCSo6VIUoBQXHu7TnK4wjrOUMMuMUEe1A8m3YUrPVEFkUui4zKQjyzAp2a7KgVPfOi 07whH/f6Gp4QlFdeXbs8YQQAAXYWnkVr0k9MEWLKoPBZsaOorMZxYawZbIztmV5rexc4=; From: Daniel Mendler To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87a5pbvbxc.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 11 Jan 2024 20:43:11 +0000") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> Date: Thu, 11 Jan 2024 22:01:39 +0100 Message-ID: <875xzza8jw.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > Daniel Mendler writes: > >> Philip Kaludercic writes: >>> Stefan Monnier writes: >>>> The addition cab done procedurally, as in >>>> >>>> ;;;;####autoload (push (list 'compat emacs-major-version >>>> emacs-minor-version) package--builtin-versions) >>> >>> If this work, I like this idea a lot! I'll test it out to see if this >>> could simplify things. >> >> Philip, could we push (list 'compat emacs-major-version >> emacs-minor-version most-positive-fixnum)? Wouldn't this solve the two >> problems we have - no manual version bump and Compat could keep its >> current version scheme? > > Yes, I just tried it out and it works (and it doesn't work the way we > want it to without `most-positive-fixnum'): Thanks, your patch looks good. Stefan's idea of using an autoload to specify the version is nice. As Eli mentioned the Elisp manual should probably refer to the Compat manual, and maybe the change also needs a NEWS entry? Anything else? Daniel From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 02:12:49 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 07:12:49 +0000 Received: from localhost ([127.0.0.1]:34673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOBii-0006ZI-Mm for submit@debbugs.gnu.org; Fri, 12 Jan 2024 02:12:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOBif-0006Z4-VS for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 02:12:47 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOBib-00023U-DQ; Fri, 12 Jan 2024 02:12:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2eVeIoUE9aYJWfP/caG/chylaicWAqloxIx4ALMO+Kw=; b=M+JpLBn2blps OI0EwtrmQB1CD2gkVEQzOxyhpvyX53TQgw03AUVlnCFkS1E/gROBSbd73EYz4M8EVqbRElMPoKO+m +bROBN/JtW8dlLz0DnvrVJzdmMAWToSNx0SITCFrX6DELPSudm8WF2ugUj+Akwtm1qB29AszQjL8o XdvgJVcaUEkoIL+ECwWyd4ggYmYF5Y+KNSboY6ycvKLT/9wCiRJwc6MuoB8qENiRMj9S53GMpET1m AP8DXBp6gYP4aZV/NpHV9bgVWLtVZUwEb4qOhFchl4V/PxiaNwAHSLtHg0vEHGYqs2uakTcfq1RdC 5+tJHRiJR9EXu26HS47Nnw==; Date: Fri, 12 Jan 2024 09:12:28 +0200 Message-Id: <83sf33ja8z.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87a5pbpraq.fsf@posteo.net> (message from Philip Kaludercic on Thu, 11 Jan 2024 20:07:41 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <83y1cwkvnw.fsf@gnu.org> <87a5pbpraq.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: Eli Zaretskii , 66554@debbugs.gnu.org, > monnier@iro.umontreal.ca > Date: Thu, 11 Jan 2024 20:07:41 +0000 > > > Philip, could you take a look at this and amend the patch accordingly? > > Thanks in advance. > > This would integrate my previous two suggestions: Thanks, but please also mention this in admin/make-tarball.txt, where it describes the invocation of set-version and the files it updates. Should we have a NEWS entry about this? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 02:32:47 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 07:32:47 +0000 Received: from localhost ([127.0.0.1]:34757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOC23-0004Bz-5l for submit@debbugs.gnu.org; Fri, 12 Jan 2024 02:32:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOC1z-0004Bk-3v for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 02:32:45 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOC1u-0002Xa-Dj; Fri, 12 Jan 2024 02:32:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mTwV4fjS73eod8m85uDwO8VA6D+ab82iFxe+ujzeHuQ=; b=ryv5db9mGygp A18EB7VxY3RS7TIFECY8BdyVv/qQUd8m20YqfSfFCT9qVyZCZ10E6GoDC/8TnE55XP5sIp22PSSxj q5zY0gac2dKae11kEY2p+nlVdXrbbfQ8rk8enkyz5n7lq0Q966of1bIiPFNGEgKEf1V9K3aPJsWU6 0v4lovy/BeVxS0o60b/z5CIpq3MOGdNjDbBDz5XgfaC1UGy4acitxS5MVQC26Lw0eU21cj2tf2bTZ XlS00APRXGgAZSi7pdPKZoSS9/DVy+z/06iaOP/pTioTiC61fr/XaJvJOQi5A5iRL0gF/6n/ZdKbb a6rbf1OvL0C4+q/liOc1dQ==; Date: Fri, 12 Jan 2024 09:32:17 +0200 Message-Id: <83ply7j9by.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <875xzzpqiu.fsf@posteo.net> (message from Philip Kaludercic on Thu, 11 Jan 2024 20:24:25 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <875xzzpqiu.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: Daniel Mendler , 66554@debbugs.gnu.org, > eliz@gnu.org, Stefan Kangas > Date: Thu, 11 Jan 2024 20:24:25 +0000 > > > The addition cab done procedurally, as in > > > > ;;;;####autoload (push (list 'compat emacs-major-version > > emacs-minor-version) package--builtin-versions) > > If this work, I like this idea a lot! I'll test it out to see if this > could simplify things. I'm not sure I understand the effects of the above -- can you explain? In general, if something needs to be done when the Emacs version is bumped, that action should be described in make-tarball.txt. It is a nuisance to follow the procedure there, only to be reminded of something else via a warning emitted by the build (and that is even before we consider the possibility that someone launches a build and goes for a coffee, while the warnings scroll on the screen with no one to see them). Likewise, if a file is modified by whatever commands we invoke to bump an Emacs version, that file should be mentioned in make-tarball.txt, because the person who performs that procedure will then need to commit the changes with a suitable log message, like we do today with configure.ac and the rest. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 02:38:30 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 07:38:30 +0000 Received: from localhost ([127.0.0.1]:34779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOC7Z-0004NJ-RD for submit@debbugs.gnu.org; Fri, 12 Jan 2024 02:38:30 -0500 Received: from mout01.posteo.de ([185.67.36.65]:33391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOC7W-0004N2-Ng for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 02:38:28 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id AE461240028 for <66554@debbugs.gnu.org>; Fri, 12 Jan 2024 08:38:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705045102; bh=GlahtJGWsc2uNkOJRT5u4wUNZJsUkId3lpVrUyLgfM0=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=DQGlpUVywJ9WIuLtKIlmOlZvlFRRuAjBy2LsQQXNnxj7OnZecVMEtbLlbV3ReLBa5 wiwKqMEsDr1o1I7JVDAOjKoePh4RyaLMaxHnshGGFdSTHsrbU9YoDdQAiHqpJFNLFs LfviX8etwv14WYHfuevZuNEFI5JuinT7fvRvqAPto5YqEEBszUB4xzIa1XbpkjyfUf d4mRuBmm31lYVnUFbsVqjTu/pzZ8wIKFktnAY7NpxTYeGjdO+kNk9+NNjK+y3T4dIj Y239ZWo52qrYI043JQ9dtRpKn15PULl1qHitcC+WLklvXltQyABCWjnXcMTIPB40gU OTM/q+uDIJGvA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TBD0s2XVsz9rxN; Fri, 12 Jan 2024 08:38:21 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <83ply7j9by.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Jan 2024 09:32:17 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <875xzzpqiu.fsf@posteo.net> <83ply7j9by.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 12 Jan 2024 07:38:20 +0000 Message-ID: <87wmsfm26r.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Daniel Mendler , 66554@debbugs.gnu.org, >> eliz@gnu.org, Stefan Kangas >> Date: Thu, 11 Jan 2024 20:24:25 +0000 >> >> > The addition cab done procedurally, as in >> > >> > ;;;;####autoload (push (list 'compat emacs-major-version >> > emacs-minor-version) package--builtin-versions) >> >> If this work, I like this idea a lot! I'll test it out to see if this >> could simplify things. > > I'm not sure I understand the effects of the above -- can you explain? The idea is to manually register the file as a package while scraping for autoloads, thereby setting the version of the built-in Compat package to whatever the current version of Emacs is. My patch adds a `most-positive-fixnum' to the version number to ensure that the built-in compat is always (or at least for a more than reasonably long while) preferred over an external dependency. The consequence is that we don't have to update any files, and I would assume we don't have to document anything in make-tarball.txt, because nothing has to be done when bumping the version of Emacs itself. > In general, if something needs to be done when the Emacs version is > bumped, that action should be described in make-tarball.txt. It is a > nuisance to follow the procedure there, only to be reminded of > something else via a warning emitted by the build (and that is even > before we consider the possibility that someone launches a build and > goes for a coffee, while the warnings scroll on the screen with no one > to see them). Likewise, if a file is modified by whatever commands we > invoke to bump an Emacs version, that file should be mentioned in > make-tarball.txt, because the person who performs that procedure will > then need to commit the changes with a suitable log message, like we > do today with configure.ac and the rest. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 03:10:56 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 08:10:56 +0000 Received: from localhost ([127.0.0.1]:34828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOCcx-00025s-UA for submit@debbugs.gnu.org; Fri, 12 Jan 2024 03:10:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOCcw-00025f-2G for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 03:10:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOCcr-00044H-Dh; Fri, 12 Jan 2024 03:10:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5rZQ8U7C674Ih6MiYMFBM8RFk+2AsKdaSIAyYZqwPK0=; b=He3vprpiFwBg J3fw0ntTz3+2jvZg1OAL3MooJRZbxV8VGbTYF0L6lrXvGlR7OMWECBMeYjo0T2aynrLs7O878ENXf sgRLjoJEgnT1zODYSfRHmmI6/NJVGOprXrz6Bcw/rF8h/i2zi+UmeJSRPfRctIcrhp/BksUZI6Lgg Xa5e7q09vbnMj7qeJT4HWR2zN1/buuq37OLA1zeSDuOPxMS2Gj8ot/GUQpxirfy6TI3Jy5kP4llC2 T/fMhWq2ZzIZIfWlyvZe99g4UQY1fpLD3tJujKTtZmUhE24WjGnWlEB2ddPeMPGSTxFAsaWAA942e P7apiXqb7lIyoKxHDv9JBA==; Date: Fri, 12 Jan 2024 10:10:34 +0200 Message-Id: <83mstbj7k5.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87a5pbvbxc.fsf@posteo.net> (message from Philip Kaludercic on Thu, 11 Jan 2024 20:43:11 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: Stefan Monnier , 66554@debbugs.gnu.org, > eliz@gnu.org, Stefan Kangas > Date: Thu, 11 Jan 2024 20:43:11 +0000 > > +;; To ensure that if the user has installed Compat X.Y.Z.A on Emacs > +;; X.Y, that the this file is preferred by package.el, we ^^^^^^^^ Typo. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 06:54:48 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 11:54:48 +0000 Received: from localhost ([127.0.0.1]:35056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOG7c-0000Mj-4s for submit@debbugs.gnu.org; Fri, 12 Jan 2024 06:54:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOG7Y-0000MS-PZ for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 06:54:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOG7S-0000UQ-Po; Fri, 12 Jan 2024 06:54:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BFfHYyJPwtkjblzXt8ubYqtIHrjKM/8mV5heMkNiSHg=; b=MwzNxFA2sHHQ CV4GflpDbRnqpxFbxI4MXwUHqUKRJPXnXtAddAO44mVkAR1eLgKRzlVVa2tIqByTEFYUg830jBTl4 ZP43WJWYKB7OhOzMfXhVMnxE9BzhJrIjVpnAqPPVQK0kCe6+pkXyd0QpK+b1hX3aTpusupph4mOcu xCuwy2+MsTyuCzb5YGnvfbR/S8GUqAwm2tEoRkHhk0WyFvmpg3ds92fPYsoVqg5g/ZF3CexGzcC2M 3XnpIHHShq3aexI7JqD1B3PTNdDPfV4fXNLPtN6rpE/lAP8KtROyDBe0uRG4oD4hvKDZmnu/zmDfe oSztv7bvDMGiXNJwwqPqjQ==; Date: Fri, 12 Jan 2024 13:54:26 +0200 Message-Id: <837ckekbrh.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87wmsfm26r.fsf@posteo.net> (message from Philip Kaludercic on Fri, 12 Jan 2024 07:38:20 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <875xzzpqiu.fsf@posteo.net> <83ply7j9by.fsf@gnu.org> <87wmsfm26r.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: monnier@iro.umontreal.ca, mail@daniel-mendler.de, > 66554@debbugs.gnu.org, stefankangas@gmail.com > Date: Fri, 12 Jan 2024 07:38:20 +0000 > > The consequence is that we don't have to update any files, and I would > assume we don't have to document anything in make-tarball.txt, because > nothing has to be done when bumping the version of Emacs itself. Thanks. What happens when we bump Emacs version from NN.x to NN.x.90 or from NN.x.90 to NN.x.91? emacs-major-version and emacs-minor-version stay the same, but the Emacs version is bumped, and there could be changes in compat.el specific to the next release, NN.x+1 or NN+1.1, no? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 11:29:26 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 16:29:26 +0000 Received: from localhost ([127.0.0.1]:37446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOKPN-0006HX-LE for submit@debbugs.gnu.org; Fri, 12 Jan 2024 11:29:26 -0500 Received: from mout02.posteo.de ([185.67.36.66]:57003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOKPL-0006HF-1c for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 11:29:24 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2EE82240106 for <66554@debbugs.gnu.org>; Fri, 12 Jan 2024 17:29:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705076958; bh=a0dh30ATGAoMJFax01qhvRpQCwSmK66DlQcBnlfp7hU=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=kIahvFwYrFoItO8Po4DckAp5EJScnpNok27ZDM+D49zTqjtkC5UaVDTQUGn2mcw2N jC6if3OFyu9sZW0IO1XNflVS03unVV6ysOfQfw2zm004x7FP46vofRSl7yHHIN0VVR eSvsnaWPitDiwB6PCiwjsnw4lslbFWAs/BMBNbwPYD9wxS9ibPVq8S8qz/9OiVXYz9 Q4OW5e+QEwl8vF35OhGcX27SOruWPJhW60PVzq0ZDpkbZy7XpiGQTP6bWjnEiSUZ4Q E27/40iOREuplffA6I+WpEj6S9zXD6ApwL+g1LSo5dU2zXOENykjKky5huh1WO1MYC vfxD3hRVtXOJw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TBRnS1hvKz6tvr; Fri, 12 Jan 2024 17:29:16 +0100 (CET) From: Philip Kaludercic To: Daniel Mendler Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <875xzza8jw.fsf@daniel-mendler.de> (Daniel Mendler's message of "Thu, 11 Jan 2024 22:01:39 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 12 Jan 2024 16:29:15 +0000 Message-ID: <87edemldlw.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Daniel Mendler writes: > Philip Kaludercic writes: > >> Daniel Mendler writes: >> >>> Philip Kaludercic writes: >>>> Stefan Monnier writes: >>>>> The addition cab done procedurally, as in >>>>> >>>>> ;;;;####autoload (push (list 'compat emacs-major-version >>>>> emacs-minor-version) package--builtin-versions) >>>> >>>> If this work, I like this idea a lot! I'll test it out to see if this >>>> could simplify things. >>> >>> Philip, could we push (list 'compat emacs-major-version >>> emacs-minor-version most-positive-fixnum)? Wouldn't this solve the two >>> problems we have - no manual version bump and Compat could keep its >>> current version scheme? >> >> Yes, I just tried it out and it works (and it doesn't work the way we >> want it to without `most-positive-fixnum'): > > Thanks, your patch looks good. Stefan's idea of using an autoload to > specify the version is nice. As Eli mentioned the Elisp manual should > probably refer to the Compat manual, and maybe the change also needs a > NEWS entry? Anything else? I don't think we need anything else, so here is the updated patch: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-the-public-API-of-Compat-to-the-core.patch >From a93f008f1fc58fdfbe4e832624e3ae7b28a6fda3 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 13 Sep 2023 12:26:22 +0200 Subject: [PATCH] Add the public API of Compat to the core * lisp/emacs-lisp/compat.el: Add stub file with minimal definitions, so that core packages, that haven't been installed from ELPA, can make use of the public API and use more recent function signatures. * lisp/progmodes/python.el (compat): Remove 'noerror flag, because Compat can now be required without the real package being available. * doc/lispref/package.texi (Forwards-Compatibility): Mention Compat and link to the manual. * etc/NEWS: Document change. (Bug#66554) --- doc/lispref/package.texi | 13 ++++++++ etc/NEWS | 11 +++++++ lisp/emacs-lisp/compat.el | 66 +++++++++++++++++++++++++++++++++++++++ lisp/progmodes/python.el | 2 +- 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 lisp/emacs-lisp/compat.el diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 6f52a33d194..b2b6e6b9671 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -28,6 +28,7 @@ Packaging * Multi-file Packages:: How to package multiple files. * Package Archives:: Maintaining package archives. * Archive Web Server:: Interfacing to an archive web server. +* Forwards-Compatibility:: Supporting older versions of Emacs. @end menu @node Packaging Basics @@ -390,3 +391,15 @@ Archive Web Server package, or the single file for a simple package. @end table + +@node Forwards-Compatibility +@section Supporting older versions of Emacs +@cindex compatibility compat + +Packages that wish to support older releases of Emacs, without giving +up on newer functionality from recent Emacs releases, one can make use +of the Compat package on GNU ELPA. @xref{Usage,, Usage, compat, +"Compat" Manual} For details on how to make use of the package (in +case you don't have the package installed, you can also read the +@url{https://elpa.gnu.org/packages/doc/compat.html#Usage, Online +Compat manual}). diff --git a/etc/NEWS b/etc/NEWS index bce33f96aee..11dc90d5067 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1298,6 +1298,17 @@ This minor mode generates the tags table automatically based on the current project configuration, and later updates it as you edit the files and save the changes. ++++ +** New package Compat +The Compat package on GNU ELPA provides forwards-compatibility +support, so that packages that still provide support for older +versions of Emacs can still make use of newer definitions that can be +reasonably re-implemented in Elisp. Now a "pseudo" Compat package is +part of Emacs, that doesn't provide any compatibility support, but +only implements the public-facing API of Compat so that core packages +can use Compat, while also preventing the installation of Compat on +the most recent version of Emacs. + * Incompatible Lisp Changes in Emacs 30.1 diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el new file mode 100644 index 00000000000..b2c1125cb8d --- /dev/null +++ b/lisp/emacs-lisp/compat.el @@ -0,0 +1,66 @@ +;;; compat.el --- Pseudo-Compatibility for Elisp -*- lexical-binding: t; -*- + +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. + +;; Author: \ +;; Philip Kaludercic , \ +;; Daniel Mendler +;; Maintainer: \ +;; Daniel Mendler , \ +;; Compat Development <~pkal/compat-devel@lists.sr.ht>, +;; emacs-devel@gnu.org +;; URL: https://github.com/emacs-compat/compat +;; Keywords: lisp, maint + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The Compat package on ELPA provides forward-compatibility +;; definitions for other packages. While mostly transparent, a +;; minimal API is necessary whenever core definitions change calling +;; conventions (e.g. `plist-get' can be invoked with a predicate from +;; Emacs 29.1 onward). For core packages on ELPA to be able to take +;; advantage of this functionality, the macros `compat-function' and +;; `compat-call' have to be available in the core, usable even if +;; users do not have the Compat package installed, which this file +;; ensures. + +;; Note that Compat is not a core package and this file is not +;; available on GNU ELPA. + +;;; Code: + +(defmacro compat-function (fun) + "Return compatibility function symbol for FUN. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + `#',fun) + +(defmacro compat-call (fun &rest args) + "Call compatibility function or macro FUN with ARGS. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + (cons fun args)) + +;; To ensure that if the user has installed Compat X.Y.Z.A on Emacs +;; X.Y, that the this file is preferred by package.el, we +;; programmatically set the version of this file: + +;;;###autoload (push (list 'compat emacs-major-version emacs-minor-version most-positive-fixnum) package--builtin-versions) + +(provide 'compat) +;;; compat.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1148da11a06..c3f18692f61 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -267,7 +267,7 @@ (eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. (require 'treesit) (require 'pcase) -(require 'compat nil 'noerror) +(require 'compat) (require 'project nil 'noerror) (require 'seq) -- 2.39.2 --=-=-= Content-Type: text/plain > Daniel Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Stefan Monnier , 66554@debbugs.gnu.org, >> eliz@gnu.org, Stefan Kangas >> Date: Thu, 11 Jan 2024 20:43:11 +0000 >> >> +;; To ensure that if the user has installed Compat X.Y.Z.A on Emacs >> +;; X.Y, that the this file is preferred by package.el, we > ^^^^^^^^ > Typo. Thanks; I also rewrote the comment to explain what is going on. Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: monnier@iro.umontreal.ca, mail@daniel-mendler.de, >> 66554@debbugs.gnu.org, stefankangas@gmail.com >> Date: Fri, 12 Jan 2024 07:38:20 +0000 >> >> The consequence is that we don't have to update any files, and I would >> assume we don't have to document anything in make-tarball.txt, because >> nothing has to be done when bumping the version of Emacs itself. > > Thanks. > > What happens when we bump Emacs version from NN.x to NN.x.90 or from > NN.x.90 to NN.x.91? emacs-major-version and emacs-minor-version stay > the same, but the Emacs version is bumped, and there could be changes > in compat.el specific to the next release, NN.x+1 or NN+1.1, no? Generally speaking, Compat only provides support for "proper" releases, and not for pre-releases. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 13:06:18 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 18:06:18 +0000 Received: from localhost ([127.0.0.1]:37698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOLv4-0002nd-VL for submit@debbugs.gnu.org; Fri, 12 Jan 2024 13:06:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOLv2-0002nO-Mw for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 13:06:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOLux-0005UC-KD; Fri, 12 Jan 2024 13:06:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jGPexq9RhhKsVtoJlQ6XcwfTvlqtl0MMyxzBZRTIEwE=; b=XY2533HIHnzo Mil1O7GXAhTQWBAHDsLpOAZGcfg37bTela4Uk7tBu+Zs8AYWWNix2ROprmpDFfw2GNA36dyGfT0gk BuE/HIPb4UHdulHVi8u5w5j2IlCdNY1vvn+xvJRJ3NTd8wCqThu32Dpb16lDQUGEVqgK+zkTxmJfs WRt1+SNbEla4qn61459rh0tzCY/p+Zhzq+CakgIsxt9pk+LhuJwHVMhxl5N4u05VHyVYNh38RqSlK NXi3MJ7zMx6dEj58t9xzOgf3bhK44DdTZS6kst+fWzz4Jfws5EfKwftcQmK1oSRrG/m3JXrmBVlHy e7Y6hBy9vu0g71hDgK6y2A==; Date: Fri, 12 Jan 2024 20:05:55 +0200 Message-Id: <83cyu6ifzw.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87edemldlw.fsf@posteo.net> (message from Philip Kaludercic on Fri, 12 Jan 2024 16:29:15 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier > , Stefan Kangas > Date: Fri, 12 Jan 2024 16:29:15 +0000 > > > What happens when we bump Emacs version from NN.x to NN.x.90 or from > > NN.x.90 to NN.x.91? emacs-major-version and emacs-minor-version stay > > the same, but the Emacs version is bumped, and there could be changes > > in compat.el specific to the next release, NN.x+1 or NN+1.1, no? > > Generally speaking, Compat only provides support for "proper" releases, > and not for pre-releases. Is that wise? Can't we support pretest versions as well? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 13:17:32 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 18:17:32 +0000 Received: from localhost ([127.0.0.1]:37716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOM60-0005mn-5Q for submit@debbugs.gnu.org; Fri, 12 Jan 2024 13:17:32 -0500 Received: from mout01.posteo.de ([185.67.36.65]:58997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOM5x-0005mS-BC for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 13:17:31 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 64971240027 for <66554@debbugs.gnu.org>; Fri, 12 Jan 2024 19:17:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705083445; bh=8RK+0nb07JgcD8EA8ZUzQi/+XkZlgY/vrOWPbWzT7FM=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=fKu8pDdrYnY5fCr1Ix0iYwnWyxzi1R/fmhRSoib9ezdr/UZM8ympt0kOiXsCLtWj2 7gBI/SWd7Br6vRkx5KxpwFxO/yF4Qu2lpBJuuKvE0ExOAUBweSPKDpk1yxbbQuU7rA L5NSzxW3rP0eXBREw3j5W6T8uyGfBgqCXNLq1uQqFEpvvBQ/y+6JeHUV51dp++b3eO /zAJgzkitoZiJ3sYEnVaRsJi+dbkpC3xIrtF1jU9robwFcXdfgu1sspxR0MKc+w3zA Og+Ooy1aJVdSBn6iEpKQsqNxc9gx+9Dy/52aesMJbVY0B6wbFEm0U7C8sctYZ0Y6vZ EQfKfoMXa+zPg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TBVBC25mqz6tvJ; Fri, 12 Jan 2024 19:17:23 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <83cyu6ifzw.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Jan 2024 20:05:55 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 12 Jan 2024 18:17:21 +0000 Message-ID: <875xzyl8lq.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier >> , Stefan Kangas >> Date: Fri, 12 Jan 2024 16:29:15 +0000 >> >> > What happens when we bump Emacs version from NN.x to NN.x.90 or from >> > NN.x.90 to NN.x.91? emacs-major-version and emacs-minor-version stay >> > the same, but the Emacs version is bumped, and there could be changes >> > in compat.el specific to the next release, NN.x+1 or NN+1.1, no? >> >> Generally speaking, Compat only provides support for "proper" releases, >> and not for pre-releases. > > Is that wise? > > Can't we support pretest versions as well? I hope I am not misunderstanding something, but from the perspective of Compat and Emacs development as a whole, I think it would be preferable to not start propagating additions and changes to functions that might change before a proper release, so as to not unnecessarily burden development with sticking to decisions that one realises were mistakes before the final release is cut. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 13:30:19 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 18:30:19 +0000 Received: from localhost ([127.0.0.1]:37723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOMIM-0006yH-Jy for submit@debbugs.gnu.org; Fri, 12 Jan 2024 13:30:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOMIH-0006Tl-OP for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 13:30:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOMIB-0002ZB-Pw; Fri, 12 Jan 2024 13:30:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2v4C8q55M8IFgPnaoqBWw5Au/hqpjwm0wx9Qc3fd1g8=; b=hx4I7tCKCoTR iPoFUc3xBmlQauZMJBGY0tm94yZ9P+NeCwKZbFTusMNen0mHttDUSkjwetCwkgnU2ZEI26k6xkf0z OBBe57twlBw+Kgtp1XK3VJ6iTDc2nhTVBCavFQYhTm7WnDBV97ReapSqeC/D4H3Hw0dEdmFXTjCfg TLR3S3kDu4QgJ4t2ROJ1XMjVaB8J6KXBwmT/tVLP/vEUWRRbeCyJiIvHTCemSy3jCosCXO015JUo4 ZnEvjB0Y6KicK859rtYbMFp5KohEJ5zldtYDNLQ6f6LJmQ6JkiYSh+uCmb4B80ZEkFBbJd31GlKWI 4mNUbNT+xICZyQoMNV1inA==; Date: Fri, 12 Jan 2024 20:29:55 +0200 Message-Id: <837ckeievw.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <875xzyl8lq.fsf@posteo.net> (message from Philip Kaludercic on Fri, 12 Jan 2024 18:17:21 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, > monnier@iro.umontreal.ca, stefankangas@gmail.com > Date: Fri, 12 Jan 2024 18:17:21 +0000 > > Eli Zaretskii writes: > > >> From: Philip Kaludercic > >> Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier > >> , Stefan Kangas > >> Date: Fri, 12 Jan 2024 16:29:15 +0000 > >> > >> > What happens when we bump Emacs version from NN.x to NN.x.90 or from > >> > NN.x.90 to NN.x.91? emacs-major-version and emacs-minor-version stay > >> > the same, but the Emacs version is bumped, and there could be changes > >> > in compat.el specific to the next release, NN.x+1 or NN+1.1, no? > >> > >> Generally speaking, Compat only provides support for "proper" releases, > >> and not for pre-releases. > > > > Is that wise? > > > > Can't we support pretest versions as well? > > I hope I am not misunderstanding something, but from the perspective of > Compat and Emacs development as a whole, I think it would be preferable > to not start propagating additions and changes to functions that might > change before a proper release, so as to not unnecessarily burden > development with sticking to decisions that one realises were mistakes > before the final release is cut. I guess I'm misunderstanding something. The scenario that I have in mind is this: . we bump Emacs version to NN.1.90 as part of pretesting version NN.2 . as part of the pretest, some function changes that requires addition or change in compat.el . compat.el still claims version NN.1, although it includes changes not present in Emacs NN.1 Did I succeed in explaining my worries? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 13:40:47 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 18:40:47 +0000 Received: from localhost ([127.0.0.1]:37735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOMSU-0000gy-Tc for submit@debbugs.gnu.org; Fri, 12 Jan 2024 13:40:47 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:39445 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOMSR-0000gj-K8 for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 13:40:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RuLZdNNKeUzqVY/9FiIbvNVypBp1nAIkSiHAxzeSDTo=; b=X1j+wVM/WjlKeTrqcGK9LJGZul 12y/2+WCnQc8xgnLOvw97yc74p+gFAEDdal/cPuPjdf4QvfLrHRrxRxxcfay0fDrb5m6n6Z4ul5jM kTwmdK6PIjTH3gwnkyKy5Xs9MlSUbgSsM9Xs15aYKj5Chz9qHSfrULa1t+fFE3QGnG/Q=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <837ckeievw.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Jan 2024 20:29:55 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> Date: Fri, 12 Jan 2024 19:40:38 +0100 Message-ID: <87h6jiqtsp.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , monnier@iro.umontreal.ca, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, >> monnier@iro.umontreal.ca, stefankangas@gmail.com >> Date: Fri, 12 Jan 2024 18:17:21 +0000 >> >> Eli Zaretskii writes: >> >> >> From: Philip Kaludercic >> >> Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Monnier >> >> , Stefan Kangas >> >> Date: Fri, 12 Jan 2024 16:29:15 +0000 >> >> >> >> > What happens when we bump Emacs version from NN.x to NN.x.90 or from >> >> > NN.x.90 to NN.x.91? emacs-major-version and emacs-minor-version stay >> >> > the same, but the Emacs version is bumped, and there could be changes >> >> > in compat.el specific to the next release, NN.x+1 or NN+1.1, no? >> >> >> >> Generally speaking, Compat only provides support for "proper" releases, >> >> and not for pre-releases. >> > >> > Is that wise? >> > >> > Can't we support pretest versions as well? >> >> I hope I am not misunderstanding something, but from the perspective of >> Compat and Emacs development as a whole, I think it would be preferable >> to not start propagating additions and changes to functions that might >> change before a proper release, so as to not unnecessarily burden >> development with sticking to decisions that one realises were mistakes >> before the final release is cut. > > I guess I'm misunderstanding something. The scenario that I have in > mind is this: > > . we bump Emacs version to NN.1.90 as part of pretesting version NN.2 > . as part of the pretest, some function changes that requires > addition or change in compat.el > . compat.el still claims version NN.1, although it includes changes > not present in Emacs NN.1 > > Did I succeed in explaining my worries? I hope I understood your reasoning correctly. Shortly after you bump NN.1.90 we can release compat-NN.2.0 which will include the necessary change. This Compat version will be installed on Emacs with version NN.1 but not on the upcoming Emacs NN.2. Daniel From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 15:05:57 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 20:05:57 +0000 Received: from localhost ([127.0.0.1]:37806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rONmu-0002dJ-Mn for submit@debbugs.gnu.org; Fri, 12 Jan 2024 15:05:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rONmq-0002cy-Gk for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 15:05:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rONmk-0001SD-S0; Fri, 12 Jan 2024 15:05:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3RG3EpttPQSQLuY5PqZCwoKMZu6hm8jETOJylQqUExw=; b=fEL/V7adEGDi EK9Vh5r5YJN3evsUtxZOBcx1SA8MHEp5v2UITBOeWE/UH5WbLzzWDVCcPR+aSe5tpV74Z4YjicEum lJNSFEmiUC6DxU2m46CR0nqwLTLWcXYbH7IQtDapQWbiOOLUNq1Yd0cd16Vc/W1SrLU2OdDAj1cam h0AWPibE96KVD2OOtUfS7crhzJ7mgeMvh28qN5x3zBqxzzORIy4iDvP4VSkB9RwMI2/ipriJcoFDa XhdSNAC2ndcVY14CGD4xlI5+dEoNdhrC7kgMkQtRx4HU0ASzMQpDvkuW5FcLd3TWwFfvy7gc5FabC SUt9NDjxa5r8i6ZVbq8NVA==; Date: Fri, 12 Jan 2024 22:05:32 +0200 Message-Id: <835xzyiagj.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <87h6jiqtsp.fsf@daniel-mendler.de> (message from Daniel Mendler on Fri, 12 Jan 2024 19:40:38 +0100) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Mendler > Cc: Philip Kaludercic , 66554@debbugs.gnu.org, > monnier@iro.umontreal.ca, stefankangas@gmail.com > Date: Fri, 12 Jan 2024 19:40:38 +0100 > > Eli Zaretskii writes: > > > I guess I'm misunderstanding something. The scenario that I have in > > mind is this: > > > > . we bump Emacs version to NN.1.90 as part of pretesting version NN.2 > > . as part of the pretest, some function changes that requires > > addition or change in compat.el > > . compat.el still claims version NN.1, although it includes changes > > not present in Emacs NN.1 > > > > Did I succeed in explaining my worries? > > I hope I understood your reasoning correctly. Shortly after you bump > NN.1.90 we can release compat-NN.2.0 which will include the necessary > change. Release where? on ELPA or as part of the Emacs tarball? And how do we make sure we will not forget to release this new version of compat.el? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 17:27:50 2024 Received: (at 66554) by debbugs.gnu.org; 12 Jan 2024 22:27:50 +0000 Received: from localhost ([127.0.0.1]:37888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOQ0D-0005Ee-N5 for submit@debbugs.gnu.org; Fri, 12 Jan 2024 17:27:50 -0500 Received: from mout01.posteo.de ([185.67.36.65]:59267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOQ08-0005EN-Kj for 66554@debbugs.gnu.org; Fri, 12 Jan 2024 17:27:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D2035240028 for <66554@debbugs.gnu.org>; Fri, 12 Jan 2024 23:27:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705098459; bh=HmcrU2g1FtOT9xt9VTjf/uxgmdnlmgUAy3X01uicOOk=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: From; b=cKFeWrbxysp4t+bFNDi5vNrTNY2YoBTvlpgg+vGB37lVHgVbNfXyzQQEnXlSAyH5a vLVWZkfyzm4DPOl200v34urdpfNrYaXhX+A298nwFAj5t0APm6XmylOv8x+QnjMNL3 UkOIQ2+vzvFJRaJOdrpT/xPrjYzwQCi2XuxkxnJsjtMmhoVd+lxrlMGshT8h2GzXvq x4NDK1cyq8+zhCapSkyw5J4m8tqjOq0Apgc551yiKxIkDsIztX7VjnxxDXptofhkML sX8DK21VsevJ4wNp+b3Uutm9PCXZFONR+HPfeXBNZJpKLYDNvJ6foE9DSNAWdN1S8W xXw8Xr/F1IW3g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TBbkx6v7cz6tvp; Fri, 12 Jan 2024 23:27:37 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <835xzyiagj.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Jan 2024 22:05:32 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 12 Jan 2024 22:27:37 +0000 Message-ID: <871qamkx0m.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: Daniel Mendler , stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: Philip Kaludercic , 66554@debbugs.gnu.org, >> monnier@iro.umontreal.ca, stefankangas@gmail.com >> Date: Fri, 12 Jan 2024 19:40:38 +0100 >> >> Eli Zaretskii writes: >> >> > I guess I'm misunderstanding something. The scenario that I have in >> > mind is this: >> > >> > . we bump Emacs version to NN.1.90 as part of pretesting version NN.2 >> > . as part of the pretest, some function changes that requires >> > addition or change in compat.el >> > . compat.el still claims version NN.1, although it includes changes >> > not present in Emacs NN.1 >> > >> > Did I succeed in explaining my worries? >> >> I hope I understood your reasoning correctly. Shortly after you bump >> NN.1.90 we can release compat-NN.2.0 which will include the necessary >> change. > > Release where? on ELPA or as part of the Emacs tarball? > > And how do we make sure we will not forget to release this new version > of compat.el? We have to distinguish the ELPA package Compat and the compat.el file being added here. The ELPA package Compat is manually released on our behalf, usually after a release of Emacs has been announced. The plan is that the compat.el file does not have to be touched at all, since it registers itself to use the right version, while Emacs is scraping the for autoloads. So there shouldn't be any additional effort from the side of Emacs maintenance, and nothing one can "forget". From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 13 01:44:37 2024 Received: (at 66554) by debbugs.gnu.org; 13 Jan 2024 06:44:37 +0000 Received: from localhost ([127.0.0.1]:38213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOXky-00058R-VS for submit@debbugs.gnu.org; Sat, 13 Jan 2024 01:44:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOXkw-00058B-2Y for 66554@debbugs.gnu.org; Sat, 13 Jan 2024 01:44:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOXkp-00005t-P8; Sat, 13 Jan 2024 01:44:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vdftRXMIA4KpDN5G7HtpaZdJFqPzvlMiw+XNKRQdcoc=; b=VL8d9yQeZxlw SZbckeZi8ign0pBmnxwMF5RC5LgYiR+RlxBDicWf1khAHbNfzQMx30mzYYNfGqPd2X0Nh5ztX2OaS JMkkjbObP3HT6iGy4HZ923gzn5l6AhQbmh2uye2Tp2K3O/dpNTOXhDc3yN56kEooG1m0xZMZyg0hR yKJomEdytIi/FnvJrKXBXS4hS9TRC8sdLYv3Szcm0dR2Q6CUScKdF16VE6KUu6S+lO3ZwEvwOk9m1 tAjBIhNAupskUGPYmT93bICxAdpT5fR/H8Gb8AYZN9CtblFCWhV1Ura7CG/KhZDxvErnW19HJELvr AcDowabjcLsWi0JEt9yFrA==; Date: Sat, 13 Jan 2024 08:44:07 +0200 Message-Id: <83wmsdhgw8.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <871qamkx0m.fsf@posteo.net> (message from Philip Kaludercic on Fri, 12 Jan 2024 22:27:37 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: Daniel Mendler , 66554@debbugs.gnu.org, > monnier@iro.umontreal.ca, stefankangas@gmail.com > Date: Fri, 12 Jan 2024 22:27:37 +0000 > > Eli Zaretskii writes: > > >> > I guess I'm misunderstanding something. The scenario that I have in > >> > mind is this: > >> > > >> > . we bump Emacs version to NN.1.90 as part of pretesting version NN.2 > >> > . as part of the pretest, some function changes that requires > >> > addition or change in compat.el > >> > . compat.el still claims version NN.1, although it includes changes > >> > not present in Emacs NN.1 > >> > > >> > Did I succeed in explaining my worries? > >> > >> I hope I understood your reasoning correctly. Shortly after you bump > >> NN.1.90 we can release compat-NN.2.0 which will include the necessary > >> change. > > > > Release where? on ELPA or as part of the Emacs tarball? > > > > And how do we make sure we will not forget to release this new version > > of compat.el? > > We have to distinguish the ELPA package Compat and the compat.el file > being added here. Yes, we should. I'm asking exactly that: when you say "we can release compat-NN.2.0", do you mean ELPA or do you mean compat.el in Emacs? > The ELPA package Compat is manually released on our > behalf, usually after a release of Emacs has been announced. The plan > is that the compat.el file does not have to be touched at all, since it > registers itself to use the right version, while Emacs is scraping the > for autoloads. So there shouldn't be any additional effort from the > side of Emacs maintenance, and nothing one can "forget". But that's exactly the problem I'm struggling with: compat.el in Emacs registers itself with inaccurate version, which lacks the last part after emacs-minor. As for "forgetting", I do mean whoever should remember to release a new version of Compat on ELPA -- if this is a manual operation, it can be forgotten, especially if it has to be related to pretest releases as well as the official releases. I guess I lack an overall picture of how this is supposed to work, as part of our pretest and release flow. Could you or someone else post such a complete description? Without this, I'm not sure I agree with the changes being considered, or at least don't quite understand their impact on the routine maintenance. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 13 07:24:06 2024 Received: (at 66554) by debbugs.gnu.org; 13 Jan 2024 12:24:06 +0000 Received: from localhost ([127.0.0.1]:38665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOd3V-0000Uo-J0 for submit@debbugs.gnu.org; Sat, 13 Jan 2024 07:24:06 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:58343 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOd3T-0000UB-4f for 66554@debbugs.gnu.org; Sat, 13 Jan 2024 07:24:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=upH70xTtYddFF5HEOAN/tYsY6P8jXwRoYgOY/xzxbt0=; b=sWh+VGdenVOytwdAlL8HVweR/R QurPWJMOvUN/2KlG0j4JOb6S2CiaW3BUH8pAiKYgCZSnfDRqRSPIautAlimCDdrg2Ig39mK3pNyqN 4XseS71aupIjvGmBRbj0fW4NIchdqG34JaphAbobepWn0vCRCW3iJ24lEEzXH9PtDYcM=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <83wmsdhgw8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Jan 2024 08:44:07 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> Date: Sat, 13 Jan 2024 13:23:57 +0100 Message-ID: <87wmsdxvz6.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , monnier@iro.umontreal.ca, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Daniel Mendler , 66554@debbugs.gnu.org, >> monnier@iro.umontreal.ca, stefankangas@gmail.com >> Date: Fri, 12 Jan 2024 22:27:37 +0000 >> >> Eli Zaretskii writes: >> >> >> > I guess I'm misunderstanding something. The scenario that I have in >> >> > mind is this: >> >> > >> >> > . we bump Emacs version to NN.1.90 as part of pretesting version NN.2 >> >> > . as part of the pretest, some function changes that requires >> >> > addition or change in compat.el >> >> > . compat.el still claims version NN.1, although it includes changes >> >> > not present in Emacs NN.1 >> >> > >> >> > Did I succeed in explaining my worries? >> >> >> >> I hope I understood your reasoning correctly. Shortly after you bump >> >> NN.1.90 we can release compat-NN.2.0 which will include the necessary >> >> change. >> > >> > Release where? on ELPA or as part of the Emacs tarball? >> > >> > And how do we make sure we will not forget to release this new version >> > of compat.el? >> >> We have to distinguish the ELPA package Compat and the compat.el file >> being added here. > > Yes, we should. I'm asking exactly that: when you say "we can release > compat-NN.2.0", do you mean ELPA or do you mean compat.el in Emacs? In this case we mean compat-NN.2.0 on ELPA. >> The ELPA package Compat is manually released on our >> behalf, usually after a release of Emacs has been announced. The plan >> is that the compat.el file does not have to be touched at all, since it >> registers itself to use the right version, while Emacs is scraping the >> for autoloads. So there shouldn't be any additional effort from the >> side of Emacs maintenance, and nothing one can "forget". > > But that's exactly the problem I'm struggling with: compat.el in Emacs > registers itself with inaccurate version, which lacks the last part > after emacs-minor. The internal compat.el in Emacs does not register itself with an inaccurate version. The version of compat.el in Emacs for a version NN.x is always the newest version one can get by definition. If the Emacs version is 30.1, the version of the internal compat.el is 30.1.most-positive-fixnum. This means the internal compat.el is considered newer than any compat-30.1.x on ELPA. The reasoning is that compat-30.1.x on ELPA cannot provide anything newer which is not already in Emacs 30.1, and as such it is not necessary to install it. However if there exists a compat-30.2.x on ELPA, then this package will take precendence over the internal compat.el with version 30.1.most-positive-fixnum. Then the ELPA package compat-30.2.x can get installed on an Emacs 30.1, if depended on by another ELPA package, e.g., Magit. For example let's assume that Magit depends on compat-30.2. Note that this dependency can either be satisfied by an ELPA compat-30.2.x or by an internal compat.el with version 30.2.most-positive-fixnum. Magit wants to take advantage of new APIs or API changes introduced in Emacs 30.2, which are also made available by ELPA compat-30.2. This means in this case ELPA compat-30.2.x must be installed if the internal compat.el has version 30.1.most-positive-fixnum. > As for "forgetting", I do mean whoever should remember to release a > new version of Compat on ELPA -- if this is a manual operation, it can > be forgotten, especially if it has to be related to pretest releases > as well as the official releases. Currently I am responsible of releasing new versions of Compat to ELPA. But there is no risk of forgetting, or rather, it is okay to not release new ELPA Compat versions immediately. There can be a time window. In the scenario described above, Magit wants to depend on compat-30.2. Since Magit itself is released on ELPA, the package can only be installed when compat-30.2 is available on ELPA. This means that Jonas will only start to depend on compat-30.2 after I've released it to ELPA. Before that has happened, Magit cannot take advantage of features which have been introduced in Emacs 30.2. > I guess I lack an overall picture of how this is supposed to work, as > part of our pretest and release flow. Could you or someone else post > such a complete description? Without this, I'm not sure I agree with > the changes being considered, or at least don't quite understand their > impact on the routine maintenance. The inclusion of compat.el into Emacs won't have an impact on the Emacs pretest or release flow. The Compat ELPA package can be released independently as I described above. There are these reasons why we are proposing the small compat.el file for inclusion: 1. It will be easier for :core packages which are available on ELPA to take advantage of Compat. They can (require 'compat) and they don't have to use (require 'compat nil 'noerror). 2. Core packages which use Compat do not have to replicate the `compat-function' and `compat-call' macros in their own code. See erc-compat.el for a core package, where these macros are already duplicated with the names `erc-compat-function' and `erc-compat-call'. Instead of this replication, erc-compat.el can just (require 'compat) and use `compat-function' and `compat-call'. 3. Compat should not be installed automatically as dependency if Emacs itself already provides the required API. For example on Emacs 30.1 I do not want to install compat-30.1 from ELPA, since Emacs itself already provides everything compat-30.1.x from ELPA ever could provide. Emacs is in charge of the API definition and Compat won't add anything itself. Now to describe the pretest or release flows - the Emacs release flow can proceeds as usual, as it has happened before with 28.1, 28.2, 29.1 etc. The compat.el file as part of Emacs will not have to be updated or changed. The ELPA package Compat will be released independently. After a release of pretest Emacs-30.0 we may release Compat-30.0.x on ELPA. This does not have to happen immediately. Only after Compat-30.0.x has landed on ELPA, other ELPA packages (which for example depend on Emacs 26.1 as base line) may start to depend on compat-30.0 and start using new Emacs 30.0 functions or macros, e.g., `static-if'. Before the release of Compat, an external package cannot take advantage of `static-if', since the ELPA Compat does not provide it yet, and the base line Emacs 26.1 does not provide it. Note that Compat on ELPA is already used by many packages exactly in the way I've described. The inclusion of compat.el in Emacs will smoothen the situation for core packages (which are also released to ELPA) and will ensure that no unnecessary Compat package is installed, the points 1, 2 and 3 I listed above. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 14:51:40 2024 Received: (at 66554) by debbugs.gnu.org; 18 Jan 2024 19:51:40 +0000 Received: from localhost ([127.0.0.1]:56697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQYQM-0005cL-T1 for submit@debbugs.gnu.org; Thu, 18 Jan 2024 14:51:40 -0500 Received: from mout01.posteo.de ([185.67.36.65]:42401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQYQK-0005c5-1Y for 66554@debbugs.gnu.org; Thu, 18 Jan 2024 14:51:37 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9B0E4240028 for <66554@debbugs.gnu.org>; Thu, 18 Jan 2024 20:51:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705607488; bh=G46Qu+B8QhUMZ1DQXkC20+dPlmzHQgRt5YiCKGvVPZw=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=C+80zYyQekA5i1dp/PJRPIo6+yDB8SBl4GINyAwyTGuMA3Du0xE2vpRFDUjChwfER 8xSEcbwwVwZAOBZWDDTYWXdotg7q7/CBEdAL7x328UU+XgS7GLwzUOScyl3LhREi5g 8P7dl6W1fnzpFFPRO1xXjruwhal/D1RlVtESBVW4/xxKqLVr5F7dO76Ozk2VW/CiZC csCo/rLSjY6fORX+GplLo1V/MRrHfaRTwG6uV/k07PyQ4I0wwdK0F2gwjmfVOh+2WW NSmx9+W6ciONa2tUcnPLRzp3mTsj38GQFvwDrxHNTOwnPwLPuQYxBOOxnbIJORLRso AtMHl/gCeZB5w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TGCzz4FShz9rxF; Thu, 18 Jan 2024 20:51:27 +0100 (CET) From: Philip Kaludercic To: Daniel Mendler Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87wmsdxvz6.fsf@daniel-mendler.de> (Daniel Mendler's message of "Sat, 13 Jan 2024 13:23:57 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 18 Jan 2024 19:51:27 +0000 Message-ID: <878r4ml8sg.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Daniel Mendler writes: > Eli Zaretskii writes: > >>> From: Philip Kaludercic >>> Cc: Daniel Mendler , 66554@debbugs.gnu.org, >>> monnier@iro.umontreal.ca, stefankangas@gmail.com >>> Date: Fri, 12 Jan 2024 22:27:37 +0000 >>> >>> Eli Zaretskii writes: >>> >>> >> > I guess I'm misunderstanding something. The scenario that I have in >>> >> > mind is this: >>> >> > >>> >> > . we bump Emacs version to NN.1.90 as part of pretesting version NN.2 >>> >> > . as part of the pretest, some function changes that requires >>> >> > addition or change in compat.el >>> >> > . compat.el still claims version NN.1, although it includes changes >>> >> > not present in Emacs NN.1 >>> >> > >>> >> > Did I succeed in explaining my worries? >>> >> >>> >> I hope I understood your reasoning correctly. Shortly after you bump >>> >> NN.1.90 we can release compat-NN.2.0 which will include the necessary >>> >> change. >>> > >>> > Release where? on ELPA or as part of the Emacs tarball? >>> > >>> > And how do we make sure we will not forget to release this new version >>> > of compat.el? >>> >>> We have to distinguish the ELPA package Compat and the compat.el file >>> being added here. >> >> Yes, we should. I'm asking exactly that: when you say "we can release >> compat-NN.2.0", do you mean ELPA or do you mean compat.el in Emacs? > > In this case we mean compat-NN.2.0 on ELPA. > >>> The ELPA package Compat is manually released on our >>> behalf, usually after a release of Emacs has been announced. The plan >>> is that the compat.el file does not have to be touched at all, since it >>> registers itself to use the right version, while Emacs is scraping the >>> for autoloads. So there shouldn't be any additional effort from the >>> side of Emacs maintenance, and nothing one can "forget". >> >> But that's exactly the problem I'm struggling with: compat.el in Emacs >> registers itself with inaccurate version, which lacks the last part >> after emacs-minor. > > The internal compat.el in Emacs does not register itself with an > inaccurate version. The version of compat.el in Emacs for a version NN.x > is always the newest version one can get by definition. > > If the Emacs version is 30.1, the version of the internal compat.el is > 30.1.most-positive-fixnum. This means the internal compat.el is > considered newer than any compat-30.1.x on ELPA. The reasoning is that > compat-30.1.x on ELPA cannot provide anything newer which is not already > in Emacs 30.1, and as such it is not necessary to install it. > > However if there exists a compat-30.2.x on ELPA, then this package will > take precendence over the internal compat.el with version > 30.1.most-positive-fixnum. Then the ELPA package compat-30.2.x can get > installed on an Emacs 30.1, if depended on by another ELPA package, > e.g., Magit. > > For example let's assume that Magit depends on compat-30.2. Note that > this dependency can either be satisfied by an ELPA compat-30.2.x or by > an internal compat.el with version 30.2.most-positive-fixnum. Magit > wants to take advantage of new APIs or API changes introduced in Emacs > 30.2, which are also made available by ELPA compat-30.2. This means in > this case ELPA compat-30.2.x must be installed if the internal compat.el > has version 30.1.most-positive-fixnum. > >> As for "forgetting", I do mean whoever should remember to release a >> new version of Compat on ELPA -- if this is a manual operation, it can >> be forgotten, especially if it has to be related to pretest releases >> as well as the official releases. > > Currently I am responsible of releasing new versions of Compat to ELPA. > But there is no risk of forgetting, or rather, it is okay to not release > new ELPA Compat versions immediately. There can be a time window. > > In the scenario described above, Magit wants to depend on compat-30.2. > Since Magit itself is released on ELPA, the package can only be > installed when compat-30.2 is available on ELPA. This means that Jonas > will only start to depend on compat-30.2 after I've released it to ELPA. > Before that has happened, Magit cannot take advantage of features which > have been introduced in Emacs 30.2. > >> I guess I lack an overall picture of how this is supposed to work, as >> part of our pretest and release flow. Could you or someone else post >> such a complete description? Without this, I'm not sure I agree with >> the changes being considered, or at least don't quite understand their >> impact on the routine maintenance. > > The inclusion of compat.el into Emacs won't have an impact on the Emacs > pretest or release flow. The Compat ELPA package can be released > independently as I described above. There are these reasons why we are > proposing the small compat.el file for inclusion: > > 1. It will be easier for :core packages which are available on ELPA to > take advantage of Compat. They can (require 'compat) and they don't have > to use (require 'compat nil 'noerror). > > 2. Core packages which use Compat do not have to replicate the > `compat-function' and `compat-call' macros in their own code. See > erc-compat.el for a core package, where these macros are already > duplicated with the names `erc-compat-function' and `erc-compat-call'. > Instead of this replication, erc-compat.el can just (require 'compat) > and use `compat-function' and `compat-call'. > > 3. Compat should not be installed automatically as dependency if Emacs > itself already provides the required API. For example on Emacs 30.1 I do > not want to install compat-30.1 from ELPA, since Emacs itself already > provides everything compat-30.1.x from ELPA ever could provide. Emacs is > in charge of the API definition and Compat won't add anything itself. > > Now to describe the pretest or release flows - the Emacs release flow > can proceeds as usual, as it has happened before with 28.1, 28.2, 29.1 > etc. The compat.el file as part of Emacs will not have to be updated or > changed. > > The ELPA package Compat will be released independently. After a release > of pretest Emacs-30.0 we may release Compat-30.0.x on ELPA. This does > not have to happen immediately. Only after Compat-30.0.x has landed on > ELPA, other ELPA packages (which for example depend on Emacs 26.1 as > base line) may start to depend on compat-30.0 and start using new Emacs > 30.0 functions or macros, e.g., `static-if'. Before the release of > Compat, an external package cannot take advantage of `static-if', since > the ELPA Compat does not provide it yet, and the base line Emacs 26.1 > does not provide it. > > Note that Compat on ELPA is already used by many packages exactly in the > way I've described. The inclusion of compat.el in Emacs will smoothen > the situation for core packages (which are also released to ELPA) and > will ensure that no unnecessary Compat package is installed, the points > 1, 2 and 3 I listed above. > > Daniel Pinging this thread with an updated version of the patch: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-the-public-API-of-Compat-to-the-core.patch >From 09ae06230f7ca541ba97dafc1d8b2388fc604d6a Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 13 Sep 2023 12:26:22 +0200 Subject: [PATCH] Add the public API of Compat to the core * lisp/emacs-lisp/compat.el: Add stub file with minimal definitions, so that core packages, that haven't been installed from ELPA, can make use of the public API and use more recent function signatures. * lisp/progmodes/python.el (compat): Remove 'noerror flag, because Compat can now be required without the real package being available. * doc/lispref/package.texi (Forwards-Compatibility): Mention Compat and link to the manual. * etc/NEWS: Document change. (Bug#66554) --- doc/lispref/package.texi | 13 ++++++ etc/NEWS | 11 ++++++ lisp/emacs-lisp/compat.el | 83 +++++++++++++++++++++++++++++++++++++++ lisp/progmodes/python.el | 2 +- 4 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 lisp/emacs-lisp/compat.el diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 6f52a33d194..9e652ab2515 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -28,6 +28,7 @@ Packaging * Multi-file Packages:: How to package multiple files. * Package Archives:: Maintaining package archives. * Archive Web Server:: Interfacing to an archive web server. +* Forwards-Compatibility:: Supporting older versions of Emacs. @end menu @node Packaging Basics @@ -390,3 +391,15 @@ Archive Web Server package, or the single file for a simple package. @end table + +@node Forwards-Compatibility +@section Supporting older versions of Emacs +@cindex compatibility compat + +Packages that wish to support older releases of Emacs, without giving +up on newer functionality from recent Emacs releases, one can make use +of the Compat package on GNU ELPA. For details on how to make use of +the package, @xref{Usage,, Usage, compat, "Compat" Manual}. In case +you don't have the package installed, you can also read the +@url{https://elpa.gnu.org/packages/doc/compat.html#Usage, Online +Compat manual}. diff --git a/etc/NEWS b/etc/NEWS index 735a05f6579..f599e54b168 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1309,6 +1309,17 @@ This minor mode generates the tags table automatically based on the current project configuration, and later updates it as you edit the files and save the changes. ++++ +** New package Compat +The Compat package on GNU ELPA provides forwards-compatibility +support, so that packages that still provide support for older +versions of Emacs can still make use of newer definitions that can be +reasonably re-implemented in Elisp. Now a "pseudo" Compat package is +part of Emacs, that doesn't provide any compatibility support, but +only implements the public-facing API of Compat so that core packages +can use Compat, while also preventing the installation of Compat on +the most recent version of Emacs. + * Incompatible Lisp Changes in Emacs 30.1 diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el new file mode 100644 index 00000000000..726b3fd298b --- /dev/null +++ b/lisp/emacs-lisp/compat.el @@ -0,0 +1,83 @@ +;;; compat.el --- Pseudo-Compatibility for Elisp -*- lexical-binding: t; -*- + +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. + +;; Author: \ +;; Philip Kaludercic , \ +;; Daniel Mendler +;; Maintainer: \ +;; Daniel Mendler , \ +;; Compat Development <~pkal/compat-devel@lists.sr.ht>, +;; emacs-devel@gnu.org +;; URL: https://github.com/emacs-compat/compat +;; Keywords: lisp, maint + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The Compat package on ELPA provides forward-compatibility +;; definitions for other packages. While mostly transparent, a +;; minimal API is necessary whenever core definitions change calling +;; conventions (e.g. `plist-get' can be invoked with a predicate from +;; Emacs 29.1 onward). For core packages on ELPA to be able to take +;; advantage of this functionality, the macros `compat-function' and +;; `compat-call' have to be available in the core, usable even if +;; users do not have the Compat package installed, which this file +;; ensures. + +;; You can find out more about Compat and how to use it from the Info +;; node `(compat) Top' (installed along with the Compat package) or +;; read the same manual online: +;; https.gnu.org/packages/doc/compat.html. + +;; Note that Compat is NOT a core package and this file is NOT +;; available on GNU ELPA. + +;;; Code: + +(defmacro compat-function (fun) + "Return compatibility function symbol for FUN. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + `#',fun) + +(defmacro compat-call (fun &rest args) + "Call compatibility function or macro FUN with ARGS. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + (cons fun args)) + +;;;; Hack to avoid installing Compat if not necessary + +;; The versioning scheme of the Compat package follows that of Emacs, +;; to indicate what version of Emacs is being supported. For example, +;; the Compat version number 29.2.3.9 would attempt to provide +;; compatibility definitions up to Emacs 29.2, while also designating +;; that this is the third major release and ninth minor release of +;; Compat, for the specific Emacs release. + +;; To ensure that if the user is using Emacs X.Y installed, the ELPA +;; package Compat X.Y.Z* (for any values of Z*) does not get +;; unnecessarily installed, as there are no missing features that +;; Compat could provide, we programmatically specify the version of +;; the package to be that of the current Emacs version plus a high +;; "major release" to exceed the major version of Compat. + +;;;###autoload (push (list 'compat emacs-major-version emacs-minor-version most-positive-fixnum) package--builtin-versions) + +(provide 'compat) +;;; compat.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index e2f614f52c2..1f4a8e01294 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -267,7 +267,7 @@ (eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. (require 'treesit) (require 'pcase) -(require 'compat nil 'noerror) +(require 'compat) (require 'project nil 'noerror) (require 'seq) -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 15:18:02 2024 Received: (at 66554) by debbugs.gnu.org; 18 Jan 2024 20:18:02 +0000 Received: from localhost ([127.0.0.1]:56768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQYpu-0003Ev-5U for submit@debbugs.gnu.org; Thu, 18 Jan 2024 15:18:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQYpq-0003EL-W5 for 66554@debbugs.gnu.org; Thu, 18 Jan 2024 15:18:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQYph-0003Gp-TT; Thu, 18 Jan 2024 15:17:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=p5lbroATQb3w6wkVULMJY5MelYj5Aap3PA1R0UAxAf4=; b=nylOFokLCBXY UGcsfGjWyi8rFUwyU3VJA0oPJx5rZa7nPemPrfiYVgB7X2r838bw7eSwLBDxclk9di+8iYc6VfRwH 3L5Idh/X1+tDMLXbLGZcjjcHkfKcxpKlSYtyqn+zDexGUCX195FYEuudXxcmdpCECh5Nc7wSba+jC +F+YsSw5IU1rewurpKoCOIsPsmB5aDrPbNGaqHJD0OPmawEJUhiNswQScM5h2LQKUiCCQD3ebSbS3 Jmo1sqFe4dh7B0L+n6yM6aQPk1QFtSS2J/W2fnK3l7DWODWQsOpJNso8YMgEkKmNhy2PpnTxuaW6h egR4eT9lDeheusmnv2HQjQ==; Date: Thu, 18 Jan 2024 22:17:43 +0200 Message-Id: <83v87qwg48.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <878r4ml8sg.fsf@posteo.net> (message from Philip Kaludercic on Thu, 18 Jan 2024 19:51:27 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: Eli Zaretskii , 66554@debbugs.gnu.org, > monnier@iro.umontreal.ca, stefankangas@gmail.com > Date: Thu, 18 Jan 2024 19:51:27 +0000 > > Pinging this thread with an updated version of the patch: I find the documentation of this arrangement still insufficient. The way this stuff works (which required Daniel to write 150 lines of explanation) is mostly kept out of the written docs, so we'll have to rely on people's memory. Can we document this machinery better? > +Packages that wish to support older releases of Emacs, without giving > +up on newer functionality from recent Emacs releases, one can make use > +of the Compat package on GNU ELPA. For details on how to make use of > +the package, @xref{Usage,, Usage, compat, "Compat" Manual}. In case ^^^^^ ^^ This should be "see @ref" or "@pxref". @xref is only suitable at the beginning of a statement. And please leave 2 spaces between sentences there. > +** New package Compat > +The Compat package on GNU ELPA provides forwards-compatibility > +support, so that packages that still provide support for older I think this is known as "backward compatibility". > +versions of Emacs can still make use of newer definitions that can be > +reasonably re-implemented in Elisp. Now a "pseudo" Compat package is > +part of Emacs, that doesn't provide any compatibility support, but > +only implements the public-facing API of Compat so that core packages > +can use Compat, while also preventing the installation of Compat on > +the most recent version of Emacs. Not sure this detailed description is useful. Why not just say that Compat is now also available with Emacs? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 15:18:55 2024 Received: (at 66554) by debbugs.gnu.org; 18 Jan 2024 20:18:55 +0000 Received: from localhost ([127.0.0.1]:56772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQYqk-0003Fz-Kt for submit@debbugs.gnu.org; Thu, 18 Jan 2024 15:18:54 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQYqi-0003Fm-1p for 66554@debbugs.gnu.org; Thu, 18 Jan 2024 15:18:53 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 82C1110007D; Thu, 18 Jan 2024 15:18:44 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1705609123; bh=O0O409BaXZhZ2+Zb2aEREn8c/BiPvfwu7alF1PGgCIY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ei/7qVYCD5HXsXAd4ly4bUibUQv/ID/rmw0bGVjaDzZw3+GfFyVe28ouQ7G+mQSc3 HNDiGs/RXWYedmbWfg1u1dJ4J3PoAIybjmGIi75BnkSR/H+e62wZqRWJCLjc/QjNBv PEniZWnztLB/Gc3GFEinBFa2jbXqXi+avIPlCtVG/6dDWC0SCEvH8ZJbgbb16IfUSM +njrqajENGCmLVbDtbo5JIuTMKefFkp6/n280gNrlE++6d1aJhUPQoRRpmw5dFs+rY lwbctFCAHqQ+DfzZ13kPVckBRILLMJ2/Ff+5Wb+csca3BMg7ats3HMt7XUKvdiEEtL 7/LSLxe9RLY8g== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 57FA010001D; Thu, 18 Jan 2024 15:18:43 -0500 (EST) Received: from alfajor (modemcable005.21-80-70.mc.videotron.ca [70.80.21.5]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 300491202CB; Thu, 18 Jan 2024 15:18:43 -0500 (EST) From: Stefan Monnier To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <878r4ml8sg.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 18 Jan 2024 19:51:27 +0000") Message-ID: References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> Date: Thu, 18 Jan 2024 15:18:42 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.175 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: Daniel Mendler , Eli Zaretskii , stefankangas@gmail.com, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > +;;;; Hack to avoid installing Compat if not necessary > + > +;; The versioning scheme of the Compat package follows that of Emacs, > +;; to indicate what version of Emacs is being supported. For example, > +;; the Compat version number 29.2.3.9 would attempt to provide > +;; compatibility definitions up to Emacs 29.2, while also designating > +;; that this is the third major release and ninth minor release of > +;; Compat, for the specific Emacs release. > + > +;; To ensure that if the user is using Emacs X.Y installed, the ELPA > +;; package Compat X.Y.Z* (for any values of Z*) does not get > +;; unnecessarily installed, as there are no missing features that > +;; Compat could provide, we programmatically specify the version of > +;; the package to be that of the current Emacs version plus a high > +;; "major release" to exceed the major version of Compat. > + > +;;;###autoload (push (list 'compat emacs-major-version emacs-minor-version most-positive-fixnum) package--builtin-versions) Hack? Why call it a hack? By definition a `compat-NN.MM` package is attempting to provide a subset of the API offered by Emacs-NN.MM, so Emacs-NN.MM very much provides a version of `compat-NN.MM`. IOW (push (list 'compat emacs-major-version emacs-minor-version ...) package--builtin-versions) is not a hack at all. If you want to label the `most-positive-fixnum` as a hack, I guess that's OK but then the comment should clarify what it's referring to. Also, please keep the line below the 80 columns limit, e.g.: ;;;###autoload (push (list 'compat emacs-major-version ;;;###autoload emacs-minor-version most-positive-fixnum) ;;;###autoload package--builtin-versions) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 15:33:42 2024 Received: (at 66554) by debbugs.gnu.org; 18 Jan 2024 20:33:42 +0000 Received: from localhost ([127.0.0.1]:56790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQZ53-0006Jb-SD for submit@debbugs.gnu.org; Thu, 18 Jan 2024 15:33:42 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:48318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQZ51-0006JL-V1 for 66554@debbugs.gnu.org; Thu, 18 Jan 2024 15:33:40 -0500 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-55a349cf29cso27969a12.0 for <66554@debbugs.gnu.org>; Thu, 18 Jan 2024 12:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705610012; x=1706214812; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=UvaaJgKpmR59JCZGzw+wcbfbcUvd5vF679uxDrSIEN4=; b=mtFPn/I0h+bhkCpvz92BiUQchRWyMiZ31GXqQkluTestWB3wIIZT9fDuLN00NTnlhD n0FmKSCigcgvn1BTZqaUmW8ShT7KQeBSY0C3/h4bhrUt7xAF5QRVgh0vIo7SBAs6WKD7 xznVrJSjwkPNeaaHcK42Gns/6kAbOzz50fm784a9WPDRX1Yx98p7ZkASFPZJRBUzM5Sa nlMvT268y8ArINppZrWdKRGJbOIHvTcdiMePGs6GE0gkCCD2LXE73lmc9xVJ3TO0aHvA xg551/D6/WHM44RJ8SE6pYSoldYujiK6iVgdrmWjZ+I+wm+Aum8vc6TlTR2zQMyQPinF aFGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705610012; x=1706214812; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UvaaJgKpmR59JCZGzw+wcbfbcUvd5vF679uxDrSIEN4=; b=a8QgWfQ/+2hMG/4QEtH/A3pMX8bQ4Peuads56gGuOFBcCT6QmLHHtNAQLvlEz5Rwmu pGB+AgTFTpApU4lTbptzJouE8NaNWoObhW4Nqu+Tu6ypJb0fHFIrhhulEy5e4bLddZQk FBZwl+37oss/wOtAQkWRr3C6OtWkBXURDVlcs9DjXhd9euM8AbpwzrppF4cMcKWWgq1G 32+njoPRZVaRW7nkKLEPe4l1z7Mk8fePE8v6d/qn1ecasRqx5HjSbVak1JnOHTwNSCVM sQct/ALDHAOkfZWS3+ZAT6Kzjtjz+wx0M+FRDOpKkgR4XKMyzwLhC17Q/Zmoy5tyvgh3 /aUQ== X-Gm-Message-State: AOJu0Ywtb5X6XNyPCrZbD9MUrTezzS22/8UBNwBE7+3vNZ5QtPlVLkgU EnX1YR1Meso1+zoEXpBf+QrClsP9X6eV6ZBRbdgK96aIqsWel06rVvvrZcgI/1FFaRjzBdGY5Fe 3Uoa7n1/c4vFa9DDAjORVvgJhSGk= X-Google-Smtp-Source: AGHT+IE5GWdEjZmW2pNl5C39L/BA4efIWSQeG+xRVnU4cPpn3RJshJZF53MDJyc2nRaKndyifqmT75fwYl16GU2K3bw= X-Received: by 2002:aa7:c412:0:b0:559:667c:efaa with SMTP id j18-20020aa7c412000000b00559667cefaamr823048edq.36.1705610012114; Thu, 18 Jan 2024 12:33:32 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 18 Jan 2024 12:33:31 -0800 From: Stefan Kangas In-Reply-To: <83v87qwg48.fsf@gnu.org> References: <87pm1ggrdx.fsf@posteo.net> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> MIME-Version: 1.0 Date: Thu, 18 Jan 2024 12:33:31 -0800 Message-ID: Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core To: Eli Zaretskii , Philip Kaludercic Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> +** New package Compat >> +The Compat package on GNU ELPA provides forwards-compatibility >> +support, so that packages that still provide support for older > > I think this is known as "backward compatibility". AFAIU, backwards-compatibility is about making code written for Emacs 28 work without changes on Emacs 29 (N -> N+1). But forwards-compatibility is about making code written for Emacs 29 work without changes on Emacs 28 (N -> N-1). Compat is doing the latter. >> +versions of Emacs can still make use of newer definitions that can be >> +reasonably re-implemented in Elisp. Now a "pseudo" Compat package is >> +part of Emacs, that doesn't provide any compatibility support, but >> +only implements the public-facing API of Compat so that core packages >> +can use Compat, while also preventing the installation of Compat on >> +the most recent version of Emacs. > > Not sure this detailed description is useful. Why not just say that > Compat is now also available with Emacs? Maybe this could be moved to the git commit message, and we could focus in the documentation on what the consequences are for users and authors of third-party packages (not authors of :core packages, who are basically in the know already). From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 15:36:12 2024 Received: (at 66554) by debbugs.gnu.org; 18 Jan 2024 20:36:13 +0000 Received: from localhost ([127.0.0.1]:56794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQZ7U-0006Nk-HD for submit@debbugs.gnu.org; Thu, 18 Jan 2024 15:36:12 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:42533 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQZ7R-0006NV-FK for 66554@debbugs.gnu.org; Thu, 18 Jan 2024 15:36:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OGqQxTnYlkvj/lS2kmyifYLcKxdflPp83FJS08/EZZw=; b=lKgZxeoOaRZB9hysJVfN79vtLw CwS9/aaERXy4MQ63pVAnpcJ6ZkEYheqGCaBPWV/m24Hjda7qaqnn4vl2WnUndXZmCF5RETZ+ttasY Bw12V49lVhfzJkDHqr18FHZajKPPqtoUskihlUDQ66Ykz5LZRQ7+ICQWgdtlDdKlJ/ow=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <83v87qwg48.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Jan 2024 22:17:43 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> Date: Thu, 18 Jan 2024 21:35:59 +0100 Message-ID: <87h6jaz8eo.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , monnier@iro.umontreal.ca, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , 66554@debbugs.gnu.org, >> monnier@iro.umontreal.ca, stefankangas@gmail.com >> Date: Thu, 18 Jan 2024 19:51:27 +0000 >> >> Pinging this thread with an updated version of the patch: > > I find the documentation of this arrangement still insufficient. The > way this stuff works (which required Daniel to write 150 lines of > explanation) is mostly kept out of the written docs, so we'll have to > rely on people's memory. Can we document this machinery better? I agree. Where do you suggest to add the documentation? My intention is to update the Compat manual (of the Compat ELPA package) with a more detailed explanation of the mechanism as soon as the compat.el file gets added to the Emacs core. We may want to avoid to duplicate the information, by keeping the documentation in the Emacs compat.el file concise, referring mainly to the Compat manual. As of now, the Compat manual already mentions the arrangement with the compat.el file in core as a possible future development, but does not expand on it in detail. This part of the manual will be updated and greatly expanded. >> +** New package Compat >> +The Compat package on GNU ELPA provides forwards-compatibility >> +support, so that packages that still provide support for older > > I think this is known as "backward compatibility". Compat allows packages to use APIs which are newer than the Emacs they depend on. A package depending on ((emacs "27.1") (compat "29.1")) relies on Emacs 27.1 as base line, but can use some APIs from 29.1, specifically the ones provided by Compat. Is there a better and more specific term for this than "forward compatibility"? Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 15:41:17 2024 Received: (at submit) by debbugs.gnu.org; 18 Jan 2024 20:41:17 +0000 Received: from localhost ([127.0.0.1]:56801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQZCO-0006Vf-NY for submit@debbugs.gnu.org; Thu, 18 Jan 2024 15:41:17 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQZCM-0006VG-Sd for submit@debbugs.gnu.org; Thu, 18 Jan 2024 15:41:15 -0500 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 1rQZCE-0004Z8-Ed for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 15:41:06 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQZCD-0003iH-0D; Thu, 18 Jan 2024 15:41:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=HJ5s+8S7EGd2LF9r9BB3fwbx2pBuLbCio4gNcslmXKA=; b=iWAWGnezTQW5U+95WW6stSUZrm zYwOWv3MQVPrQ4jnpO5UYzATlL5c4rZnlAY0vf5tzFrE7KwCryX8BTfQjb3KRwGnuvm4YnfYFkgCS Jrg47QDMvnWSNf0j3NNmoZmxQFXVUFXU/YQ384rzmPdq90Vy3lpQmID1Z0c2M5YxbicY=; From: Daniel Mendler To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: (Stefan Monnier via's message of "Thu, 18 Jan 2024 15:18:42 -0500") References: <87pm1ggrdx.fsf@posteo.net> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> Date: Thu, 18 Jan 2024 21:41:01 +0100 Message-ID: <87bk9iz86a.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: 66554@debbugs.gnu.org, Philip Kaludercic , Eli Zaretskii , Stefan Monnier , stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: >> +;;;; Hack to avoid installing Compat if not necessary >> + >> +;; The versioning scheme of the Compat package follows that of Emacs, >> +;; to indicate what version of Emacs is being supported. For example, >> +;; the Compat version number 29.2.3.9 would attempt to provide >> +;; compatibility definitions up to Emacs 29.2, while also designating >> +;; that this is the third major release and ninth minor release of >> +;; Compat, for the specific Emacs release. >> + >> +;; To ensure that if the user is using Emacs X.Y installed, the ELPA >> +;; package Compat X.Y.Z* (for any values of Z*) does not get >> +;; unnecessarily installed, as there are no missing features that >> +;; Compat could provide, we programmatically specify the version of >> +;; the package to be that of the current Emacs version plus a high >> +;; "major release" to exceed the major version of Compat. >> + >> +;;;###autoload (push (list 'compat emacs-major-version emacs-minor-version most-positive-fixnum) package--builtin-versions) > > Hack? Why call it a hack? > > By definition a `compat-NN.MM` package is attempting to provide a subset > of the API offered by Emacs-NN.MM, so Emacs-NN.MM very much provides > a version of `compat-NN.MM`. > IOW > > (push (list 'compat emacs-major-version emacs-minor-version ...) > package--builtin-versions) > > is not a hack at all. Yes, the specified version is not a hack, since it correctly encodes the API version provided by the compat.el in core. > If you want to label the `most-positive-fixnum` as a hack, I guess > that's OK but then the comment should clarify what it's referring to. I may be wrong, but I assume that Philip considers the autoload a hack. In this thread we discussed various alternatives to approach this problem, e.g., the package version regexp (another hack), or my naive idea of simply writing 29.1.9999 in the compat.el package header (yet another hack). Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 15:47:51 2024 Received: (at 66554) by debbugs.gnu.org; 18 Jan 2024 20:47:51 +0000 Received: from localhost ([127.0.0.1]:56806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQZIk-0000w9-RA for submit@debbugs.gnu.org; Thu, 18 Jan 2024 15:47:51 -0500 Received: from mout02.posteo.de ([185.67.36.66]:55735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQZIi-0000vB-Kp for 66554@debbugs.gnu.org; Thu, 18 Jan 2024 15:47:49 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 64499240103 for <66554@debbugs.gnu.org>; Thu, 18 Jan 2024 21:47:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705610860; bh=q8Q/41FvhT44yMSisYo6UsNXEzpOPLf361LoFA5jyU4=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=W+KcBNbDfQBeAykAmAbLdKMsVK+jQKMSuJEyNi9MrMjIhGe0MtbagvO71NrXUUiUJ A/tT6ttwUbXu/U/15p0NVnpN/MDxxU5h5ol1s30eSyTdJG3jtpH13/crBsjEykNbKn cxzAMlIc7+Hebju9dYU9JRk0uOVQ8cTG0bQwqG/yloFG4WUosVdqqJjrGh9xaKRR6X 4L0tcFZOAwnE8M6Ndcy3T0IQhm5IH5AM3u+2Y0vceI4YjufHug4uQMc0Pb2awDR1QN COotcSQaqpIviiJla+y7aherLxtuyHnzkuTcx6TgkWIGJ8n+9lDZRIAQ49f84phWhC 8Lieent2rekdA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TGFDq2RPpz6tvr; Thu, 18 Jan 2024 21:47:39 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <83v87qwg48.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Jan 2024 22:17:43 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 18 Jan 2024 20:47:38 +0000 Message-ID: <87wms6jrmd.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , 66554@debbugs.gnu.org, >> monnier@iro.umontreal.ca, stefankangas@gmail.com >> Date: Thu, 18 Jan 2024 19:51:27 +0000 >> >> Pinging this thread with an updated version of the patch: > > I find the documentation of this arrangement still insufficient. The > way this stuff works (which required Daniel to write 150 lines of > explanation) is mostly kept out of the written docs, so we'll have to > rely on people's memory. Can we document this machinery better? I can go into more detail, integrating what Daniel explained, my question just is if this is something that really interests someone reading the Elisp manual? One could duplicate or adjust the documentation for `compat-call' and `compat-function', but explaining things like how the compat.el file prevents installing Compat unnecessarily seems like an internal detail to me. >> +Packages that wish to support older releases of Emacs, without giving >> +up on newer functionality from recent Emacs releases, one can make use >> +of the Compat package on GNU ELPA. For details on how to make use of >> +the package, @xref{Usage,, Usage, compat, "Compat" Manual}. In case > ^^^^^ ^^ > This should be "see @ref" or "@pxref". @xref is only suitable at the > beginning of a statement. And please leave 2 spaces between sentences > there. Fixed. >> +** New package Compat >> +The Compat package on GNU ELPA provides forwards-compatibility >> +support, so that packages that still provide support for older > > I think this is known as "backward compatibility". My understanding is that "backwards compatibility" would refer to any measures, that would assist keeping old code working in newer versions of Emacs. Compat doesn't do that (let alone the compat.el from this patch), it just allows older packages to use newer functionality that can be replicated for older systems. The term is also used by the nadvice package on ELPA. >> +versions of Emacs can still make use of newer definitions that can be >> +reasonably re-implemented in Elisp. Now a "pseudo" Compat package is >> +part of Emacs, that doesn't provide any compatibility support, but >> +only implements the public-facing API of Compat so that core packages >> +can use Compat, while also preventing the installation of Compat on >> +the most recent version of Emacs. > > Not sure this detailed description is useful. Why not just say that > Compat is now also available with Emacs? I was not sure how much detail to give, but if you think it is too much, I can of course remove it. Stefan Monnier writes: >> +;;;; Hack to avoid installing Compat if not necessary >> + >> +;; The versioning scheme of the Compat package follows that of Emacs, >> +;; to indicate what version of Emacs is being supported. For example, >> +;; the Compat version number 29.2.3.9 would attempt to provide >> +;; compatibility definitions up to Emacs 29.2, while also designating >> +;; that this is the third major release and ninth minor release of >> +;; Compat, for the specific Emacs release. >> + >> +;; To ensure that if the user is using Emacs X.Y installed, the ELPA >> +;; package Compat X.Y.Z* (for any values of Z*) does not get >> +;; unnecessarily installed, as there are no missing features that >> +;; Compat could provide, we programmatically specify the version of >> +;; the package to be that of the current Emacs version plus a high >> +;; "major release" to exceed the major version of Compat. >> + >> +;;;###autoload (push (list 'compat emacs-major-version >> emacs-minor-version most-positive-fixnum) package--builtin-versions) > > Hack? Why call it a hack? > > By definition a `compat-NN.MM` package is attempting to provide a subset > of the API offered by Emacs-NN.MM, so Emacs-NN.MM very much provides > a version of `compat-NN.MM`. > IOW > > (push (list 'compat emacs-major-version emacs-minor-version ...) > package--builtin-versions) > > is not a hack at all. > > If you want to label the `most-positive-fixnum` as a hack, I guess > that's OK but then the comment should clarify what it's referring to. In this case I just meant "hack" in the sense of a "clever trick", since it was not immediately obvious to anyone until you brought it up. > Also, please keep the line below the 80 columns limit, e.g.: > > ;;;###autoload (push (list 'compat emacs-major-version > ;;;###autoload emacs-minor-version most-positive-fixnum) > ;;;###autoload package--builtin-versions) Sure, done. > > -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 18:34:44 2024 Received: (at 66554) by debbugs.gnu.org; 18 Jan 2024 23:34:44 +0000 Received: from localhost ([127.0.0.1]:56991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQbuG-0001Fy-2V for submit@debbugs.gnu.org; Thu, 18 Jan 2024 18:34:44 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:54551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQbuD-0001Fk-SF for 66554@debbugs.gnu.org; Thu, 18 Jan 2024 18:34:42 -0500 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-55a44bb66d3so156658a12.1 for <66554@debbugs.gnu.org>; Thu, 18 Jan 2024 15:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705620874; x=1706225674; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=UVgFxkqo7KJ+JgaSRxykAf9m6Sijatmfci6DJ5zuqwA=; b=Cq5H07GFCQRWaDciZxPE4kVUl7s66IVzSEeCB8XeK6PsdexOyvbxFYsHHiBWOnrM3w dNb5YPxjJatLObGAeaukAwXHoUzet0FOXX05vm+YUzHx57Y+38J4tv7S5+05Mj8aVz5k xgainqK9sWEmwARdEQlOfsIpI/SzN890MtrY67SMkcytO526rsESVoByG7BN5CNV378t uj3yc1oTcEYY/2Zwi9eiOL2bruiqviJ5ORaZocp1EMiGp4kjJK0StF1mJgrmbMbU9zEm NcMwaLLeMWbB5jbrV/vOeb0E16xIMM/v/GWPCwp1xsaVnnUKHmZLLSP8vnY2kgphM8oJ 7IvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705620874; x=1706225674; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UVgFxkqo7KJ+JgaSRxykAf9m6Sijatmfci6DJ5zuqwA=; b=ukCKKL3ScF4MqeVysvS4dDQRGSfpLYuUTjXMJ1B6ugMEh9aHMXsnaWNMz/K9wjX0W+ j7+lbEb2Z5DPYQSK5WNMjgGtjbm2hrauWkwO/ckZBOpmFyA+qCkjB0/v35/O8YXbBnsg TWUJr6q5w+2Xs28P3cBLZWdajF5cPu3FDqJ1CYmFactz8DeFn1mc0w0wLYqMD1fUPgQb YuQrRS6yLrcFIPW9Dx4t3fr4jWAe8a8Y4wbiO1sgQR1pA51/zgzybkvaIk6823G4aaZG bSupK7tqtTl2F2y7BwGIPSJwcns+Bk37ZhRJn53vtzOKUcaoLJagyLANMNhMkFMrdAUm UgkQ== X-Gm-Message-State: AOJu0YwrhT7hA6NQ/Q01lMlI4uQzryEWk96GNugXqbHydV91VVjNnPYR 4vhFYQLEThU/nJuAwB8jxzNgrxYXnHgvxpLoDa+BR4o64y/0ZPrGC4Z7JCexY9++68fjLv9WeVu y4WqBqfBbxz06uN6y+bpsLYBNUfU= X-Google-Smtp-Source: AGHT+IHA9FNaLI7qZCl6eCHsOQao12DEfwqWN9VoAG2MwoDB6blm8uex7MGAVGmzEHHw5iSAYTu1gkjHdW1skldz3Ms= X-Received: by 2002:a05:6402:50cf:b0:55a:4f03:b7fa with SMTP id h15-20020a05640250cf00b0055a4f03b7famr320684edb.52.1705620873535; Thu, 18 Jan 2024 15:34:33 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 18 Jan 2024 15:34:32 -0800 From: Stefan Kangas In-Reply-To: <87bk9iz86a.fsf@daniel-mendler.de> References: <87pm1ggrdx.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <87bk9iz86a.fsf@daniel-mendler.de> MIME-Version: 1.0 Date: Thu, 18 Jan 2024 15:34:32 -0800 Message-ID: Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core To: Daniel Mendler Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , Eli Zaretskii , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Daniel Mendler writes: >> If you want to label the `most-positive-fixnum` as a hack, I guess >> that's OK but then the comment should clarify what it's referring to. > > I may be wrong, but I assume that Philip considers the autoload a hack. > In this thread we discussed various alternatives to approach this > problem, e.g., the package version regexp (another hack), or my naive > idea of simply writing 29.1.9999 in the compat.el package header (yet > another hack). IMHO, the "naive" (why naive?) number 9999 is more readable, and in practice will be the same as using most-positive-fixnum. So I'd just use that. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 00:49:16 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 05:49:16 +0000 Received: from localhost ([127.0.0.1]:57248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQhkh-0002y4-Mz for submit@debbugs.gnu.org; Fri, 19 Jan 2024 00:49:15 -0500 Received: from mout01.posteo.de ([185.67.36.65]:60715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQhkg-0002xs-27 for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 00:49:14 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F2163240027 for <66554@debbugs.gnu.org>; Fri, 19 Jan 2024 06:49:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705643346; bh=62uePJ1ol6RGoV4+MQitoyF4cYvqAL5D1oSmCtzukvY=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=ZV9BVQpn87TCp6SIER1XUPHg1V74lA4Qg3ddtRvCrTV/b7yLkG9uikWaUOXNL0s9v 1cYvuTf8Dnv6srM5HBRIXvRGREag99CNYA1vL3gRecg6PcKxOel+FajzwKdtBizj/O ZbI6r8dlzceGEBZYoItnZnIFgXmoyLy7hCiimmc9PhfLuO6ktlWcqfEsPRddo843as LyJaGPbO2k8FWXIcvmMqLvTWOu5TP64kb5YVDaWoXCLyx/puKH200+s5kcG8JzmeMz BhQhcC4U1Ci91SfXG5UpX2xMQPwr2wr3v/wCoTfFc/0NYJgWPCRMRQZIC3+LmX7HgS pBCwSZTu8SzHg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TGTFX2wt3z9rxB; Fri, 19 Jan 2024 06:49:04 +0100 (CET) From: Philip Kaludercic To: Stefan Kangas Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: (Stefan Kangas's message of "Thu, 18 Jan 2024 15:34:32 -0800") References: <87pm1ggrdx.fsf@posteo.net> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <87bk9iz86a.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 19 Jan 2024 05:49:03 +0000 Message-ID: <875xzpvpo0.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: Daniel Mendler , Eli Zaretskii , Stefan Monnier , 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Kangas writes: > Daniel Mendler writes: > >>> If you want to label the `most-positive-fixnum` as a hack, I guess >>> that's OK but then the comment should clarify what it's referring to. >> >> I may be wrong, but I assume that Philip considers the autoload a hack. >> In this thread we discussed various alternatives to approach this >> problem, e.g., the package version regexp (another hack), or my naive >> idea of simply writing 29.1.9999 in the compat.el package header (yet >> another hack). > > IMHO, the "naive" (why naive?) number 9999 is more readable, and in > practice will be the same as using most-positive-fixnum. So I'd just > use that. We can also use 1.0e+INF, unless there is a reason to avoid non-fixnums in version strings? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 01:40:45 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 06:40:45 +0000 Received: from localhost ([127.0.0.1]:57286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQiYX-0004BV-3v for submit@debbugs.gnu.org; Fri, 19 Jan 2024 01:40:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQiYV-0004BI-Ub for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 01:40:44 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQiYN-0005OZ-7G; Fri, 19 Jan 2024 01:40:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Sm9LJGsaHqUQ/+u0pKmfgmSHa3lW1RBixis/DTuCaI4=; b=FNUXlOsMR5T+ hCwKdbRU7rMB9qApGWA0Mft45D06xRAuXQ+On4KSJUYD5017dIUztVkLypmtv/lJ6iKlpXuJhuroR y5rsbrGCe0BTf9w26hQR2SfafSi6vneI41C5xakcRQSB3Tj5v2z0MrVTXrop+ozOKYEs+OmJ9YHBv 4w9c6Fd+TMModY9266ihNKc5bp36QWFLGceqDcGJsnw2ZI2YNPQgkNJF9RF9Ayh1FWvphnSJBQjyj mC5y3xMJb+bzt2XG7hLFvavCmy5jbSy3qTmXkihEuv8/gosAgQXKXnWW6BavfhfYq6y3WeHOB1CUx F7eDx4w/9w8i2BjCVYASdA==; Date: Fri, 19 Jan 2024 08:40:29 +0200 Message-Id: <83sf2tx1uq.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Thu, 18 Jan 2024 12:33:31 -0800) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, philipk@posteo.net, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Thu, 18 Jan 2024 12:33:31 -0800 > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, monnier@iro.umontreal.ca > > Eli Zaretskii writes: > > >> +** New package Compat > >> +The Compat package on GNU ELPA provides forwards-compatibility > >> +support, so that packages that still provide support for older > > > > I think this is known as "backward compatibility". > > AFAIU, backwards-compatibility is about making code written for Emacs 28 > work without changes on Emacs 29 (N -> N+1). > > But forwards-compatibility is about making code written for Emacs 29 > work without changes on Emacs 28 (N -> N-1). > > Compat is doing the latter. AFAIU, Compat allows Lisp programs written for newer Emacs version to work with older Emacs versions. This makes those Lisp programs compatible with old versions of Emacs, and in my book this is backwards-compatibility. But if I'm the only one who thinks that, so be it. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 01:43:09 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 06:43:09 +0000 Received: from localhost ([127.0.0.1]:57290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQiaq-0004G8-MV for submit@debbugs.gnu.org; Fri, 19 Jan 2024 01:43:09 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:47739 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQiap-0004Ff-IU for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 01:43:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9AOQCBLbV45Lx7Ml38gggpfjmotVWrMBcC3FqI4xgJ8=; b=FX52WxB7/cbVwmMaGF+8BMMIyA eHPbrLhjpECsrssjkVX8wfuh0SPhrvxIUFCgyrf8X2Ao0kNNi7gf6iOlc1xpkjJfllGsBdPA055Tr 2d0fojlGghL0XN0Ymc7/P4o1IKDtK/M6gy2d9D6kmRigduhe59yvKzvZFi+w+sca5Nck=; From: Daniel Mendler To: Stefan Kangas Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: (Stefan Kangas's message of "Thu, 18 Jan 2024 15:34:32 -0800") References: <87pm1ggrdx.fsf@posteo.net> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <87bk9iz86a.fsf@daniel-mendler.de> Date: Fri, 19 Jan 2024 07:42:57 +0100 Message-ID: <87wms56cy6.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , Eli Zaretskii , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > Daniel Mendler writes: > >>> If you want to label the `most-positive-fixnum` as a hack, I guess >>> that's OK but then the comment should clarify what it's referring to. >> >> I may be wrong, but I assume that Philip considers the autoload a hack. >> In this thread we discussed various alternatives to approach this >> problem, e.g., the package version regexp (another hack), or my naive >> idea of simply writing 29.1.9999 in the compat.el package header (yet >> another hack). > > IMHO, the "naive" (why naive?) number 9999 is more readable, and in > practice will be the same as using most-positive-fixnum. So I'd just > use that. The number 9999 is of course more than large enough. What I meant here - not the choice of the number is what one may consider a hack, but the way we register the version of the builtin compat.el package. There were multiple ways which have been discussed in this thread: - Write the package version of compat.el directly in the header. This was my first proposal. This is not ideal since it requires the maintainer to update the header whenever a new version of Emacs is released. Therefore naive. - Stefan Monnier proposed to instead use an autoload and to dynamically "compute" and register the builtin compat.el version. I consider this a clever trick. It is maybe a bit unconventional to register builtin package versions like this, but it will work perfectly well and doesn't require any intervention. There is no risk that one can forget to update the package header. If we register (emacs-major-version emacs-minor-version 9999), (emacs-major-version emacs-minor-version most-positive-fixnum) or (emacs-major-version emacs-minor-version 1.0e+INF) will not make any difference in practice. As long as the number is large enough, it will work. We should still keep the reader of the code in mind, who may wonder about the magic number and about the special package version registration, so a comment is certainly justified. Philip did include such an explanation in his patch. We should only replace the word "Hack" with "Clever trick" in the comment. Daniel From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 01:44:12 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 06:44:12 +0000 Received: from localhost ([127.0.0.1]:57295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQibs-0004IC-5i for submit@debbugs.gnu.org; Fri, 19 Jan 2024 01:44:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQibo-0004Hw-Q5 for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 01:44:10 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQibf-0005tT-M5; Fri, 19 Jan 2024 01:44:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lVX25SZjs9crMEj5qxwM2cSxLLKbN6sfEs/8x792q8Y=; b=px/cd1+G2z3Y fEKtuyDYw9+V2sovk3R5oRVP8Qij1rXg8almDaB1QKdmAX03NJEKU8bfPH3Omx7CZRH5HCXnH8c3n OehL06DdvdxGvL39yL0ijO52rshKGrIjkjQqiBpTUIKSnRw8CfnKpQyZddaABzw4OMBtPPeNCEZtx GWnBnMxWptaThISjsq5UXnDsuSvSYL59U/JyMBVuRtxtHK8jCHqnCYBNzhKK9AzZQ+dl4WfajL8Ly YFTA/Nuj1HPCsuvi7zv863mi8cLnbwnaK+GlLJuJiMYkH4SxuA4JxqIEAJRd4wOEmQ+3VByDKmckC MpLdxP9WsTfch4md4hJsxg==; Date: Fri, 19 Jan 2024 08:43:54 +0200 Message-Id: <83r0idx1p1.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <87h6jaz8eo.fsf@daniel-mendler.de> (message from Daniel Mendler on Thu, 18 Jan 2024 21:35:59 +0100) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Mendler > Cc: Philip Kaludercic , 66554@debbugs.gnu.org, > monnier@iro.umontreal.ca, stefankangas@gmail.com > Date: Thu, 18 Jan 2024 21:35:59 +0100 > > Eli Zaretskii writes: > > > I find the documentation of this arrangement still insufficient. The > > way this stuff works (which required Daniel to write 150 lines of > > explanation) is mostly kept out of the written docs, so we'll have to > > rely on people's memory. Can we document this machinery better? > > I agree. Where do you suggest to add the documentation? My intention is > to update the Compat manual (of the Compat ELPA package) with a more > detailed explanation of the mechanism as soon as the compat.el file gets > added to the Emacs core. We may want to avoid to duplicate the > information, by keeping the documentation in the Emacs compat.el file > concise, referring mainly to the Compat manual. The Compat manual cannot be the only place, because the information I'm talking about should be aimed at the Emacs developers, so it must be part of Emacs. I suggest to have it in the commentary in compat.el. > >> +** New package Compat > >> +The Compat package on GNU ELPA provides forwards-compatibility > >> +support, so that packages that still provide support for older > > > > I think this is known as "backward compatibility". > > Compat allows packages to use APIs which are newer than the Emacs they > depend on. A package depending on ((emacs "27.1") (compat "29.1")) > relies on Emacs 27.1 as base line, but can use some APIs from 29.1, > specifically the ones provided by Compat. Is there a better and more > specific term for this than "forward compatibility"? How about Compat allows packages written for newer Emacs version to still work with older Emacs versions. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 01:47:35 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 06:47:35 +0000 Received: from localhost ([127.0.0.1]:57300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQif8-00073F-Qt for submit@debbugs.gnu.org; Fri, 19 Jan 2024 01:47:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQif6-00072r-1z for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 01:47:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQieu-0006Tr-8E; Fri, 19 Jan 2024 01:47:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZSyZO0CpPsUwWNYtD8XAJkiDnwzSwNOmg0W7h0mBkN0=; b=K6mPOhSCrYPR gTp0pBR1F3UD2iEZgkpIsUBqJ85MCtXxKLQp90+yujcJMrnHWQkw5ztHlehZyz/PhtiaqXIwH3271 S85+OEL4CKPo7ju043bmvydKop94PLd5YlaeHYdoXRgNV4b0CGgeCw3jey58YtOtgG98CGYooFwib HJscwPvQhsyUG9sWvSD3hKvZsig7tESpK51P9quluMK2feQnprYYgFLBVxSFQVDWLx4gDAOs5TZf7 D+nUQRD2cm0XUy80J8YFtwNmJf9r8HKYn4vRxktO4kWWMFkpz3/WEC3SpBrui+teZTMybqXyMH1Bd LEIJPeikMoLKg+Na7ozV4w==; Date: Fri, 19 Jan 2024 08:47:12 +0200 Message-Id: <83plxxx1jj.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87wms6jrmd.fsf@posteo.net> (message from Philip Kaludercic on Thu, 18 Jan 2024 20:47:38 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87wms6jrmd.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, > monnier@iro.umontreal.ca, stefankangas@gmail.com > Date: Thu, 18 Jan 2024 20:47:38 +0000 > > Eli Zaretskii writes: > > >> From: Philip Kaludercic > >> Cc: Eli Zaretskii , 66554@debbugs.gnu.org, > >> monnier@iro.umontreal.ca, stefankangas@gmail.com > >> Date: Thu, 18 Jan 2024 19:51:27 +0000 > >> > >> Pinging this thread with an updated version of the patch: > > > > I find the documentation of this arrangement still insufficient. The > > way this stuff works (which required Daniel to write 150 lines of > > explanation) is mostly kept out of the written docs, so we'll have to > > rely on people's memory. Can we document this machinery better? > > I can go into more detail, integrating what Daniel explained, my > question just is if this is something that really interests someone > reading the Elisp manual? My suggestion is to have the details in compat.el; the ELisp reference should just mention the package as the recommended means for making 3rd-party and ELPA packages compatible with older Emacs versions. > In this case I just meant "hack" in the sense of a "clever trick", since > it was not immediately obvious to anyone until you brought it up. I believe we call that a "kludge". From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 01:53:04 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 06:53:04 +0000 Received: from localhost ([127.0.0.1]:57309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQikS-0007Hv-5y for submit@debbugs.gnu.org; Fri, 19 Jan 2024 01:53:04 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:60069 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQikP-0007HN-SZ for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 01:53:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=u+zmcdaknJ6oTEmDNrVzdnTP6hdh4RmWi18MHTiyunI=; b=k94NFIA8J8hRT/xUxcHQHk5ude d7QxuottlpE5vVG52V6SSR7p+cYx7hybfWzJPO4mJaiFQYZiI2ucaG5C24XKuiX2IIvn0O/34eAr3 ogUVllxDji8d6xW9db1KzO1qiuptjcxo/Si80QU3pyvYw1jSbXFJ1JaT3H9OMJKDZ1Fk=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <83sf2tx1uq.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Jan 2024 08:40:29 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <83sf2tx1uq.fsf@gnu.org> Date: Fri, 19 Jan 2024 07:52:51 +0100 Message-ID: <87ttn96cho.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, Stefan Kangas , monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Stefan Kangas >> Date: Thu, 18 Jan 2024 12:33:31 -0800 >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, monnier@iro.umontreal.ca >> >> Eli Zaretskii writes: >> >> >> +** New package Compat >> >> +The Compat package on GNU ELPA provides forwards-compatibility >> >> +support, so that packages that still provide support for older >> > >> > I think this is known as "backward compatibility". >> >> AFAIU, backwards-compatibility is about making code written for Emacs 28 >> work without changes on Emacs 29 (N -> N+1). >> >> But forwards-compatibility is about making code written for Emacs 29 >> work without changes on Emacs 28 (N -> N-1). >> >> Compat is doing the latter. > > AFAIU, Compat allows Lisp programs written for newer Emacs version to > work with older Emacs versions. This makes those Lisp programs > compatible with old versions of Emacs, and in my book this is > backwards-compatibility. But if I'm the only one who thinks that, so > be it. That's right. To formulate this differently, Compat allows Lisp programs written for old Emacs versions to use newer Emacs features. This makes Compat a forwards-compatibility library for the newer Emacs features. The difference is what you consider the base line Emacs version. A package could for example specify `Package-Requires: ((emacs "27.1") (compat "29.1"))' in its package header. The header means that the package was written for an old Emacs (27.1) but takes advantage of newer features (29.1). However one may also say that the package is actually for 29.1 and was back-ported via Compat to 27.1. This could indeed have happened if one looks at the history of the package. Daniel From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 01:58:03 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 06:58:03 +0000 Received: from localhost ([127.0.0.1]:57313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQipH-0007Pu-03 for submit@debbugs.gnu.org; Fri, 19 Jan 2024 01:58:03 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:47985 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQipD-0007PL-W1 for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 01:58:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xmfsw0XHpL4ABZ3l6A+rgfXq60vEibVO6+fwT4cP1+c=; b=c02KIYVA+SogFN9d7oiXkb60w0 mIqjq3VA5UVtwKpsolqxYLMK329Sp3Afpw+88KVqQMQCKqB16cIxm0w2FgdSvFQvp2G/BRRd8/hFL CecZbM8FgecT6svVgSO5dwRkFPlwffnzJDmofVceoy9p6r3Q7Ku7pLDRPuEhtuxCWP8E=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <83r0idx1p1.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Jan 2024 08:43:54 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> Date: Fri, 19 Jan 2024 07:57:51 +0100 Message-ID: <87r0id6c9c.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: Philip Kaludercic , 66554@debbugs.gnu.org, >> monnier@iro.umontreal.ca, stefankangas@gmail.com >> Date: Thu, 18 Jan 2024 21:35:59 +0100 >> >> Eli Zaretskii writes: >> >> > I find the documentation of this arrangement still insufficient. The >> > way this stuff works (which required Daniel to write 150 lines of >> > explanation) is mostly kept out of the written docs, so we'll have to >> > rely on people's memory. Can we document this machinery better? >> >> I agree. Where do you suggest to add the documentation? My intention is >> to update the Compat manual (of the Compat ELPA package) with a more >> detailed explanation of the mechanism as soon as the compat.el file gets >> added to the Emacs core. We may want to avoid to duplicate the >> information, by keeping the documentation in the Emacs compat.el file >> concise, referring mainly to the Compat manual. > > The Compat manual cannot be the only place, because the information > I'm talking about should be aimed at the Emacs developers, so it must > be part of Emacs. I suggest to have it in the commentary in > compat.el. Okay, let's add the information to the commentary. Then we also copy the information to the Compat manual, to a section where we describe how the versioning works. >> >> +** New package Compat >> >> +The Compat package on GNU ELPA provides forwards-compatibility >> >> +support, so that packages that still provide support for older >> > >> > I think this is known as "backward compatibility". >> >> Compat allows packages to use APIs which are newer than the Emacs they >> depend on. A package depending on ((emacs "27.1") (compat "29.1")) >> relies on Emacs 27.1 as base line, but can use some APIs from 29.1, >> specifically the ones provided by Compat. Is there a better and more >> specific term for this than "forward compatibility"? > > How about > > Compat allows packages written for newer Emacs version to still work > with older Emacs versions. I think this formulation gets it backwards. See my other mail regarding backward- vs forwards-compatibility. One could also write: Compat allows packages written for older Emacs versions to use features introduced in newer Emacs versions. Daniel From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 11:44:21 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 16:44:21 +0000 Received: from localhost ([127.0.0.1]:60046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQryf-0002oU-0Q for submit@debbugs.gnu.org; Fri, 19 Jan 2024 11:44:21 -0500 Received: from mout02.posteo.de ([185.67.36.66]:37975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQryc-0002o5-AO for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 11:44:19 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C3458240104 for <66554@debbugs.gnu.org>; Fri, 19 Jan 2024 17:44:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705682649; bh=1AFFLNyHCvFmmgJ//YIz1QOiYCjV+IOfhsDW/7L0Zz4=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=VM91tmPWnkEF6a0DQt+32NUOwtvrPZqsfGoqcfv8CKlF3iTL/PxCJJv50za1MyQmK AqGGfvNvMm1SR1tGasseHZKbVF325gUGSKXlbIDMOglOHpd7pWCQsV3fxQlrwUyuSF 48Q3PMFg3wqyZ/XOjMGfIyBupJp8fziaIz//0NEjPokRTXJ25MxfCpT5n1JmkfhjBd yahjToGyPrHr+mLiKLkZjcn06sh0mGt4Z6r26Mu1sTJcvJmAoxUx5eoV22SOl4tFw9 eWvV8D33CB5rbFq4q0K16zgiqTZYLXpHo2xLDhW+aUGaQpZWIdt/tS3skYPD+/7BkR +mY8+LMh/srmQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TGlnN0NgQz9rxK; Fri, 19 Jan 2024 17:44:08 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <83r0idx1p1.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 19 Jan 2024 08:43:54 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 19 Jan 2024 16:44:06 +0000 Message-ID: <87mst1tgrt.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: Daniel Mendler , stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: Philip Kaludercic , 66554@debbugs.gnu.org, >> monnier@iro.umontreal.ca, stefankangas@gmail.com >> Date: Thu, 18 Jan 2024 21:35:59 +0100 >> >> Eli Zaretskii writes: >> >> > I find the documentation of this arrangement still insufficient. The >> > way this stuff works (which required Daniel to write 150 lines of >> > explanation) is mostly kept out of the written docs, so we'll have to >> > rely on people's memory. Can we document this machinery better? >> >> I agree. Where do you suggest to add the documentation? My intention is >> to update the Compat manual (of the Compat ELPA package) with a more >> detailed explanation of the mechanism as soon as the compat.el file gets >> added to the Emacs core. We may want to avoid to duplicate the >> information, by keeping the documentation in the Emacs compat.el file >> concise, referring mainly to the Compat manual. > > The Compat manual cannot be the only place, because the information > I'm talking about should be aimed at the Emacs developers, so it must > be part of Emacs. I suggest to have it in the commentary in > compat.el. OK. >> >> +** New package Compat >> >> +The Compat package on GNU ELPA provides forwards-compatibility >> >> +support, so that packages that still provide support for older >> > >> > I think this is known as "backward compatibility". >> >> Compat allows packages to use APIs which are newer than the Emacs they >> depend on. A package depending on ((emacs "27.1") (compat "29.1")) >> relies on Emacs 27.1 as base line, but can use some APIs from 29.1, >> specifically the ones provided by Compat. Is there a better and more >> specific term for this than "forward compatibility"? > > How about > > Compat allows packages written for newer Emacs version to still work > with older Emacs versions. I think the danger here is that Compat cannot provide full compatibility support (some features either too complex to maintain, too slow to reproduce or requiring changes in the core), so the way you phrase it sounds like more than is being delivered. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 13:51:17 2024 Received: (at 66554) by debbugs.gnu.org; 19 Jan 2024 18:51:17 +0000 Received: from localhost ([127.0.0.1]:60131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQtxU-00056x-Q8 for submit@debbugs.gnu.org; Fri, 19 Jan 2024 13:51:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQtxS-00056h-Gw for 66554@debbugs.gnu.org; Fri, 19 Jan 2024 13:51:15 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQtxI-00076n-4J; Fri, 19 Jan 2024 13:51:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4ccOvEBaY4il4BNO6W5yoDSJ3OQBZ7SHX211eKdTm/Y=; b=kmRMZLDLCY6Z NbxoaAkIEOsWTPkpSnS3nW/W1O/kUKKbIb7iO8G6HQPiZUYoFD0QHA9No+eqtMG75jXBmO1J7Gw3M vC3HAq3Ecqn1RWp1F+HWOVh3yF+01oK3zhqcJZ55bjZyNVhf8C2dk1hhTR0u1G9iOLUgW5tp658Ft u1Mf7H/qan882sJrOc0o3chgEzrP0D7/aWxu8w/f8GsfpdrZjJU6ByLYkIRX8ZigJ+RJv4CPlSV9Y Bqud7l2sQvLfuBKN6ZcgRfMJRI7tTKCQNnu6irnmI+HirvD3Y72HbRuYwarUy7wy35p7FDzKBxkSu 5/T3eEZk2kRIeTI5BY8i2w==; Date: Fri, 19 Jan 2024 20:50:55 +0200 Message-Id: <83il3pupgw.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87mst1tgrt.fsf@posteo.net> (message from Philip Kaludercic on Fri, 19 Jan 2024 16:44:06 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: Daniel Mendler , 66554@debbugs.gnu.org, > monnier@iro.umontreal.ca, stefankangas@gmail.com > Date: Fri, 19 Jan 2024 16:44:06 +0000 > > Eli Zaretskii writes: > > >> Compat allows packages to use APIs which are newer than the Emacs they > >> depend on. A package depending on ((emacs "27.1") (compat "29.1")) > >> relies on Emacs 27.1 as base line, but can use some APIs from 29.1, > >> specifically the ones provided by Compat. Is there a better and more > >> specific term for this than "forward compatibility"? > > > > How about > > > > Compat allows packages written for newer Emacs version to still work > > with older Emacs versions. > > I think the danger here is that Compat cannot provide full compatibility > support (some features either too complex to maintain, too slow to > reproduce or requiring changes in the core), so the way you phrase it > sounds like more than is being delivered. I fail to see how what I wrote is different from the text quoted above that. If my text promises more than is being delivered, so is the original text. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 24 01:23:23 2024 Received: (at 66554) by debbugs.gnu.org; 24 Jan 2024 06:23:23 +0000 Received: from localhost ([127.0.0.1]:44320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSWfT-0001CQ-Ds for submit@debbugs.gnu.org; Wed, 24 Jan 2024 01:23:23 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:54551 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSWfQ-0001C7-U7 for 66554@debbugs.gnu.org; Wed, 24 Jan 2024 01:23:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=T/IdXgdjTYv0aOq0HlhJKxETZg1EN9p5IXQakYz/ydI=; b=qnErjDmjwnX3vP+5xl7CvSau1v YMEiNAJA+JdRQ+2V+JCeivrw+Lha82Kv+pIsM2Sy0rODsMhZkW6CYGl77v7OShp3ev+jCiy5FgRzg 55AM79ZCbmWux0cyG3xcRlzwWZy4OsBZ+vrZytbA7VxtV+evxs6CxnxMsR3+6GoStO1g=; From: Daniel Mendler To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87mst1tgrt.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 19 Jan 2024 16:44:06 +0000") References: <87pm1ggrdx.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> Date: Wed, 24 Jan 2024 07:23:08 +0100 Message-ID: <874jf39rn7.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Eli Zaretskii , stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > Eli Zaretskii writes: > >>> From: Daniel Mendler >>> Cc: Philip Kaludercic , 66554@debbugs.gnu.org, >>> monnier@iro.umontreal.ca, stefankangas@gmail.com >>> Date: Thu, 18 Jan 2024 21:35:59 +0100 >>> >>> Eli Zaretskii writes: >>> >>> > I find the documentation of this arrangement still insufficient. The >>> > way this stuff works (which required Daniel to write 150 lines of >>> > explanation) is mostly kept out of the written docs, so we'll have to >>> > rely on people's memory. Can we document this machinery better? >>> >>> I agree. Where do you suggest to add the documentation? My intention is >>> to update the Compat manual (of the Compat ELPA package) with a more >>> detailed explanation of the mechanism as soon as the compat.el file gets >>> added to the Emacs core. We may want to avoid to duplicate the >>> information, by keeping the documentation in the Emacs compat.el file >>> concise, referring mainly to the Compat manual. >> >> The Compat manual cannot be the only place, because the information >> I'm talking about should be aimed at the Emacs developers, so it must >> be part of Emacs. I suggest to have it in the commentary in >> compat.el. > > OK. Philip, do you plan to submit a new version of the patch or do you want me to update the patch with a more extensive explanation? We should keep in mind that the information we add to the Emacs compat.el cannot be self sufficient. Emacs developers who want to use Compat must consult the Compat manual, since that's the place where we document the available compatibility definitions. Therefore referring to the manual for further details should be okay, as long as the general mechanism (and the versioning) is explained sufficiently well in the commentary of the compat.el file in Emacs. Daniel From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 26 02:58:37 2024 Received: (at 66554) by debbugs.gnu.org; 26 Jan 2024 07:58:37 +0000 Received: from localhost ([127.0.0.1]:50186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTH6i-0005m8-4K for submit@debbugs.gnu.org; Fri, 26 Jan 2024 02:58:37 -0500 Received: from mout01.posteo.de ([185.67.36.65]:51941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTH6f-0005lv-Oz for 66554@debbugs.gnu.org; Fri, 26 Jan 2024 02:58:34 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 50911240027 for <66554@debbugs.gnu.org>; Fri, 26 Jan 2024 08:58:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706255901; bh=2yUOAfXEXqyCgsK7FGUoKYUmUCUlVbQs/wBTxvCSRbs=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=d1luyDZ7pBcAbhGWNUQ6Q9M+Q+reoDIvSSKG31dDLIcajasreCz14c7AHJJiksyEv OMryJ/WjlRV4IlOzT0aeIuAIPq0QhTJP7uVRSYcdK9XjydpgwdYkkN9wKiT9AGrndl suq/7moKowo0ScFjTl71mKmUxL70aB7Zyl0yNJ3UG7hVd2YnhUtkx2bTfUe+9Ja+uZ wzjgjIIyVYolwVjh3pOj20oLFjnNI2X5NLUkzthcb862ZL/38OyVTk1R1o6Qkmqf7E S+iqTkD09uuIFlOz5Fhx/vQIErdqSOm6Hvbmyzm1fViWZ0Irk+038YEYlTqvRYVBEh Lf3mJoOL9Mxxw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TLqnR287hz9rxF; Fri, 26 Jan 2024 08:58:18 +0100 (CET) From: Philip Kaludercic To: Daniel Mendler Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <874jf39rn7.fsf@daniel-mendler.de> (Daniel Mendler's message of "Wed, 24 Jan 2024 07:23:08 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 26 Jan 2024 07:58:18 +0000 Message-ID: <871qa47ch1.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Eli Zaretskii , stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Daniel Mendler writes: > Philip Kaludercic writes: > >> Eli Zaretskii writes: >> >>>> From: Daniel Mendler >>>> Cc: Philip Kaludercic , 66554@debbugs.gnu.org, >>>> monnier@iro.umontreal.ca, stefankangas@gmail.com >>>> Date: Thu, 18 Jan 2024 21:35:59 +0100 >>>> >>>> Eli Zaretskii writes: >>>> >>>> > I find the documentation of this arrangement still insufficient. The >>>> > way this stuff works (which required Daniel to write 150 lines of >>>> > explanation) is mostly kept out of the written docs, so we'll have to >>>> > rely on people's memory. Can we document this machinery better? >>>> >>>> I agree. Where do you suggest to add the documentation? My intention is >>>> to update the Compat manual (of the Compat ELPA package) with a more >>>> detailed explanation of the mechanism as soon as the compat.el file gets >>>> added to the Emacs core. We may want to avoid to duplicate the >>>> information, by keeping the documentation in the Emacs compat.el file >>>> concise, referring mainly to the Compat manual. >>> >>> The Compat manual cannot be the only place, because the information >>> I'm talking about should be aimed at the Emacs developers, so it must >>> be part of Emacs. I suggest to have it in the commentary in >>> compat.el. >> >> OK. > > Philip, do you plan to submit a new version of the patch or do you want > me to update the patch with a more extensive explanation? We should keep > in mind that the information we add to the Emacs compat.el cannot be > self sufficient. Emacs developers who want to use Compat must consult > the Compat manual, since that's the place where we document the > available compatibility definitions. Therefore referring to the manual > for further details should be okay, as long as the general mechanism > (and the versioning) is explained sufficiently well in the commentary of > the compat.el file in Emacs. I have tried to update the patch to clarify some of the points in the discussion, but feel free to change anything you think ought to be changed: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-the-public-API-of-Compat-to-the-core.patch >From 83d84c625800215a6582320e3ed139efc43761d0 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 13 Sep 2023 12:26:22 +0200 Subject: [PATCH] Add the public API of Compat to the core * lisp/emacs-lisp/compat.el: Add stub file with minimal definitions, so that core packages, that haven't been installed from ELPA, can make use of the public API and use more recent function signatures. * lisp/progmodes/python.el (compat): Remove 'noerror flag, because Compat can now be required without the real package being available. * doc/lispref/package.texi (Forwards-Compatibility): Mention Compat and link to the manual. * etc/NEWS: Document change. (Bug#66554) --- doc/lispref/package.texi | 44 ++++++++++++++++++ etc/NEWS | 11 +++++ lisp/emacs-lisp/compat.el | 94 +++++++++++++++++++++++++++++++++++++++ lisp/progmodes/python.el | 2 +- 4 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 lisp/emacs-lisp/compat.el diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 6f52a33d194..b9239521d33 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -28,6 +28,7 @@ Packaging * Multi-file Packages:: How to package multiple files. * Package Archives:: Maintaining package archives. * Archive Web Server:: Interfacing to an archive web server. +* Forwards-Compatibility:: Supporting older versions of Emacs. @end menu @node Packaging Basics @@ -390,3 +391,46 @@ Archive Web Server package, or the single file for a simple package. @end table + +@node Forwards-Compatibility +@section Supporting older versions of Emacs +@cindex compatibility compat + +Packages that wish to support older releases of Emacs, without giving +up on newer functionality from recent Emacs releases, one can make use +of the Compat package on GNU ELPA. By depending on the package, Emacs +can provide compatibility definitions for missing functionality. + +The versioning of Compat follows that of Emacs, so one can implicitly +declare what range of Emacs versions a package supports like so: + +@example +;; Package-Requires: ((emacs "27.2") (compat "29.1")) +@end example + +By default, one can refer to compatibility definitions by their given +names from future versions. For example, one can use the function +@code{take} on before Emacs 29 as such. Due to changes of function +and macro calling conventions over time, this is not always possible +and it is occasionally necessary to explicitly refer to compatibility +code. To this end one can use the Compat API: + +@defmac compat-call fun &rest args +This macro calls the compatibility function @var{fun} with @var{args}. +Many functions provided by Compat can be called directly without this +macro. However in the case where Compat provides an alternative +version of an existing function, the function call has to go through +@code{compat-call}. +@end defmac + +@defmac compat-function fun +This macro returns the compatibility function symbol for @var{fun}. +See @code{compat-call} for a more convenient macro to directly call +compatibility functions. +@end defmac + +For further details on how to make use of the package, see +@ref{Usage,, Usage, compat, "Compat" Manual}. In case you don't have +the package installed, you can also read the +@url{https://elpa.gnu.org/packages/doc/compat.html#Usage, Online +Compat manual}. diff --git a/etc/NEWS b/etc/NEWS index a1874313502..46859d75aac 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1321,6 +1321,17 @@ This minor mode generates the tags table automatically based on the current project configuration, and later updates it as you edit the files and save the changes. ++++ +** New package Compat +The Compat package on GNU ELPA provides forwards-compatibility +support, so that packages that still provide support for older +versions of Emacs can still make use of newer definitions that can be +reasonably re-implemented in Elisp. Now a "pseudo" Compat package is +part of Emacs, that doesn't provide any compatibility support, but +only implements the public-facing API of Compat so that core packages +can use Compat, while also preventing the installation of Compat on +the most recent version of Emacs. + * Incompatible Lisp Changes in Emacs 30.1 diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el new file mode 100644 index 00000000000..2882974cf2d --- /dev/null +++ b/lisp/emacs-lisp/compat.el @@ -0,0 +1,94 @@ +;;; compat.el --- Pseudo-Compatibility for Elisp -*- lexical-binding: t; -*- + +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. + +;; Author: \ +;; Philip Kaludercic , \ +;; Daniel Mendler +;; Maintainer: \ +;; Daniel Mendler , \ +;; Compat Development <~pkal/compat-devel@lists.sr.ht>, +;; emacs-devel@gnu.org +;; URL: https://github.com/emacs-compat/compat +;; Keywords: lisp, maint + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The Compat package on ELPA provides forward-compatibility +;; definitions for other packages. While mostly transparent, a +;; minimal API is necessary whenever core definitions change calling +;; conventions (e.g. `plist-get' can be invoked with a predicate from +;; Emacs 29.1 onward). For core packages on ELPA to be able to take +;; advantage of this functionality, the macros `compat-function' and +;; `compat-call' have to be available in the core, usable even if +;; users do not have the Compat package installed, which this file +;; ensures. + +;; A basic introduction to Compat is given in the Info node `(elisp) +;; Forwards Compatibility'. Further details on Compat are documented +;; in the Info node `(compat) Top' (installed along with the Compat +;; package) or read the same manual online: +;; https://elpa.gnu.org/packages/doc/compat.html. + +;; Note that Compat is NOT a core package and this file is NOT +;; available on GNU ELPA. + +;;; Code: + +(defmacro compat-function (fun) + "Return compatibility function symbol for FUN. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + `#',fun) + +(defmacro compat-call (fun &rest args) + "Call compatibility function or macro FUN with ARGS. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + (cons fun args)) + +;;;; Clever trick to avoid installing Compat if not necessary + +;; The versioning scheme of the Compat package follows that of Emacs, +;; to indicate what version of Emacs is being supported. For example, +;; the Compat version number 29.2.3.9 would attempt to provide +;; compatibility definitions up to Emacs 29.2, while also designating +;; that this is the third major release and ninth minor release of +;; Compat, for the specific Emacs release. + +;; The package version of this file is specified programmatically, +;; instead of giving a fixed version in the header of this file. This +;; is done to ensure that the version of compat.el provided by Emacs +;; is always corresponds to the current version of Emacs. In addition +;; to the major-minor version, a large "major release" makes sure that +;; the built-in version of Compat is always preferred over an external +;; installation. This means that if a package specifies a dependency +;; on Compat which matches the current version of Emacs that is being +;; used, no additional dependencies have to be downloaded. +;; +;; Further details and background on this file can be found in the +;; bug#66554 discussion. + +;;;###autoload (push (list 'compat +;;;###autoload emacs-major-version +;;;###autoload emacs-minor-version +;;;###autoload 1.0e+INF) +;;;###autoload package--builtin-versions) + +(provide 'compat) +;;; compat.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index e2f614f52c2..1f4a8e01294 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -267,7 +267,7 @@ (eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. (require 'treesit) (require 'pcase) -(require 'compat nil 'noerror) +(require 'compat) (require 'project nil 'noerror) (require 'seq) -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 26 05:42:48 2024 Received: (at 66554) by debbugs.gnu.org; 26 Jan 2024 10:42:48 +0000 Received: from localhost ([127.0.0.1]:50521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTJfc-0001is-4l for submit@debbugs.gnu.org; Fri, 26 Jan 2024 05:42:48 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:34143 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTJfY-0001iZ-MF for 66554@debbugs.gnu.org; Fri, 26 Jan 2024 05:42:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bixbl4AOkA75KFd71Yek4jIGhmYvHKAgOJ7t5ZF3EeQ=; b=sV3UsBWrHd30Nh7+P3wVTMaXgs bVwsbbRePcER72AbFFrgX8SuA4HQl5/LZZiBSQBh1y5jzZ8IZHZX6mPA4bpPfY83hHLdCvtTJuIDS L6tHajhlHgoh7hJqOfaoevJ8cJgrxHFiMXPnqag9FByDRifZOrG2sxEOGvBKJHQDx2dQ=; From: Daniel Mendler To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <871qa47ch1.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 26 Jan 2024 07:58:18 +0000") References: <87pm1ggrdx.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> Date: Fri, 26 Jan 2024 11:42:30 +0100 Message-ID: <87a5osfka1.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Eli Zaretskii , stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: [...] >> Philip, do you plan to submit a new version of the patch or do you want >> me to update the patch with a more extensive explanation? We should keep >> in mind that the information we add to the Emacs compat.el cannot be >> self sufficient. Emacs developers who want to use Compat must consult >> the Compat manual, since that's the place where we document the >> available compatibility definitions. Therefore referring to the manual >> for further details should be okay, as long as the general mechanism >> (and the versioning) is explained sufficiently well in the commentary of >> the compat.el file in Emacs. > > I have tried to update the patch to clarify some of the points in the > discussion, but feel free to change anything you think ought to be changed: Thank you, Philip. I added a few comments below, mostly about some details of the wording. Eli, Stefans, do you think the level of information provided in the patch is sufficient? > diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi > index 6f52a33d194..b9239521d33 100644 > --- a/doc/lispref/package.texi > +++ b/doc/lispref/package.texi [...] > +The versioning of Compat follows that of Emacs, so one can implicitly > +declare what range of Emacs versions a package supports like so: > + > +@example > +;; Package-Requires: ((emacs "27.2") (compat "29.1")) > +@end example The word "range" is misleading. It sounds as if the package supports 27.2 to 29.1, while in it actually supports 27.2 and newer and relies on some 29.1 APIs. [...] > diff --git a/etc/NEWS b/etc/NEWS > index a1874313502..46859d75aac 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -1321,6 +1321,17 @@ This minor mode generates the tags table automatically based on the > current project configuration, and later updates it as you edit the > files and save the changes. > > ++++ > +** New package Compat > +The Compat package on GNU ELPA provides forwards-compatibility > +support, so that packages that still provide support for older > +versions of Emacs can still make use of newer definitions that can be > +reasonably re-implemented in Elisp. Now a "pseudo" Compat package is > +part of Emacs, that doesn't provide any compatibility support, but > +only implements the public-facing API of Compat so that core packages > +can use Compat, while also preventing the installation of Compat on > +the most recent version of Emacs. This NEWS entry explains the addition well, but it is a bit verbose compared to other entries. I am not fond of the quoted word "pseudo". Maybe say stub of Compat? > * Incompatible Lisp Changes in Emacs 30.1 > > diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el > new file mode 100644 > index 00000000000..2882974cf2d > --- /dev/null > +++ b/lisp/emacs-lisp/compat.el > @@ -0,0 +1,94 @@ > +;;; compat.el --- Pseudo-Compatibility for Elisp -*- lexical-binding: t; -*- Instead of "Pseudo" maybe write "Stub of the Emacs Lisp Compatibility Library"? We could also use "Emacs Lisp Compatibility Library" like in ELPA Compat package, since for packages using the Compat library it should not make a difference if the builtin compat.el stub or the ELPA package is used. > +;;; Commentary: [...] > +;; Note that Compat is NOT a core package and this file is NOT > +;; available on GNU ELPA. I find this sentence a bit confusing. What you want to tell here is that the compat.el file in Emacs differs from the compat.el file in the ELPA package. This is maybe already clear from the other comments so we can as well remove this sentence? [...] > +;;;; Clever trick to avoid installing Compat if not necessary > + > +;; The versioning scheme of the Compat package follows that of Emacs, > +;; to indicate what version of Emacs is being supported. For example, ^^^^^^^^^ Should we say "supported" here? Compat supports other version than the one specified. Compat "provides" functionality from that Emacs version. > +;; the Compat version number 29.2.3.9 would attempt to provide > +;; compatibility definitions up to Emacs 29.2, while also designating > +;; that this is the third major release and ninth minor release of > +;; Compat, for the specific Emacs release. > + > +;; The package version of this file is specified programmatically, > +;; instead of giving a fixed version in the header of this file. This > +;; is done to ensure that the version of compat.el provided by Emacs > +;; is always corresponds to the current version of Emacs. In addition ^^ The "is" should be removed. > +;; to the major-minor version, a large "major release" makes sure that > +;; the built-in version of Compat is always preferred over an external > +;; installation. This means that if a package specifies a dependency > +;; on Compat which matches the current version of Emacs that is being ^^^^^^^^^^^^^^^^^^^ ...which matches the current *or an older version* of Emacs... > +;; used, no additional dependencies have to be downloaded. > +;; > +;; Further details and background on this file can be found in the > +;; bug#66554 discussion. > + > +;;;###autoload (push (list 'compat > +;;;###autoload emacs-major-version > +;;;###autoload emacs-minor-version > +;;;###autoload 1.0e+INF) > +;;;###autoload package--builtin-versions) I prefer if we use 9999 here instead of 1.0e+INF. While infinity is semantically correct, the float may lead to problems and hurt readability in the package list. > +(provide 'compat) > +;;; compat.el ends here Daniel From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 26 07:36:10 2024 Received: (at 66554) by debbugs.gnu.org; 26 Jan 2024 12:36:10 +0000 Received: from localhost ([127.0.0.1]:50618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTLRK-0007gA-6G for submit@debbugs.gnu.org; Fri, 26 Jan 2024 07:36:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTLRG-0007fv-UF for 66554@debbugs.gnu.org; Fri, 26 Jan 2024 07:36:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTLR3-0001X7-EW; Fri, 26 Jan 2024 07:35:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+wZjaizryh+prp8GSWc4/bEYvG7krhrOHOD1TlXg0p0=; b=MwbfiKSrqtrc 4zilUn8d2Eq8fKlCadsfBs8vmgZ5xI1CbdYdIyUB0GuEqhZ0Ux8f49lY/CNgYzU2xIMkGVUHWl2HI OERBBiNZMyeRR/SVsBmSuiDkemoBQ8edSwe1TDKyTB4D7qcSih67F/fjLUvPKoWbtgeUs/W9oi5YU RuWnco6qMCex8H3kM0RWwHrjfK7JXewJo/DrvY/INsARwYBFl4m42B5k77URrr26gVMCAb7RMhWii iUXHp4ep92sTMpMLQc0E7vY1Ak10HcKwTjGElDCifYoj7xUfV4QV+Jgjpu0dFxPJ0XKaCAg7TulDj pFlvxGti31QutJUzcGHunQ==; Date: Fri, 26 Jan 2024 14:35:48 +0200 Message-Id: <861qa4b7bv.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <87a5osfka1.fsf@daniel-mendler.de> (message from Daniel Mendler on Fri, 26 Jan 2024 11:42:30 +0100) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Mendler > Cc: 66554@debbugs.gnu.org, Eli Zaretskii , > stefankangas@gmail.com, monnier@iro.umontreal.ca > Date: Fri, 26 Jan 2024 11:42:30 +0100 > > > I have tried to update the patch to clarify some of the points in the > > discussion, but feel free to change anything you think ought to be changed: > > Thank you, Philip. I added a few comments below, mostly about some > details of the wording. Eli, Stefans, do you think the level of > information provided in the patch is sufficient? It is hard to answer the question without seeing a complete patch that incorporates your suggestions to the degree that Philip agrees with them. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 01 10:53:56 2024 Received: (at 66554) by debbugs.gnu.org; 1 Feb 2024 15:53:56 +0000 Received: from localhost ([127.0.0.1]:43031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVZO0-00085b-2a for submit@debbugs.gnu.org; Thu, 01 Feb 2024 10:53:56 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:52105 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVZNu-00085H-Cn for 66554@debbugs.gnu.org; Thu, 01 Feb 2024 10:53:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZUHbSCUrj/RXaTsnJ58J5NpNv/fR8BcGsKTvnsas6WU=; b=xNNdpCFW3nBQUZ18tgFmkA0fFK J2cA8a3l+FLqI97DlUSkXoxIejLQ42L6bSj9NiCB3oLC7/3tyMap3ZhVZbpheuQsqaVD7AA0+Bblp ms5+08RgJVheyP9uTXdOYj0BUkHa6j0D/kisnuWS/WoMfNRsI3PSpCOoKOm2T6XiUUJg=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <861qa4b7bv.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Jan 2024 14:35:48 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <861qa4b7bv.fsf@gnu.org> Date: Thu, 01 Feb 2024 16:53:32 +0100 Message-ID: <87eddwi3k3.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: 66554@debbugs.gnu.org, Eli Zaretskii , >> stefankangas@gmail.com, monnier@iro.umontreal.ca >> Date: Fri, 26 Jan 2024 11:42:30 +0100 >> >> > I have tried to update the patch to clarify some of the points in the >> > discussion, but feel free to change anything you think ought to be changed: >> >> Thank you, Philip. I added a few comments below, mostly about some >> details of the wording. Eli, Stefans, do you think the level of >> information provided in the patch is sufficient? > > It is hard to answer the question without seeing a complete patch that > incorporates your suggestions to the degree that Philip agrees with > them. Okay. Philip, do you have any comments regarding my suggestions? From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 02 03:11:53 2024 Received: (at 66554) by debbugs.gnu.org; 2 Feb 2024 08:11:53 +0000 Received: from localhost ([127.0.0.1]:43697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVoeO-0000II-6d for submit@debbugs.gnu.org; Fri, 02 Feb 2024 03:11:53 -0500 Received: from mout01.posteo.de ([185.67.36.65]:51805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVoeK-0000Hz-MM for 66554@debbugs.gnu.org; Fri, 02 Feb 2024 03:11:51 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8C20824002A for <66554@debbugs.gnu.org>; Fri, 2 Feb 2024 09:11:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706861491; bh=xmXaJIxezDBrONvlGeA7bzZ+wbZcQytWaN4Vk9IMSog=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=aA+OIsVpmIMvwZsMdlwr6jiHNWEbA9sKA/SlTM73uHh8W08XGDk3NWDGgmIPIUqyQ 4IhRZ3xAGdlRTkfmoOT/cmHDOz0YcWpK4eRxHOLNRhN8MnEQEBmy0bfDzUoE9U+3ax HhXBxSGNAg7qzz42GCYCgPq8hXtU984avu24dMlc0uTA/7GH3Cr6dTP30YnnTm+oRq 6nmZP5mknXNnwXAMeIndJuH2y1rK9v4oRkJ0rk8T4xv7IsoI6MSrcBeMtnkzL4u2p3 NuiR7CbP7VdOIJeMi8N+dPiKLrqb13OQOFubWoz79vcp26riX74D8X0VKyY1zy2QOv BxCgmgz/ynMeg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TR7lP5WXrz6tm4; Fri, 2 Feb 2024 09:11:29 +0100 (CET) From: Philip Kaludercic To: Daniel Mendler Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87a5osfka1.fsf@daniel-mendler.de> (Daniel Mendler's message of "Fri, 26 Jan 2024 11:42:30 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 02 Feb 2024 08:11:27 +0000 Message-ID: <87y1c3s2ts.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Eli Zaretskii , stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain (Sorry for the late response.) Daniel Mendler writes: > Philip Kaludercic writes: > > [...] > >>> Philip, do you plan to submit a new version of the patch or do you >>> want >>> me to update the patch with a more extensive explanation? We should >>> keep >>> in mind that the information we add to the Emacs compat.el cannot be >>> self sufficient. Emacs developers who want to use Compat must consult >>> the Compat manual, since that's the place where we document the >>> available compatibility definitions. Therefore referring to the manual >>> for further details should be okay, as long as the general mechanism >>> (and the versioning) is explained sufficiently well in the >>> commentary of >>> the compat.el file in Emacs. >> >> I have tried to update the patch to clarify some of the points in the >> discussion, but feel free to change anything you think ought to be >> changed: > > Thank you, Philip. I added a few comments below, mostly about some > details of the wording. Eli, Stefans, do you think the level of > information provided in the patch is sufficient? > >> diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi >> index 6f52a33d194..b9239521d33 100644 >> --- a/doc/lispref/package.texi >> +++ b/doc/lispref/package.texi > > [...] > >> +The versioning of Compat follows that of Emacs, so one can implicitly >> +declare what range of Emacs versions a package supports like so: >> + >> +@example >> +;; Package-Requires: ((emacs "27.2") (compat "29.1")) >> +@end example > > The word "range" is misleading. It sounds as if the package supports > 27.2 to 29.1, while in it actually supports 27.2 and newer and relies on > some 29.1 APIs. Changed this. > [...] > >> diff --git a/etc/NEWS b/etc/NEWS >> index a1874313502..46859d75aac 100644 >> --- a/etc/NEWS >> +++ b/etc/NEWS >> @@ -1321,6 +1321,17 @@ This minor mode generates the tags table >> automatically based on the >> current project configuration, and later updates it as you edit the >> files and save the changes. >> >> ++++ >> +** New package Compat >> +The Compat package on GNU ELPA provides forwards-compatibility >> +support, so that packages that still provide support for older >> +versions of Emacs can still make use of newer definitions that can be >> +reasonably re-implemented in Elisp. Now a "pseudo" Compat package is >> +part of Emacs, that doesn't provide any compatibility support, but >> +only implements the public-facing API of Compat so that core packages >> +can use Compat, while also preventing the installation of Compat on >> +the most recent version of Emacs. > > This NEWS entry explains the addition well, but it is a bit verbose > compared to other entries. I am not fond of the quoted word "pseudo". > Maybe say stub of Compat? Abbreviated it. >> * Incompatible Lisp Changes in Emacs 30.1 >> >> diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el >> new file mode 100644 >> index 00000000000..2882974cf2d >> --- /dev/null >> +++ b/lisp/emacs-lisp/compat.el >> @@ -0,0 +1,94 @@ >> +;;; compat.el --- Pseudo-Compatibility for Elisp -*- >> lexical-binding: t; -*- > > Instead of "Pseudo" maybe write "Stub of the Emacs Lisp Compatibility > Library"? We could also use "Emacs Lisp Compatibility Library" like in > ELPA Compat package, since for packages using the Compat library it > should not make a difference if the builtin compat.el stub or the ELPA > package is used. I changed it to "Stub of the Compatibility Library", to avoid an overlong line and also because Elisp should be implicit. >> +;;; Commentary: > > [...] > >> +;; Note that Compat is NOT a core package and this file is NOT >> +;; available on GNU ELPA. > > I find this sentence a bit confusing. What you want to tell here is that > the compat.el file in Emacs differs from the compat.el file in the ELPA > package. This is maybe already clear from the other comments so we can > as well remove this sentence? Done. > [...] > >> +;;;; Clever trick to avoid installing Compat if not necessary >> + >> +;; The versioning scheme of the Compat package follows that of Emacs, >> +;; to indicate what version of Emacs is being supported. For example, > ^^^^^^^^^ > > Should we say "supported" here? Compat supports other version than the > one specified. Compat "provides" functionality from that Emacs version. Rephrased this, but sounds a bit clunky. >> +;; the Compat version number 29.2.3.9 would attempt to provide >> +;; compatibility definitions up to Emacs 29.2, while also designating >> +;; that this is the third major release and ninth minor release of >> +;; Compat, for the specific Emacs release. >> + >> +;; The package version of this file is specified programmatically, >> +;; instead of giving a fixed version in the header of this file. This >> +;; is done to ensure that the version of compat.el provided by Emacs >> +;; is always corresponds to the current version of Emacs. In addition > ^^ > > The "is" should be removed. Right. >> +;; to the major-minor version, a large "major release" makes sure that >> +;; the built-in version of Compat is always preferred over an external >> +;; installation. This means that if a package specifies a dependency >> +;; on Compat which matches the current version of Emacs that is being > ^^^^^^^^^^^^^^^^^^^ > > ...which matches the current *or an older version* of Emacs... Ok. >> +;; used, no additional dependencies have to be downloaded. >> +;; >> +;; Further details and background on this file can be found in the >> +;; bug#66554 discussion. >> + >> +;;;###autoload (push (list 'compat >> +;;;###autoload emacs-major-version >> +;;;###autoload emacs-minor-version >> +;;;###autoload 1.0e+INF) >> +;;;###autoload package--builtin-versions) > > I prefer if we use 9999 here instead of 1.0e+INF. While infinity is > semantically correct, the float may lead to problems and hurt > readability in the package list. It seems the main issue is that 30.0.1.0e+INF can be displayed without any problems, but version-to-list rejects it. Sad, because I think this is a neat idea but I've changed it to 9999. >> +(provide 'compat) >> +;;; compat.el ends here > > Daniel --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-the-public-API-of-Compat-to-the-core.patch >From bc1aaa2e5983d77b3ac0c3a95d73197bc9127dac Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 13 Sep 2023 12:26:22 +0200 Subject: [PATCH] Add the public API of Compat to the core * lisp/emacs-lisp/compat.el: Add stub file with minimal definitions, so that core packages, that haven't been installed from ELPA, can make use of the public API and use more recent function signatures. * lisp/progmodes/python.el (compat): Remove 'noerror flag, because Compat can now be required without the real package being available. * doc/lispref/package.texi (Forwards-Compatibility): Mention Compat and link to the manual. * etc/NEWS: Document change. (Bug#66554) --- doc/lispref/package.texi | 46 ++++++++++++++++++++ etc/NEWS | 7 +++ lisp/emacs-lisp/compat.el | 92 +++++++++++++++++++++++++++++++++++++++ lisp/progmodes/python.el | 2 +- 4 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 lisp/emacs-lisp/compat.el diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 6f52a33d194..071c87170f5 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -28,6 +28,7 @@ Packaging * Multi-file Packages:: How to package multiple files. * Package Archives:: Maintaining package archives. * Archive Web Server:: Interfacing to an archive web server. +* Forwards-Compatibility:: Supporting older versions of Emacs. @end menu @node Packaging Basics @@ -390,3 +391,48 @@ Archive Web Server package, or the single file for a simple package. @end table + +@node Forwards-Compatibility +@section Supporting older versions of Emacs +@cindex compatibility compat + +Packages that wish to support older releases of Emacs, without giving +up on newer functionality from recent Emacs releases, one can make use +of the Compat package on GNU ELPA. By depending on the package, Emacs +can provide compatibility definitions for missing functionality. + +The versioning of Compat follows that of Emacs, so next to the oldest +version that a package relies on (via the @code{emacs}-package), one +can also indicate what the newest version of Emacs is, that a package +wishes to use definitions from: + +@example +;; Package-Requires: ((emacs "27.2") (compat "29.1")) +@end example + +By default, one can refer to compatibility definitions by their given +names from future versions. For example, one can use the function +@code{take} on before Emacs 29 as such. Due to changes of function +and macro calling conventions over time, this is not always possible +and it is occasionally necessary to explicitly refer to compatibility +code. To this end one can use the Compat API: + +@defmac compat-call fun &rest args +This macro calls the compatibility function @var{fun} with @var{args}. +Many functions provided by Compat can be called directly without this +macro. However in the case where Compat provides an alternative +version of an existing function, the function call has to go through +@code{compat-call}. +@end defmac + +@defmac compat-function fun +This macro returns the compatibility function symbol for @var{fun}. +See @code{compat-call} for a more convenient macro to directly call +compatibility functions. +@end defmac + +For further details on how to make use of the package, see +@ref{Usage,, Usage, compat, "Compat" Manual}. In case you don't have +the package installed, you can also read the +@url{https://elpa.gnu.org/packages/doc/compat.html#Usage, Online +Compat manual}. diff --git a/etc/NEWS b/etc/NEWS index a1874313502..7d0a202a787 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1321,6 +1321,13 @@ This minor mode generates the tags table automatically based on the current project configuration, and later updates it as you edit the files and save the changes. ++++ +** New package Compat +Emacs now comes with a stub implementation of the +forwards-compatibility Compat package from GNU ELPA. This allows +built-in packages to use the library more effectively, and helps +preventing the installation of Compat if unnecessary. + * Incompatible Lisp Changes in Emacs 30.1 diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el new file mode 100644 index 00000000000..f7037dc4101 --- /dev/null +++ b/lisp/emacs-lisp/compat.el @@ -0,0 +1,92 @@ +;;; compat.el --- Stub of the Compatibility Library -*- lexical-binding: t; -*- + +;; Copyright (C) 2021-2024 Free Software Foundation, Inc. + +;; Author: \ +;; Philip Kaludercic , \ +;; Daniel Mendler +;; Maintainer: \ +;; Daniel Mendler , \ +;; Compat Development <~pkal/compat-devel@lists.sr.ht>, +;; emacs-devel@gnu.org +;; URL: https://github.com/emacs-compat/compat +;; Keywords: lisp, maint + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; The Compat package on ELPA provides forward-compatibility +;; definitions for other packages. While mostly transparent, a +;; minimal API is necessary whenever core definitions change calling +;; conventions (e.g. `plist-get' can be invoked with a predicate from +;; Emacs 29.1 onward). For core packages on ELPA to be able to take +;; advantage of this functionality, the macros `compat-function' and +;; `compat-call' have to be available in the core, usable even if +;; users do not have the Compat package installed, which this file +;; ensures. + +;; A basic introduction to Compat is given in the Info node `(elisp) +;; Forwards Compatibility'. Further details on Compat are documented +;; in the Info node `(compat) Top' (installed along with the Compat +;; package) or read the same manual online: +;; https://elpa.gnu.org/packages/doc/compat.html. + +;;; Code: + +(defmacro compat-function (fun) + "Return compatibility function symbol for FUN. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + `#',fun) + +(defmacro compat-call (fun &rest args) + "Call compatibility function or macro FUN with ARGS. +This is a pseudo-compatibility stub for core packages on ELPA, +that depend on the Compat package, whenever the user doesn't have +the package installed on their current system." + (cons fun args)) + +;;;; Clever trick to avoid installing Compat if not necessary + +;; The versioning scheme of the Compat package follows that of Emacs, +;; to indicate the version of Emacs, that functionality is being +;; provided for. For example, the Compat version number 29.2.3.9 +;; would attempt to provide compatibility definitions up to Emacs +;; 29.2, while also designating that this is the third major release +;; and ninth minor release of Compat, for the specific Emacs release. + +;; The package version of this file is specified programmatically, +;; instead of giving a fixed version in the header of this file. This +;; is done to ensure that the version of compat.el provided by Emacs +;; always corresponds to the current version of Emacs. In addition to +;; the major-minor version, a large "major release" makes sure that +;; the built-in version of Compat is always preferred over an external +;; installation. This means that if a package specifies a dependency +;; on Compat which matches the current or an older version of Emacs +;; that is being used, no additional dependencies have to be +;; downloaded. +;; +;; Further details and background on this file can be found in the +;; bug#66554 discussion. + +;;;###autoload (push (list 'compat +;;;###autoload emacs-major-version +;;;###autoload emacs-minor-version +;;;###autoload 9999) +;;;###autoload package--builtin-versions) + +(provide 'compat) +;;; compat.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index e2f614f52c2..1f4a8e01294 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -267,7 +267,7 @@ (eval-when-compile (require 'subr-x)) ;For `string-empty-p' and `string-join'. (require 'treesit) (require 'pcase) -(require 'compat nil 'noerror) +(require 'compat) (require 'project nil 'noerror) (require 'seq) -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 02 07:37:05 2024 Received: (at 66554) by debbugs.gnu.org; 2 Feb 2024 12:37:05 +0000 Received: from localhost ([127.0.0.1]:43802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVsn2-0004iw-EB for submit@debbugs.gnu.org; Fri, 02 Feb 2024 07:37:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVsn0-0004iT-3s for 66554@debbugs.gnu.org; Fri, 02 Feb 2024 07:37:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVsmi-0002ha-5l; Fri, 02 Feb 2024 07:36:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vqcBBs3NmPqJitVYQRSDXlVdwikOu/zKJE6x0zkicNU=; b=fjf1I0wi59ne fK1UlkPITgK/xipVq/3CTn2lYreOFZHf3IdoJcuNyNZ3fmXVpxhjhKHF6jLRVwtzPahkZyoj+7kD0 1Xoij44+6hCAW+HWfZ+BFpMHKtTy91AUVAtTaKHBqM9ASXb+6LTRtx/yj8euoTRM5neXLd4gDnxds wwFRQc4b/44G5cx/0xepPCMjveWGeEjIpRkr4BFqsX8I3c6RScshY7P4w1QgDdAAodFqaT98SvClY QU6YzCznHWDgzCJ8E7TmlUilUQKI41a1LYUg4LVu69q1j5mEczVstVkPELZwL7WMczaLjXOPg4c19 Qtv8c+8qAxK6gHPdSKz6TQ==; Date: Fri, 02 Feb 2024 14:36:41 +0200 Message-Id: <864jer59gm.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87y1c3s2ts.fsf@posteo.net> (message from Philip Kaludercic on Fri, 02 Feb 2024 08:11:27 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [Please ignore my previous response, it was mistakenly sent prematurely.] > From: Philip Kaludercic > Cc: 66554@debbugs.gnu.org, Eli Zaretskii , > stefankangas@gmail.com, monnier@iro.umontreal.ca > Date: Fri, 02 Feb 2024 08:11:27 +0000 > > diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi > index 6f52a33d194..071c87170f5 100644 > --- a/doc/lispref/package.texi > +++ b/doc/lispref/package.texi > @@ -28,6 +28,7 @@ Packaging > * Multi-file Packages:: How to package multiple files. > * Package Archives:: Maintaining package archives. > * Archive Web Server:: Interfacing to an archive web server. > +* Forwards-Compatibility:: Supporting older versions of Emacs. ^^^^^^^^^^^^^^^^^^^^^^ This should be "Forward Compatibility", without "s" and without the dash. > +@node Forwards-Compatibility Likewise. > +@section Supporting older versions of Emacs > +@cindex compatibility compat I suggest the following index entries: @cindex forward compatibility, in packages @cindex supporting older Emacs releases, in packages @cindex Compat package > +Packages that wish to support older releases of Emacs, without giving > +up on newer functionality from recent Emacs releases, one can make use > +of the Compat package on GNU ELPA. ^^^ That "one" should be removed. And the comma before it as well. > By depending on the package, Emacs > +can provide compatibility definitions for missing functionality. I think you mean "By depending on the Compat package, ..." > + > +The versioning of Compat follows that of Emacs, so next to the oldest > +version that a package relies on (via the @code{emacs}-package), one > +can also indicate what the newest version of Emacs is, that a package > +wishes to use definitions from: > + > +@example > +;; Package-Requires: ((emacs "27.2") (compat "29.1")) > +@end example That sentence is hard to grasp. I suggest to rephrase it: The version of Compat included with Emacs is the same as the Emacs release in which it was included. Thus, packages that want to use functionality from Emacs versions newer than the oldest one they support should @emph{also} depend on Compat from the newest Emacs release. For example: @example ;; Package-Requires: ((emacs "27.2") (compat "29.1")) @end example @noindent The above says that the package needs at least Emacs 27.2, but uses functionality introduced with Emacs 29.1, which in Emacs versions before 29.2 will come from the Compat package. > +By default, one can refer to compatibility definitions by their given > +names from future versions. For example, one can use the function > +@code{take} on before Emacs 29 as such. I suggest to rephrase the last sentence: For example, a package can call @code{take}, which was introduced in Emacs 29, also in older Emacs versions, and Compat will supply the missing function definition. > Due to changes of function > +and macro calling conventions over time, this is not always possible > +and it is occasionally necessary to explicitly refer to compatibility > +code. To this end one can use the Compat API: > + > +@defmac compat-call fun &rest args > +This macro calls the compatibility function @var{fun} with @var{args}. > +Many functions provided by Compat can be called directly without this > +macro. However in the case where Compat provides an alternative > +version of an existing function, the function call has to go through > +@code{compat-call}. > +@end defmac This description left me without understanding when I need to use compat-call and when I can just call FUN. Can you explain more? > +;; The versioning scheme of the Compat package follows that of Emacs, > +;; to indicate the version of Emacs, that functionality is being ^^^^ "whose", not "that" > +;; provided for. For example, the Compat version number 29.2.3.9 ^^^ Please remove that "for". Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 06 14:10:56 2024 Received: (at 66554) by debbugs.gnu.org; 6 Feb 2024 19:10:57 +0000 Received: from localhost ([127.0.0.1]:55112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXQqO-0000l0-In for submit@debbugs.gnu.org; Tue, 06 Feb 2024 14:10:56 -0500 Received: from mout02.posteo.de ([185.67.36.66]:40611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXQqL-0000kn-L5 for 66554@debbugs.gnu.org; Tue, 06 Feb 2024 14:10:54 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 55EB5240104 for <66554@debbugs.gnu.org>; Tue, 6 Feb 2024 20:10:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707246634; bh=FcdDYYntvw9ogDqsatJ4JTtW6RcQgwU0Dh/nyiElJZU=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=MzZVMpvjLqUDs3KW9EuHjBy/ckKPeyhQQ3rCiSlDQvd5YsL09YiPpOm1JiCl0Zgbo Juydc7GqC4lF4crgFd5bQaRwwmSL3rRBnbxcX188iPB7chL1bAHExgghrqojSYHX+p h+a6BhnXz3PMZjgnYBj3TIlVJTAliXpGiM+DY0V4U8kHMdR/cYHn9swCtlWM/4/if6 FgyXL2WJTVDr3umLrHbf4QmuhpjpuMF7FlfN5Ju2WsPk5ceJJ4xRnSm8/buOFIh8YN 6LPI2YfiN2QfD0n20kRuQOduqfb2FcnkuI3KmG3hF0BFsIDRXVBCkJa8YA8EpKPfWd qY3wpmwJGX6yA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TTtB128Ktz6twH; Tue, 6 Feb 2024 20:10:32 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <864jer59gm.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 02 Feb 2024 14:36:41 +0200") References: <87pm1ggrdx.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Tue, 06 Feb 2024 19:10:32 +0000 Message-ID: <87h6ils91z.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) (Sorry for the delay) Eli Zaretskii writes: As usual, your way of putting it was better, so I applied the changes and have also taken care of the typos. >> Due to changes of function >> +and macro calling conventions over time, this is not always possible >> +and it is occasionally necessary to explicitly refer to compatibility >> +code. To this end one can use the Compat API: >> + >> +@defmac compat-call fun &rest args >> +This macro calls the compatibility function @var{fun} with @var{args}. >> +Many functions provided by Compat can be called directly without this >> +macro. However in the case where Compat provides an alternative >> +version of an existing function, the function call has to go through >> +@code{compat-call}. >> +@end defmac > > This description left me without understanding when I need to use > compat-call and when I can just call FUN. Can you explain more? The intention was for this paragraph to catch that case, However in the case where Compat provides an alternative version of an existing function, the function call has to go through @code{compat-call}. though the real information is to be found in the Compat manual, where the functions that have to be called via compat-call are documented. Should the above sentence be rephrased to give a general feeling for when this is the case However in the case where Compat provides an alternative version of an existing function, the function call has to go through @code{compat-call}. This is the case when, for example the signature changes between versions, preventing older versions of Emacs from using optional arguments introduced in newer releases. or should we just refer to the external manual? From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 06 14:37:27 2024 Received: (at 66554) by debbugs.gnu.org; 6 Feb 2024 19:37:27 +0000 Received: from localhost ([127.0.0.1]:55149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXRG2-0001W9-Rb for submit@debbugs.gnu.org; Tue, 06 Feb 2024 14:37:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXRG0-0001Vv-BD for 66554@debbugs.gnu.org; Tue, 06 Feb 2024 14:37:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXRFf-0006FA-Sm; Tue, 06 Feb 2024 14:37:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Eh++qrdTU7enDjD1B6hGxxeDkgc6eUY7doQdPHf17FA=; b=KfIf6SPxFj5E 0Vr3yxr65tYLpruOJAXopDHIAlu6heox6fmhhwKATMnmQPki3E3pNJ7Al9mJGwKbJV056dh9XZUbH YOW3fZWt2JgB4799DZGOgjKHeEz0TvTpWwycKo9T4ZCKzuYNR5oyWJeuPHCSpfAlbZtidkYG8kRbg V8y+3cL1uZ6TWvAGUPZ6qsjBYOK9K5uSXVdpzdhXcf75ikpLOXxtm7LXwminyzH7IND4p9T4HJ2+B rc0+fWholL/5gkdQFg39meeaywyr11/arjNim3y9xJlY/SDOUgNdGtVm5F4jD8G1ru5ZFyL2n4jhj YgtAMos3OPLCOBLxb6+ckw==; Date: Tue, 06 Feb 2024 21:37:01 +0200 Message-Id: <86r0hpz8o2.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87h6ils91z.fsf@posteo.net> (message from Philip Kaludercic on Tue, 06 Feb 2024 19:10:32 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, > monnier@iro.umontreal.ca > Date: Tue, 06 Feb 2024 19:10:32 +0000 > > >> +@defmac compat-call fun &rest args > >> +This macro calls the compatibility function @var{fun} with @var{args}. > >> +Many functions provided by Compat can be called directly without this > >> +macro. However in the case where Compat provides an alternative > >> +version of an existing function, the function call has to go through > >> +@code{compat-call}. > >> +@end defmac > > > > This description left me without understanding when I need to use > > compat-call and when I can just call FUN. Can you explain more? > > The intention was for this paragraph to catch that case, > > However in the case where Compat provides an alternative version of an > existing function, the function call has to go through > @code{compat-call}. > > though the real information is to be found in the Compat manual, where > the functions that have to be called via compat-call are documented. > > Should the above sentence be rephrased to give a general feeling for > when this is the case > > However in the case where Compat provides an alternative version of an > existing function, the function call has to go through > @code{compat-call}. This is the case when, for example the signature > changes between versions, preventing older versions of Emacs from > using optional arguments introduced in newer releases. > > or should we just refer to the external manual? Let me try to make my point more clear: I'd prefer that the reader emerges from reading this description with a practical way of knowing when to call the function directly and when to call it via 'compat-call'. If that's not easy to understand, perhaps we should tell that 'compat-call' should always be used, to avoid some rare corner cases where a direct call will not do, and be done? From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 06 14:59:34 2024 Received: (at 66554) by debbugs.gnu.org; 6 Feb 2024 19:59:34 +0000 Received: from localhost ([127.0.0.1]:55162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXRbR-00028o-Oe for submit@debbugs.gnu.org; Tue, 06 Feb 2024 14:59:34 -0500 Received: from mout01.posteo.de ([185.67.36.65]:56139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXRbO-00028Z-Ux for 66554@debbugs.gnu.org; Tue, 06 Feb 2024 14:59:31 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 89329240029 for <66554@debbugs.gnu.org>; Tue, 6 Feb 2024 20:59:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707249551; bh=XDKlHN8rudvHdyhZztcOIdgagHdGztl3TjJKSZion+Y=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=DuE3pRgv64VssaSpxd9dGjTNwkJFok+v+B4Dq3XmqjGTgui9dmNjMIi3RvlEJcq9x ZvI4qqcAQ7uB4JXavvCutGD06wIUXgKMWmeUupALGPOnnenKQOwOJZxWQTQdVSwovu W9F374SIBS6X8f3eDBkfbOaM6TG1W4Y6SGRIOofl1AB9wIJw1FM28jfKLS3f9KEDvC v1K7yI5fm8pDfMRXvPRUHrZhx8LIiRDZgmZQTu66tgpW7DERIW3O65uwdQLJ5srejk I/LXUxczm/bkhl8xtfRVx5A58Ympbj0pEYDEPs9ur4D1RPnNVYaOa9IjA2WKDwrqii eojL97xBL56jQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TTvG64CC9z9rxG; Tue, 6 Feb 2024 20:59:10 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <86r0hpz8o2.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 06 Feb 2024 21:37:01 +0200") References: <87pm1ggrdx.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Tue, 06 Feb 2024 19:59:09 +0000 Message-ID: <87r0hpqs8i.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >> monnier@iro.umontreal.ca >> Date: Tue, 06 Feb 2024 19:10:32 +0000 >> >> >> +@defmac compat-call fun &rest args >> >> +This macro calls the compatibility function @var{fun} with @var{args}. >> >> +Many functions provided by Compat can be called directly without this >> >> +macro. However in the case where Compat provides an alternative >> >> +version of an existing function, the function call has to go through >> >> +@code{compat-call}. >> >> +@end defmac >> > >> > This description left me without understanding when I need to use >> > compat-call and when I can just call FUN. Can you explain more? >> >> The intention was for this paragraph to catch that case, >> >> However in the case where Compat provides an alternative version of an >> existing function, the function call has to go through >> @code{compat-call}. >> >> though the real information is to be found in the Compat manual, where >> the functions that have to be called via compat-call are documented. >> >> Should the above sentence be rephrased to give a general feeling for >> when this is the case >> >> However in the case where Compat provides an alternative version of an >> existing function, the function call has to go through >> @code{compat-call}. This is the case when, for example the signature >> changes between versions, preventing older versions of Emacs from >> using optional arguments introduced in newer releases. >> >> or should we just refer to the external manual? > > Let me try to make my point more clear: I'd prefer that the reader > emerges from reading this description with a practical way of knowing > when to call the function directly and when to call it via > 'compat-call'. If that's not easy to understand, perhaps we should > tell that 'compat-call' should always be used, to avoid some rare > corner cases where a direct call will not do, and be done? I don't think we should recommend always using `compat-call', that would make code unreadable. What definitions have to be called via `compat-call' really depends on how they were defined in Compat. I don't know of a better rule to describe it without copying the documentation from the Compat manual (that wouldn't be a good idea either, because it wouldn't stay up to date). From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 12:16:11 2024 Received: (at 66554) by debbugs.gnu.org; 7 Feb 2024 17:16:11 +0000 Received: from localhost ([127.0.0.1]:57813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXlWs-0003gb-Lr for submit@debbugs.gnu.org; Wed, 07 Feb 2024 12:16:11 -0500 Received: from mout02.posteo.de ([185.67.36.66]:35955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXlWr-0003gO-A6 for 66554@debbugs.gnu.org; Wed, 07 Feb 2024 12:16:10 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4A0D1240103 for <66554@debbugs.gnu.org>; Wed, 7 Feb 2024 18:15:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707326149; bh=llsCcka/0Vo5MB0KILPBUTiyKrePKXQnFR2Ei9/yVyc=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=gRISf3Cz8MK/wDb/K++S8ysk/3+GN62b/IrJnRgXWqjfvzZK/lpujSuHv3DCbNWqd r0BiiHuIDbdutmloRq3iChqnNSEmrAg3RQwZXT4siYmJGRh8kiXxj1caWxWLXSpZVS f+srBohAupcjBHiXWwz8bsaEQeDa58vQ7QGruqVV/WFLKqYi7quykwhGIcXnpzKCTb vRGjvptLy0tZfU0+1SODhnTNw1znk55paAWBDD4OkhQCTqY2E1vcq2x6S/2dEqmO+k rvSvw8/lX14lMpathnQGJ4L0YioxdF+4oz+SPYOFY+VFtVPqWSIKMwlDs8thoAq6f6 E8XvqpqBLmY0Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TVRb81BCnz9rxD; Wed, 7 Feb 2024 18:15:47 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87r0hpqs8i.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 06 Feb 2024 20:59:09 +0100") References: <87pm1ggrdx.fsf@posteo.net> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Wed, 07 Feb 2024 17:15:45 +0000 Message-ID: <875xz05h6m.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: > Eli Zaretskii writes: > >>> From: Philip Kaludercic >>> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >>> monnier@iro.umontreal.ca >>> Date: Tue, 06 Feb 2024 19:10:32 +0000 >>> >>> >> +@defmac compat-call fun &rest args >>> >> +This macro calls the compatibility function @var{fun} with @var{args}. >>> >> +Many functions provided by Compat can be called directly without this >>> >> +macro. However in the case where Compat provides an alternative >>> >> +version of an existing function, the function call has to go through >>> >> +@code{compat-call}. >>> >> +@end defmac >>> > >>> > This description left me without understanding when I need to use >>> > compat-call and when I can just call FUN. Can you explain more? >>> >>> The intention was for this paragraph to catch that case, >>> >>> However in the case where Compat provides an alternative version of an >>> existing function, the function call has to go through >>> @code{compat-call}. >>> >>> though the real information is to be found in the Compat manual, where >>> the functions that have to be called via compat-call are documented. >>> >>> Should the above sentence be rephrased to give a general feeling for >>> when this is the case >>> >>> However in the case where Compat provides an alternative version of an >>> existing function, the function call has to go through >>> @code{compat-call}. This is the case when, for example the signature >>> changes between versions, preventing older versions of Emacs from >>> using optional arguments introduced in newer releases. >>> >>> or should we just refer to the external manual? >> >> Let me try to make my point more clear: I'd prefer that the reader >> emerges from reading this description with a practical way of knowing >> when to call the function directly and when to call it via >> 'compat-call'. If that's not easy to understand, perhaps we should >> tell that 'compat-call' should always be used, to avoid some rare >> corner cases where a direct call will not do, and be done? > > I don't think we should recommend always using `compat-call', that would > make code unreadable. What definitions have to be called via > `compat-call' really depends on how they were defined in Compat. I > don't know of a better rule to describe it without copying the > documentation from the Compat manual (that wouldn't be a good idea > either, because it wouldn't stay up to date). Daniel, do have any ideas how to improve the documentation here? It seems to me that the authoritative source of information on what functions to compat-call is Compat itself, right? From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 12:32:04 2024 Received: (at 66554) by debbugs.gnu.org; 7 Feb 2024 17:32:04 +0000 Received: from localhost ([127.0.0.1]:57829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXlmF-00044v-R3 for submit@debbugs.gnu.org; Wed, 07 Feb 2024 12:32:04 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:41867 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXlmC-00044P-IK for 66554@debbugs.gnu.org; Wed, 07 Feb 2024 12:32:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NFNjzw+lT5H4PPyQo4OCPCSyi2S9EljojjHmWKtpxZw=; b=PJFMaoFbLrYP+WMrY/9Mjeuu0Q htRvpnoLXHNh4RZtCtJkvDr1+LrAihIWaL9ixQYNHcoY93kj7sI997pIpc9/ng6emFug0Bjp7e5V0 0JA6cd0IcPWZsfwkeTbL2aXe+ThtSNme93e1cwP2TVNoJxXAcyM1TP3Hj04b3XMoFDfc=; From: Daniel Mendler To: Philip Kaludercic Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <875xz05h6m.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 07 Feb 2024 17:15:45 +0000") References: <87pm1ggrdx.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> Date: Wed, 07 Feb 2024 18:31:39 +0100 Message-ID: <87jzngw58k.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Eli Zaretskii , stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > Philip Kaludercic writes: > >> Eli Zaretskii writes: >> >>>> From: Philip Kaludercic >>>> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >>>> monnier@iro.umontreal.ca >>>> Date: Tue, 06 Feb 2024 19:10:32 +0000 >>>> >>>> >> +@defmac compat-call fun &rest args >>>> >> +This macro calls the compatibility function @var{fun} with @var{args}. >>>> >> +Many functions provided by Compat can be called directly without this >>>> >> +macro. However in the case where Compat provides an alternative >>>> >> +version of an existing function, the function call has to go through >>>> >> +@code{compat-call}. >>>> >> +@end defmac >>>> > >>>> > This description left me without understanding when I need to use >>>> > compat-call and when I can just call FUN. Can you explain more? >>>> >>>> The intention was for this paragraph to catch that case, >>>> >>>> However in the case where Compat provides an alternative version of an >>>> existing function, the function call has to go through >>>> @code{compat-call}. >>>> >>>> though the real information is to be found in the Compat manual, where >>>> the functions that have to be called via compat-call are documented. >>>> >>>> Should the above sentence be rephrased to give a general feeling for >>>> when this is the case >>>> >>>> However in the case where Compat provides an alternative version of an >>>> existing function, the function call has to go through >>>> @code{compat-call}. This is the case when, for example the signature >>>> changes between versions, preventing older versions of Emacs from >>>> using optional arguments introduced in newer releases. >>>> >>>> or should we just refer to the external manual? >>> >>> Let me try to make my point more clear: I'd prefer that the reader >>> emerges from reading this description with a practical way of knowing >>> when to call the function directly and when to call it via >>> 'compat-call'. If that's not easy to understand, perhaps we should >>> tell that 'compat-call' should always be used, to avoid some rare >>> corner cases where a direct call will not do, and be done? >> >> I don't think we should recommend always using `compat-call', that would >> make code unreadable. What definitions have to be called via >> `compat-call' really depends on how they were defined in Compat. I >> don't know of a better rule to describe it without copying the >> documentation from the Compat manual (that wouldn't be a good idea >> either, because it wouldn't stay up to date). > > Daniel, do have any ideas how to improve the documentation here? It > seems to me that the authoritative source of information on what > functions to compat-call is Compat itself, right? The Compat manual explicitly lists how each function should be called. This information is not static, since new functions are added with every Compat release. Examples from the Compat manual: Function: compat-call plist-get plist prop &optional predicate Function: ntake n list I think we should explain the general idea in the compat.el file in Emacs itself (docstrings and commentary) and refer to the Compat manual for the list of supported functions and their calling convention. The explanations in the current patch look good to me. Daniel From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 12:43:37 2024 Received: (at 66554) by debbugs.gnu.org; 7 Feb 2024 17:43:37 +0000 Received: from localhost ([127.0.0.1]:57854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXlxR-0004Lz-A5 for submit@debbugs.gnu.org; Wed, 07 Feb 2024 12:43:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXlxO-0004Lk-Ot for 66554@debbugs.gnu.org; Wed, 07 Feb 2024 12:43:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXlx4-0001IW-GU; Wed, 07 Feb 2024 12:43:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QBLGg40okdHw0hidc1Erh0Tmc6x5FOPDoJb5BeC/vz0=; b=QBIxgUqVi52u IYGUaWEVsYUHqhAYg6Em1KY7BIbGUZTchU+Lkg8FBjNtAzXnhNgc44NNx4fwT1LRj06Xpti8YVyra a7IocEeCuhhF1Q+E4AgAmmuR36zD8Zd/w5a/F9g+P9Sjxz1u/zXf4AVIVi0S4PX8F08aXbZWmLKtW ig65zEuojFtqO7lz0LATrfITVEY7wGkfiL6qU1NgI20PrBIJIc/yoPksdSvc4DDloPWKaI6fENvMN IcB9gFQ0WdaFaQvazaGC3JdoIlPXK3ekbNCXQQPl1U1IclgTzrFFU1urB0WJLxbMEkvhP4YhAMlDH 4VXUEC3T8D5gpW44/Rbx6w==; Date: Wed, 07 Feb 2024 19:43:10 +0200 Message-Id: <86sf24xj9t.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <875xz05h6m.fsf@posteo.net> (message from Philip Kaludercic on Wed, 07 Feb 2024 17:15:45 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, > monnier@iro.umontreal.ca > Date: Wed, 07 Feb 2024 17:15:45 +0000 > > >> Let me try to make my point more clear: I'd prefer that the reader > >> emerges from reading this description with a practical way of knowing > >> when to call the function directly and when to call it via > >> 'compat-call'. If that's not easy to understand, perhaps we should > >> tell that 'compat-call' should always be used, to avoid some rare > >> corner cases where a direct call will not do, and be done? > > > > I don't think we should recommend always using `compat-call', that would > > make code unreadable. What definitions have to be called via > > `compat-call' really depends on how they were defined in Compat. I > > don't know of a better rule to describe it without copying the > > documentation from the Compat manual (that wouldn't be a good idea > > either, because it wouldn't stay up to date). > > Daniel, do have any ideas how to improve the documentation here? It > seems to me that the authoritative source of information on what > functions to compat-call is Compat itself, right? What does Compat manual say about this aspect? From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 02:40:48 2024 Received: (at 66554) by debbugs.gnu.org; 8 Feb 2024 07:40:48 +0000 Received: from localhost ([127.0.0.1]:58923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXz1b-00033W-WA for submit@debbugs.gnu.org; Thu, 08 Feb 2024 02:40:48 -0500 Received: from mout01.posteo.de ([185.67.36.65]:43619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXz1Z-00033D-S3 for 66554@debbugs.gnu.org; Thu, 08 Feb 2024 02:40:46 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8C957240029 for <66554@debbugs.gnu.org>; Thu, 8 Feb 2024 08:40:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707378025; bh=QlINDmpX6C/RIEsvB6G8dKYcPbZJvN5WBRS+G0oPWSU=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=IhsdGfZAkwHXaUIUZ6nHzIqz8NlTdjXdcujAiScAI5uEQD3S5rZ3gCq+JAFAjARkR ROY0QrVPeUPw258HRBltZLhkWDmBLCCvvhTsTTo6fcCFjcQAryjOTF4XsLxLyzHnRb ZJg3voo5dgW9r8udPq9fjdDHm1ZNNph/3EUPdQT2MESgUfg5BZYhw46M/Wd1EBOnKv mPTKpUaUfGrahAhAFip+sWaCXRcRKlkD+xTUbQgXEk9GJkDAXq19NWew/gw87UlXVu 5lyRugkQ/uphjWONHX3aeZtO4OhcvQ4Zd0Pro+hxKs8rRjNxk8YQLFN9VLdzkpjlvX jRxByCTIR7KPQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TVpmm3r6bz9rxG; Thu, 8 Feb 2024 08:40:24 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <86sf24xj9t.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 07 Feb 2024 19:43:10 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 08 Feb 2024 07:40:23 +0000 Message-ID: <87plx7e74o.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >> monnier@iro.umontreal.ca >> Date: Wed, 07 Feb 2024 17:15:45 +0000 >> >> >> Let me try to make my point more clear: I'd prefer that the reader >> >> emerges from reading this description with a practical way of knowing >> >> when to call the function directly and when to call it via >> >> 'compat-call'. If that's not easy to understand, perhaps we should >> >> tell that 'compat-call' should always be used, to avoid some rare >> >> corner cases where a direct call will not do, and be done? >> > >> > I don't think we should recommend always using `compat-call', that would >> > make code unreadable. What definitions have to be called via >> > `compat-call' really depends on how they were defined in Compat. I >> > don't know of a better rule to describe it without copying the >> > documentation from the Compat manual (that wouldn't be a good idea >> > either, because it wouldn't stay up to date). >> >> Daniel, do have any ideas how to improve the documentation here? It >> seems to me that the authoritative source of information on what >> functions to compat-call is Compat itself, right? > > What does Compat manual say about this aspect? --8<---------------cut here---------------start------------->8--- Note that Compat provides replacement functions with extended functionality for functions that are already defined (@code{sort}, @code{assoc}, @dots{}). These functions may have changed their calling convention (additional optional arguments) or may have changed their behavior. These functions must be looked up explicitly with @code{compat-function} or called explicitly with @code{compat-call}. We call them ``Extended Definitions''. In contrast, newly ``Added Definitions'' can be called as usual. @example (compat-call assoc key alist testfn) ;; Call extended `assoc' (mapcan fun seq) ;; Call newly added `mapcan' @end example @defmac compat-call fun &rest args This macro calls the compatibility function @var{fun} with @var{args}. Many functions provided by Compat can be called directly without this macro. However in the case where Compat provides an alternative version of an existing function, the function call has to go through @code{compat-call}. This happens for example when the calling convention of a function has changed. @end defmac @defmac compat-function fun This macro returns the compatibility function symbol for @var{fun}. See @code{compat-call} for a more convenient macro to directly call compatibility functions. @end defmac --8<---------------cut here---------------end--------------->8--- and then later on, for each version there is a section like this --8<---------------cut here---------------start------------->8--- @subsection Extended Definitions These functions must be called explicitly via @code{compat-call}, since their calling convention or behavior was extended in Emacs 29.1: @c copied from lispref/keymaps.texi @defun compat-call@ set-transient-map keymap &optional keep-pred on-exit message timeout This function adds @var{keymap} as a @dfn{transient} keymap, which takes precedence over other keymaps for one (or more) subsequent keys. ... --8<---------------cut here---------------end--------------->8--- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 03:21:40 2024 Received: (at 66554) by debbugs.gnu.org; 8 Feb 2024 08:21:41 +0000 Received: from localhost ([127.0.0.1]:58958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXzfA-0004AK-GN for submit@debbugs.gnu.org; Thu, 08 Feb 2024 03:21:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXzf7-0004A7-Qg for 66554@debbugs.gnu.org; Thu, 08 Feb 2024 03:21:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXzen-0005jw-5Q; Thu, 08 Feb 2024 03:21:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YUNkJ9dljd6CeipP62yV65Wcth7pvc2UFcVqhb90rfQ=; b=dLSO7KG162b4 XVUxWgYyeR/p/iVBiC0OYfrQLj8nRbaK7UiW0hvUKh+WMXyxj7e05i68egyp1O/t4uZ/3na7VQn7m 1gf1frRwfz2VOE3Tacsskn6ZRkGzohsIqccwGQKx7YAlaAwD5dyJlXYQRGzLbhUmbcWnu0tIqd4pI UXXlE3/ukKnBwyhH/KUztINnnyjtpmtxa+aDtgYZAbFHiYzkEwwd03gFAgYqtn2yK5380MIniq7x1 h1eeuSaTP9UhdxW7iDN97s6DEpyB2x3KgVmuAjxfiACtDV63X00mDuoS0Zs9NkibXDUB5ce+obH6p Y0TJdQadU5uCSKjC33yArg==; Date: Thu, 08 Feb 2024 10:21:14 +0200 Message-Id: <861q9nxt6t.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87plx7e74o.fsf@posteo.net> (message from Philip Kaludercic on Thu, 08 Feb 2024 07:40:23 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, > monnier@iro.umontreal.ca > Date: Thu, 08 Feb 2024 07:40:23 +0000 > > Eli Zaretskii writes: > > >> Daniel, do have any ideas how to improve the documentation here? It > >> seems to me that the authoritative source of information on what > >> functions to compat-call is Compat itself, right? > > > > What does Compat manual say about this aspect? > > --8<---------------cut here---------------start------------->8--- > Note that Compat provides replacement functions with extended > functionality for functions that are already defined (@code{sort}, > @code{assoc}, @dots{}). These functions may have changed their > calling convention (additional optional arguments) or may have changed > their behavior. These functions must be looked up explicitly with > @code{compat-function} or called explicitly with @code{compat-call}. > We call them ``Extended Definitions''. In contrast, newly ``Added > Definitions'' can be called as usual. Thanks. I suggest to copy the above paragraph to the ELisp reference manual, and add a cross-reference to the Compat manual after it. Btw, whenever you introduce terminology in our manuals, as in ``Extended Definitions'' above, it is best to use the @dfn markup instead of literal quotes: the results look better in HTML and printed output formats. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 05:47:47 2024 Received: (at 66554) by debbugs.gnu.org; 8 Feb 2024 10:47:47 +0000 Received: from localhost ([127.0.0.1]:59222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY1wY-0008DF-LC for submit@debbugs.gnu.org; Thu, 08 Feb 2024 05:47:47 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:44187 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY1wW-0008Cw-GF for 66554@debbugs.gnu.org; Thu, 08 Feb 2024 05:47:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MNHXChs4m7cd5oULdeRcNqybTd0qvhK4Hwbt+2IoDUs=; b=cTkF1uiAI8TVAkfXMvvBYy4cT8 2ZTxU4aCFndDgYKQb1IB0lxhQimb1DOmjTe1DVw+6khgoZvMfopVHbYffZQVXp2s+rdHtAiqPCznw 9YqLWdym/wkgPPWen+1GkaVeF8XRAb2d/MKcHvd4Amx6vFmhRAC7WWqZ85jQqcftoWDY=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <861q9nxt6t.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 08 Feb 2024 10:21:14 +0200") References: <87pm1ggrdx.fsf@posteo.net> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> Date: Thu, 08 Feb 2024 11:47:21 +0100 Message-ID: <87eddnw7uu.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >> monnier@iro.umontreal.ca >> Date: Thu, 08 Feb 2024 07:40:23 +0000 >> >> Eli Zaretskii writes: >> >> >> Daniel, do have any ideas how to improve the documentation here? It >> >> seems to me that the authoritative source of information on what >> >> functions to compat-call is Compat itself, right? >> > >> > What does Compat manual say about this aspect? >> >> --8<---------------cut here---------------start------------->8--- >> Note that Compat provides replacement functions with extended >> functionality for functions that are already defined (@code{sort}, >> @code{assoc}, @dots{}). These functions may have changed their >> calling convention (additional optional arguments) or may have changed >> their behavior. These functions must be looked up explicitly with >> @code{compat-function} or called explicitly with @code{compat-call}. >> We call them ``Extended Definitions''. In contrast, newly ``Added >> Definitions'' can be called as usual. > > Thanks. I suggest to copy the above paragraph to the ELisp reference > manual, and add a cross-reference to the Compat manual after it. > > Btw, whenever you introduce terminology in our manuals, as in > ``Extended Definitions'' above, it is best to use the @dfn markup > instead of literal quotes: the results look better in HTML and printed > output formats. Thanks for mentioning @dfn. When we added the concept of ``Extended Definitions'' to the Compat manual I was wondering if there is a better way to make it stand out more. I will update the Compat manual accordingly. Daniel From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 11:29:32 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 16:29:32 +0000 Received: from localhost ([127.0.0.1]:52962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYqEO-0008HY-4w for submit@debbugs.gnu.org; Sat, 10 Feb 2024 11:29:32 -0500 Received: from mout02.posteo.de ([185.67.36.66]:52129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYqEK-0008H2-P7 for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 11:29:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 27685240101 for <66554@debbugs.gnu.org>; Sat, 10 Feb 2024 17:29:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707582547; bh=aLSAYdeqYmdgB0sLdu1L0YQsoiV2k2eOMb1XTPEg5fo=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Type:From; b=qzbHAdczy/6VxYRUvWP+zw0ib808Awp9y/5jY7Eco//lwR328JjpzK9PmjzP4x6Ea 85qPypS+YBW6cBl2jFy85ZqldyeqNbOEBtNC+5jVwQfhuWLdBJAVBnSY8gMDlws1fP 0X6FTDFYadGBZfWWulbcxCuLQSKEZXDRxOUQcu+rtk9opGgJi2jI75uk/VMf5+cbBN 4oBEZ0Y/y+mHFo9jYQnULPaiYCYg9jqIFrZ5nf8DOlOj/mF7bBoRohgNPkB4WR+mcj dBSTFiVfVNZI/PlUFmPgTJkCXOZ1ZQq+fz+DaXno9MLXsUbvuOAVegXp2fGkzUIwG0 DZN4j0/XBJubg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TXGPq23dCz6txL; Sat, 10 Feb 2024 17:29:02 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <861q9nxt6t.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 08 Feb 2024 10:21:14 +0200") References: <87pm1ggrdx.fsf@posteo.net> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> X-Hashcash: 1:20:240210:eliz@gnu.org::0hR9BxzktTiT3PPW:0Ur/ X-Hashcash: 1:20:240210:66554@debbugs.gnu.org::HTgs10Q81KC3TV8A:3EXq X-Hashcash: 1:20:240210:stefankangas@gmail.com::2Scnd/Ec+I+S1Otr:46J4 X-Hashcash: 1:20:240210:monnier@iro.umontreal.ca::HwTpSUsxZiwhte6w:4OGm X-Hashcash: 1:20:240210:mail@daniel-mendler.de::h9GkKmTDEQseImUa:97Kx Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Sat, 10 Feb 2024 16:29:00 +0000 Message-ID: <878r3s471v.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >> monnier@iro.umontreal.ca >> Date: Thu, 08 Feb 2024 07:40:23 +0000 >> >> Eli Zaretskii writes: >> >> >> Daniel, do have any ideas how to improve the documentation here? It >> >> seems to me that the authoritative source of information on what >> >> functions to compat-call is Compat itself, right? >> > >> > What does Compat manual say about this aspect? >> >> --8<---------------cut here---------------start------------->8--- >> Note that Compat provides replacement functions with extended >> functionality for functions that are already defined (@code{sort}, >> @code{assoc}, @dots{}). These functions may have changed their >> calling convention (additional optional arguments) or may have changed >> their behavior. These functions must be looked up explicitly with >> @code{compat-function} or called explicitly with @code{compat-call}. >> We call them ``Extended Definitions''. In contrast, newly ``Added >> Definitions'' can be called as usual. > > Thanks. I suggest to copy the above paragraph to the ELisp reference > manual, OK, can do. > and add a cross-reference to the Compat manual after it. IIUC the cross-reference will be broken, unless the user has installed Compat manually. Moreover, if I am not mistaken, the documentation bundled with the Compat package might not be loaded at all, if the package isn't activated due to the versioning trick. I'd add a link to the HTML manual, rendered on elpa.gnu.org, but I don't know if this is conventional. > Btw, whenever you introduce terminology in our manuals, as in > ``Extended Definitions'' above, it is best to use the @dfn markup > instead of literal quotes: the results look better in HTML and printed > output formats. Ok. -- Philip Kaludercic From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 11:36:51 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 16:36:51 +0000 Received: from localhost ([127.0.0.1]:53409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYqLT-0000Ac-4F for submit@debbugs.gnu.org; Sat, 10 Feb 2024 11:36:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYqLQ-0000AK-M7 for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 11:36:49 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYqL4-0004h8-9C; Sat, 10 Feb 2024 11:36:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=m0ARM06neLifUkHXQmaUpn2b+4S0FRI7/0+zidLdQSM=; b=MxbKGQWC6DdX wTmNB+DunCrzCFAC6b15CqMt/TQaELCTtf7umbtu1i55xkMtZYHrCeFgz47b1GbLFPK9jEhbX7KiK /GUWlD3AwxF2+tc4Rt7ne7T0aqkItexmjUnLKq+SNFn4OvwQjVDaC2uS2pzaBKMKjpqtaLCvWUMMw haz9/u9qAicU/jxUOots9JpmS/jIOzfkJOgYb3CNbyAAZsvjlS2MSFPluqPJ789OrSsdAPLvdbaAP DGq0oOUiLkcBaSCl1J38eSArfpItFzEyv2841dh8QqgOdF0SvjcSpTeRe1lHtII2kM2kAadwYDoZ3 dhzNU6qPiSnn7K8Im60IAg==; Date: Sat, 10 Feb 2024 18:36:22 +0200 Message-Id: <86mss8tgxl.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <878r3s471v.fsf@posteo.net> (message from Philip Kaludercic on Sat, 10 Feb 2024 16:29:00 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, > monnier@iro.umontreal.ca > Date: Sat, 10 Feb 2024 16:29:00 +0000 > > >> Note that Compat provides replacement functions with extended > >> functionality for functions that are already defined (@code{sort}, > >> @code{assoc}, @dots{}). These functions may have changed their > >> calling convention (additional optional arguments) or may have changed > >> their behavior. These functions must be looked up explicitly with > >> @code{compat-function} or called explicitly with @code{compat-call}. > >> We call them ``Extended Definitions''. In contrast, newly ``Added > >> Definitions'' can be called as usual. > > > > Thanks. I suggest to copy the above paragraph to the ELisp reference > > manual, > > OK, can do. > > > and add a cross-reference to the Compat manual after it. > > IIUC the cross-reference will be broken, unless the user has installed > Compat manually. I wouldn't be worried about that: the cross-reference is readable, and the reader will understand what it says even if it cannot be followed. We do that for other manuals, which belong to other packages that might not be installed. > Moreover, if I am not mistaken, the documentation bundled with the > Compat package might not be loaded at all, if the package isn't > activated due to the versioning trick. What do you mean by "not loaded"? If a package is installed, its Info manual is also installed, isn't it? And if you mean the manual might not be on the Info search path, then that again goes back to the "package not installed" scenario, which I don't think we should worry about. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 11:53:51 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 16:53:51 +0000 Received: from localhost ([127.0.0.1]:54308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYqbv-0000w3-1h for submit@debbugs.gnu.org; Sat, 10 Feb 2024 11:53:51 -0500 Received: from mout02.posteo.de ([185.67.36.66]:40201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYqbs-0000vl-S3 for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 11:53:50 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9C3F3240104 for <66554@debbugs.gnu.org>; Sat, 10 Feb 2024 17:46:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707583591; bh=47/Qg6eK1LVPkVSTzhjprH19rz7P+lht+3CyI11JkJk=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Type:From; b=gC/BYxprjWfCGRDUxIqJMLFYGnchtF+HoQzkWS4SYLn/xC8x3urzxsByVSmyj4bIV Y36qAhbiGB8IvcA/1JrGA33RKl2GYNjFoDtAJR7/jDChNn3cFGCP9zPMDniv22wmpY 7lbf1LWq0SXDWHl9UWORfeZbea/GIzklg5acsIj+zBE/WkIAhFD03y8bUzBqDSkDXC J5xxPlboXY7BkRSC+uDsLymVMJ8M+bbC3JEc6io8PY95/tsv7JF9mBxm/0xnEVxdKE kw+ozprA9W+O2wXQFAny1EzboS+VGc+aQjcjb9pbe6y89G6MQZEZGDUOlDz2XTEvWG i2t/1e9elTyzQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TXGnz0zCTz6twn; Sat, 10 Feb 2024 17:46:31 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <86mss8tgxl.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Feb 2024 18:36:22 +0200") References: <87pm1ggrdx.fsf@posteo.net> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> X-Hashcash: 1:20:240210:monnier@iro.umontreal.ca::hDyZgnUc4Mw2ffxe:1m5 X-Hashcash: 1:20:240210:mail@daniel-mendler.de::PLq3SlwIW6ZBhGw1:YFa X-Hashcash: 1:20:240210:66554@debbugs.gnu.org::Q+OAHEuEn+jc6ip8:11cL X-Hashcash: 1:20:240210:stefankangas@gmail.com::UT4HRFixHmsQehkS:2dWJ X-Hashcash: 1:20:240210:eliz@gnu.org::PkR4jqN9FHDcqLWH:8Apm Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Sat, 10 Feb 2024 16:46:30 +0000 Message-ID: <87o7co2ro9.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >> monnier@iro.umontreal.ca >> Date: Sat, 10 Feb 2024 16:29:00 +0000 >> >> >> Note that Compat provides replacement functions with extended >> >> functionality for functions that are already defined (@code{sort}, >> >> @code{assoc}, @dots{}). These functions may have changed their >> >> calling convention (additional optional arguments) or may have changed >> >> their behavior. These functions must be looked up explicitly with >> >> @code{compat-function} or called explicitly with @code{compat-call}. >> >> We call them ``Extended Definitions''. In contrast, newly ``Added >> >> Definitions'' can be called as usual. >> > >> > Thanks. I suggest to copy the above paragraph to the ELisp reference >> > manual, >> >> OK, can do. >> >> > and add a cross-reference to the Compat manual after it. >> >> IIUC the cross-reference will be broken, unless the user has installed >> Compat manually. > > I wouldn't be worried about that: the cross-reference is readable, and > the reader will understand what it says even if it cannot be followed. > We do that for other manuals, which belong to other packages that > might not be installed. OK. I don't have access to the machine with the latest version of the patch, but as soon as I get that going again, I'll update it and push the change to master. >> Moreover, if I am not mistaken, the documentation bundled with the >> Compat package might not be loaded at all, if the package isn't >> activated due to the versioning trick. > > What do you mean by "not loaded"? If a package is installed, its Info > manual is also installed, isn't it? And if you mean the manual might > not be on the Info search path, then that again goes back to the > "package not installed" scenario, which I don't think we should worry > about. I might be mistaken, but from a cursory peak at package.el, specifically `package-activate-1', the Info search path is only updated if the package is activated. If the core-package takes priority over an external package, the external package shouldn't get activated. This hasn't been a problem in the past, because core packages don't come with their own manuals, but this is an exception since core-Compat is not really the same code as ELPA-Compat. One way to fix this, would be to explain how to disable a package via `package-load-list' in the Compat manual. I'll have to try it out, but if it works, I think that solution should be acceptable. > Thanks. -- Philip Kaludercic From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 12:20:51 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 17:20:51 +0000 Received: from localhost ([127.0.0.1]:55907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYr22-000296-Qj for submit@debbugs.gnu.org; Sat, 10 Feb 2024 12:20:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYr20-00028m-UJ for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 12:20:49 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYr1d-0003JG-PU; Sat, 10 Feb 2024 12:20:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KWZoVsTGXbGeuDJW4n7Wtx6WlkaBNnqJzw7vP4q+BsQ=; b=mli+94Iktg7v DC2kMc+m+iQm70rYaAbj9pyGP80KF+Yrl7AQ9oEZ2plvktq4vyrAa6+X2ZlkGon1Su2cmWiPHkUDi KQHNFb/n7yZRxMy1vV5dZ/4Ks9xtuJm2o01ueAvpZPJbe+oNCBAQSdHDiYFxn6Ju6X0EhYjHj3dj0 hack7P2yU40hn6xg2EqebZMUL5BMJaVTFBEgwVBCM6UcG+ehOrmGDsHN8bRb/nZqQS0PwFWoN40bd aPc/aCB5IQPaBa2vLxesqtVnJ7YH5tFIHJPE+RFjVccgRsvqJtQOa7IFNikwhgWSn3iR0EQQfjQOe HB9O2zbTJ5lLFs11LzwKJQ==; Date: Sat, 10 Feb 2024 19:20:22 +0200 Message-Id: <86le7stew9.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87o7co2ro9.fsf@posteo.net> (message from Philip Kaludercic on Sat, 10 Feb 2024 16:46:30 +0000) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> <87o7co2ro9.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: mail@daniel-mendler.de, stefankangas@gmail.com, monnier@iro.umontreal.ca, 66554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, > monnier@iro.umontreal.ca > Date: Sat, 10 Feb 2024 16:46:30 +0000 > > I might be mistaken, but from a cursory peak at package.el, specifically > `package-activate-1', the Info search path is only updated if the > package is activated. If the core-package takes priority over an > external package, the external package shouldn't get activated. > > This hasn't been a problem in the past, because core packages don't come > with their own manuals, but this is an exception since core-Compat is > not really the same code as ELPA-Compat. > > One way to fix this, would be to explain how to disable a package via > `package-load-list' in the Compat manual. I'll have to try it out, but > if it works, I think that solution should be acceptable. Another way to fix this is simply to include the Compat manual in emacs.git. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 12:40:48 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 17:40:48 +0000 Received: from localhost ([127.0.0.1]:57197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrLL-00039Y-OK for submit@debbugs.gnu.org; Sat, 10 Feb 2024 12:40:48 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:50443 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrLJ-000394-3k for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 12:40:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KB12M10NFxyESC+5NDnIY9LPW57KnF3dLTjHP/NFVFI=; b=ujFcMCDs8FJacOtUN3TnliwxoA 7xcOuydVS73yruUzzBGXLOh2FNlqMgLX27tx3ps35EhGGphjpGKMr3Lk2EI6u0vM9v4k7LF+xIw9/ jCBTzThlrU4XEA25fAW4On+lp+tyJojFfGLPnqO8WmYg9U+zUxv8L4ZyCdiSvzNZTf70=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <86le7stew9.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Feb 2024 19:20:22 +0200") References: <87pm1ggrdx.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> <87o7co2ro9.fsf@posteo.net> <86le7stew9.fsf@gnu.org> Date: Sat, 10 Feb 2024 18:40:21 +0100 Message-ID: <87y1bsqku2.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >> monnier@iro.umontreal.ca >> Date: Sat, 10 Feb 2024 16:46:30 +0000 >> >> I might be mistaken, but from a cursory peak at package.el, specifically >> `package-activate-1', the Info search path is only updated if the >> package is activated. If the core-package takes priority over an >> external package, the external package shouldn't get activated. >> >> This hasn't been a problem in the past, because core packages don't come >> with their own manuals, but this is an exception since core-Compat is >> not really the same code as ELPA-Compat. >> >> One way to fix this, would be to explain how to disable a package via >> `package-load-list' in the Compat manual. I'll have to try it out, but >> if it works, I think that solution should be acceptable. > > Another way to fix this is simply to include the Compat manual in > emacs.git. No, this won't be useful. The Compat manual available at a given time is not relevant for the Emacs version developed at that time. If we would include the manual Compat 30 in Emacs 30, the manual will document functionality already present and documented in the Emacs 30 manual itself. The Compat 30 manual is only relevant for Emacs versions 29 and older. Daniel From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 12:47:47 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 17:47:47 +0000 Received: from localhost ([127.0.0.1]:57604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrS6-0006DG-Nd for submit@debbugs.gnu.org; Sat, 10 Feb 2024 12:47:47 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:54967 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrS3-0006Cp-Rq for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 12:47:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6f7kdE+tGcRAJrLAD9AGi+wWO3NccBkmK7m7ztt8SIM=; b=poc9Z/gWwi16PgH7BGxCUOZZnQ CTeNArS/mt48cw6cs+EsL9c63Be9wwRHFRKV5SGEw0jJYTQM4nh4dZiBTkYlgiUZPygtW+J+RusgV ctDt1XKj1UtUSPFd89D0//+akz6UYIVtiJT+DS7ZtL7UWF0WA7ii1X8e1K5qCPAV+rdA=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87y1bsqku2.fsf@daniel-mendler.de> (Daniel Mendler's message of "Sat, 10 Feb 2024 18:40:21 +0100") References: <87pm1ggrdx.fsf@posteo.net> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> <87o7co2ro9.fsf@posteo.net> <86le7stew9.fsf@gnu.org> <87y1bsqku2.fsf@daniel-mendler.de> Date: Sat, 10 Feb 2024 18:47:21 +0100 Message-ID: <87v86wqkie.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, Philip Kaludercic , stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Daniel Mendler writes: > Eli Zaretskii writes: > >>> From: Philip Kaludercic >>> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >>> monnier@iro.umontreal.ca >>> Date: Sat, 10 Feb 2024 16:46:30 +0000 >>> >>> I might be mistaken, but from a cursory peak at package.el, specifically >>> `package-activate-1', the Info search path is only updated if the >>> package is activated. If the core-package takes priority over an >>> external package, the external package shouldn't get activated. >>> >>> This hasn't been a problem in the past, because core packages don't come >>> with their own manuals, but this is an exception since core-Compat is >>> not really the same code as ELPA-Compat. >>> >>> One way to fix this, would be to explain how to disable a package via >>> `package-load-list' in the Compat manual. I'll have to try it out, but >>> if it works, I think that solution should be acceptable. >> >> Another way to fix this is simply to include the Compat manual in >> emacs.git. > > No, this won't be useful. The Compat manual available at a given time is > not relevant for the Emacs version developed at that time. If we would > include the manual Compat 30 in Emacs 30, the manual will document > functionality already present and documented in the Emacs 30 manual > itself. The Compat 30 manual is only relevant for Emacs versions 29 and > older. Well, thinking more about it, for developers of :core packages (also published on ELPA) the manual could still be helpful since the manual will provide a list of functions with their calling conventions. However if the Compat manual is included in Emacs itself it will get outdated quickly, so it is better to refer to the newest version available on ELPA. Daniel From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 13:01:42 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 18:01:42 +0000 Received: from localhost ([127.0.0.1]:58594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrfZ-0001Kd-A1 for submit@debbugs.gnu.org; Sat, 10 Feb 2024 13:01:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrfV-0001KC-Jq for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 13:01:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYrf9-0002bn-NT; Sat, 10 Feb 2024 13:01:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=CKIm/aX59Tt13I27CBu3/eeHj/Hymc0m/6VIsrlc0N4=; b=ixe1HFnEzKFl OrbEZeHPT5WinsgzYESXl8psGczGJdYHt20QtHXTy4w66/Lu4xHGgP6Z7HZKwduYqkO81LbulUb4+ 9Rt3dcDgT14weskWkscVJ3q/IFJ8CD5k9WKVA11poJ9hgg8EsIYmi5PbTF/eb1o5IYwq3UQBoYrQG h+giyIznFCPLlX7/V59NiZOey0UBAsBD5NWWC0JE5Jlv88QmqkRaP8sB+gujmYnQ6lQR6aLNeDA3L +8YTy7NYuQrRQZAfYNNTy1oh+LaTR0hzABH69eTgv4EIHUVM8zhX0+RaLYaDgjVjfgY3opwtrfaCZ qC4QAPAPKibXYkGbwwm15g==; Date: Sat, 10 Feb 2024 20:00:11 +0200 Message-Id: <86il2wtd1w.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <87y1bsqku2.fsf@daniel-mendler.de> (message from Daniel Mendler on Sat, 10 Feb 2024 18:40:21 +0100) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> <87o7co2ro9.fsf@posteo.net> <86le7stew9.fsf@gnu.org> <87y1bsqku2.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Mendler > Cc: Philip Kaludercic , 66554@debbugs.gnu.org, > stefankangas@gmail.com, monnier@iro.umontreal.ca > Date: Sat, 10 Feb 2024 18:40:21 +0100 > > Eli Zaretskii writes: > > >> From: Philip Kaludercic > >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, > >> monnier@iro.umontreal.ca > >> Date: Sat, 10 Feb 2024 16:46:30 +0000 > >> > >> I might be mistaken, but from a cursory peak at package.el, specifically > >> `package-activate-1', the Info search path is only updated if the > >> package is activated. If the core-package takes priority over an > >> external package, the external package shouldn't get activated. > >> > >> This hasn't been a problem in the past, because core packages don't come > >> with their own manuals, but this is an exception since core-Compat is > >> not really the same code as ELPA-Compat. > >> > >> One way to fix this, would be to explain how to disable a package via > >> `package-load-list' in the Compat manual. I'll have to try it out, but > >> if it works, I think that solution should be acceptable. > > > > Another way to fix this is simply to include the Compat manual in > > emacs.git. > > No, this won't be useful. The Compat manual available at a given time is > not relevant for the Emacs version developed at that time. If we would > include the manual Compat 30 in Emacs 30, the manual will document > functionality already present and documented in the Emacs 30 manual > itself. The Compat 30 manual is only relevant for Emacs versions 29 and > older. People who actually install and activate Compat from ELPA will have the manual which comes with it first on the Info search path, no? So where's the problem, and what does "won't be useful" mean in this context? To recap, we are discussing ways to make the cross-reference to the Compat manual work in as many use cases as possible, in particular when Compat is either not installed or "not activated". From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 13:03:35 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 18:03:35 +0000 Received: from localhost ([127.0.0.1]:58705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrhP-0001Q9-8J for submit@debbugs.gnu.org; Sat, 10 Feb 2024 13:03:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrhN-0001Ph-H8 for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 13:03:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYrh1-0002ru-EU; Sat, 10 Feb 2024 13:03:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dgC8YlmRFfxOGQvqyJahtxTnOizOGzrEbsS7EtJMpDI=; b=IExSyr3XuIIO W3ar/5HsyotRJ+Br3Jb+XtOz4wlcSbuv4rwXsD5Oq9C+wmrQj2It+u8USdlJibrTFAMqzXrlM9UHM 5QqVj2v0MV9unOIth+49/qMT6R/rvh4sRXaHQ6UI6e451mQl/TSI+Phm2dsBQCnHy60Et9xBzKtN6 YLibh6ur0vNsyYW6nviTySNIRU2LadLcIFkSF7P1AF3+qKUsVU5CTuuL2JETvE8ww8dM4tzhdyjcX nik172sJmcmCnmoh4cD8cS6uYMlTJzZ8A1O5isq6IqXu2y7npPvqmtkNfmjtRUZ4xFZ3V7unExkSI 3gImBK1BLVoR5rzSm/0QRA==; Date: Sat, 10 Feb 2024 20:03:08 +0200 Message-Id: <86h6igtcwz.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <87v86wqkie.fsf@daniel-mendler.de> (message from Daniel Mendler on Sat, 10 Feb 2024 18:47:21 +0100) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> <87o7co2ro9.fsf@posteo.net> <86le7stew9.fsf@gnu.org> <87y1bsqku2.fsf@daniel-mendler.de> <87v86wqkie.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Mendler > Cc: Philip Kaludercic , 66554@debbugs.gnu.org, > stefankangas@gmail.com, monnier@iro.umontreal.ca > Date: Sat, 10 Feb 2024 18:47:21 +0100 > > Well, thinking more about it, for developers of :core packages (also > published on ELPA) the manual could still be helpful since the manual > will provide a list of functions with their calling conventions. However > if the Compat manual is included in Emacs itself it will get outdated > quickly, so it is better to refer to the newest version available on > ELPA. That happens automatically when Compat is installed from ELPA, doesn't it? From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 13:15:04 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 18:15:04 +0000 Received: from localhost ([127.0.0.1]:59324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrsV-0001uW-HK for submit@debbugs.gnu.org; Sat, 10 Feb 2024 13:15:03 -0500 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:46585 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrsS-0001tZ-RP for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 13:15:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sCco1DTg2OHLXq/0hor6RzEYma+vnPmDakoybTJ6ESA=; b=iN0GjYHH3NVhKfZkeUJwjH+egQ u1X0OmQF861ajeoDJuAlouEDjbdP6kPgt9r1BHj9QFzrQLVDzm3TE5Ks3kNyyD+KTbd7F4ziVpIxC 5dXfTSUQNmkyKi3a4kE2wK2ZacNxNlnBP8OXolevM4vsYJKu/9QmH1SAjFwgbdqSGyQU=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <86il2wtd1w.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Feb 2024 20:00:11 +0200") References: <87pm1ggrdx.fsf@posteo.net> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> <87o7co2ro9.fsf@posteo.net> <86le7stew9.fsf@gnu.org> <87y1bsqku2.fsf@daniel-mendler.de> <86il2wtd1w.fsf@gnu.org> Date: Sat, 10 Feb 2024 19:14:38 +0100 Message-ID: <87sf20qj8x.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: Philip Kaludercic , 66554@debbugs.gnu.org, >> stefankangas@gmail.com, monnier@iro.umontreal.ca >> Date: Sat, 10 Feb 2024 18:40:21 +0100 >> >> Eli Zaretskii writes: >> >> >> From: Philip Kaludercic >> >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >> >> monnier@iro.umontreal.ca >> >> Date: Sat, 10 Feb 2024 16:46:30 +0000 >> >> >> >> I might be mistaken, but from a cursory peak at package.el, specifically >> >> `package-activate-1', the Info search path is only updated if the >> >> package is activated. If the core-package takes priority over an >> >> external package, the external package shouldn't get activated. >> >> >> >> This hasn't been a problem in the past, because core packages don't come >> >> with their own manuals, but this is an exception since core-Compat is >> >> not really the same code as ELPA-Compat. >> >> >> >> One way to fix this, would be to explain how to disable a package via >> >> `package-load-list' in the Compat manual. I'll have to try it out, but >> >> if it works, I think that solution should be acceptable. >> > >> > Another way to fix this is simply to include the Compat manual in >> > emacs.git. >> >> No, this won't be useful. The Compat manual available at a given time is >> not relevant for the Emacs version developed at that time. If we would >> include the manual Compat 30 in Emacs 30, the manual will document >> functionality already present and documented in the Emacs 30 manual >> itself. The Compat 30 manual is only relevant for Emacs versions 29 and >> older. > > People who actually install and activate Compat from ELPA will have > the manual which comes with it first on the Info search path, no? So > where's the problem, and what does "won't be useful" mean in this > context? To recap, we are discussing ways to make the cross-reference > to the Compat manual work in as many use cases as possible, in > particular when Compat is either not installed or "not activated". I assume it will lead to less confusion if we focus on documenting the compat.el functionality in the Elisp manual and refer to the Compat manual on ELPA via an http link, instead of copying the Compat manual. There should not be a cross-reference problem then? Daniel From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 14:12:30 2024 Received: (at 66554) by debbugs.gnu.org; 10 Feb 2024 19:12:30 +0000 Received: from localhost ([127.0.0.1]:34362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYsm5-0004Se-J7 for submit@debbugs.gnu.org; Sat, 10 Feb 2024 14:12:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYsm2-0004SI-Ix for 66554@debbugs.gnu.org; Sat, 10 Feb 2024 14:12:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYslf-0005TH-NF; Sat, 10 Feb 2024 14:12:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Yo4aRHvi376nCvSRBuac1ZJHZPTyH2Ej6XIH+jMWPxs=; b=YSRA9heKacgg dDVSVmT8nRDmOnD6pvAQBQtolZt+GwKJzGR27M72096E0dG8Xy/enQ/BTz28frlPWpGwImIRNkq+b RaRNvW2M5QqB9jr+oGm+O+lH5DxMMfXQYtYvundu6pjUpUsQVnD0O5gjWODGwBcupPIiXEchuglgr wWUO8JrIiln+UEl1ZLhdqQVmLWAP9Q7pQcnM1sfvClLJSpY9avZIhnmWqVD7VX52hjbJkGwPU9I9/ 3aFmdyDJ31tE4w9gx9Jntv95bvq3XVl16Tt75wtDWGoRVSMVuHBOnnlv+91YWUpnvbRD5tOcqGmEZ jH2S9kRxs6ZTuPTNiiQaLg==; Date: Sat, 10 Feb 2024 21:12:00 +0200 Message-Id: <86eddkt9q7.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <87sf20qj8x.fsf@daniel-mendler.de> (message from Daniel Mendler on Sat, 10 Feb 2024 19:14:38 +0100) Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core References: <87pm1ggrdx.fsf@posteo.net> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> <87o7co2ro9.fsf@posteo.net> <86le7stew9.fsf@gnu.org> <87y1bsqku2.fsf@daniel-mendler.de> <86il2wtd1w.fsf@gnu.org> <87sf20qj8x.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554 Cc: 66554@debbugs.gnu.org, philipk@posteo.net, stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Mendler > Cc: philipk@posteo.net, 66554@debbugs.gnu.org, stefankangas@gmail.com, > monnier@iro.umontreal.ca > Date: Sat, 10 Feb 2024 19:14:38 +0100 > > Eli Zaretskii writes: > > >> From: Daniel Mendler > >> Cc: Philip Kaludercic , 66554@debbugs.gnu.org, > >> stefankangas@gmail.com, monnier@iro.umontreal.ca > >> Date: Sat, 10 Feb 2024 18:40:21 +0100 > >> > >> Eli Zaretskii writes: > >> > >> >> From: Philip Kaludercic > >> >> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, > >> >> monnier@iro.umontreal.ca > >> >> Date: Sat, 10 Feb 2024 16:46:30 +0000 > >> >> > >> >> I might be mistaken, but from a cursory peak at package.el, specifically > >> >> `package-activate-1', the Info search path is only updated if the > >> >> package is activated. If the core-package takes priority over an > >> >> external package, the external package shouldn't get activated. > >> >> > >> >> This hasn't been a problem in the past, because core packages don't come > >> >> with their own manuals, but this is an exception since core-Compat is > >> >> not really the same code as ELPA-Compat. > >> >> > >> >> One way to fix this, would be to explain how to disable a package via > >> >> `package-load-list' in the Compat manual. I'll have to try it out, but > >> >> if it works, I think that solution should be acceptable. > >> > > >> > Another way to fix this is simply to include the Compat manual in > >> > emacs.git. > >> > >> No, this won't be useful. The Compat manual available at a given time is > >> not relevant for the Emacs version developed at that time. If we would > >> include the manual Compat 30 in Emacs 30, the manual will document > >> functionality already present and documented in the Emacs 30 manual > >> itself. The Compat 30 manual is only relevant for Emacs versions 29 and > >> older. > > > > People who actually install and activate Compat from ELPA will have > > the manual which comes with it first on the Info search path, no? So > > where's the problem, and what does "won't be useful" mean in this > > context? To recap, we are discussing ways to make the cross-reference > > to the Compat manual work in as many use cases as possible, in > > particular when Compat is either not installed or "not activated". > > I assume it will lead to less confusion if we focus on documenting the > compat.el functionality in the Elisp manual and refer to the Compat > manual on ELPA via an http link, instead of copying the Compat manual. > There should not be a cross-reference problem then? But we will be back to the issue of having too much to say in the ELisp manual about a relatively minor, perhaps even obscure, aspects. Which is why I'd prefer not to have all the information in the ELisp reference. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 16:55:30 2024 Received: (at 66554-done) by debbugs.gnu.org; 11 Feb 2024 21:55:30 +0000 Received: from localhost ([127.0.0.1]:51534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZHnN-0004mO-Cv for submit@debbugs.gnu.org; Sun, 11 Feb 2024 16:55:30 -0500 Received: from mout02.posteo.de ([185.67.36.66]:51231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZHkT-0004ct-03 for 66554-done@debbugs.gnu.org; Sun, 11 Feb 2024 16:52:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E6FC2240101 for <66554-done@debbugs.gnu.org>; Sun, 11 Feb 2024 22:52:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707688326; bh=BJPqj9MNzUad7MSxVI7W2Mf6aif+WHbksszurT3+Gl8=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=SKrAAYs6+wMqeVM6n62VEnm0Iz140k3jvAYIiLRDPEnDH2A2SW3F/Iim9FDsyyOBM pHTx6vxumAiC1v5mcrHpPD/NBI1YQUF8HxkrzmHqTMRV7MBw6HzfuFc/ub7ld/3zuM K0uQIivb69XEIJrLoYYlUpI7+wFwFXqh1ng6k4t/dQZSc9GRN5xOUJdeF56Ta9hStw cUIvUmKp/Oy33jpNydq9RyCz+BFUsZ/FZLpRJdWTOxDoMci48IZaw/nCWRTSWdyi1D Uta+alPAkrvqy9kSolcoGKM7rCVfEw1vPH+1P62HBuQq18H6tEDeULSdlTbdDZsiBv kD5k2vntWr2Vw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TY1X54sMlz6tvr; Sun, 11 Feb 2024 22:52:05 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#66554: [PATCH] Add the public API of Compat to the core In-Reply-To: <87o7co2ro9.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 10 Feb 2024 16:46:30 +0000") References: <87pm1ggrdx.fsf@posteo.net> <878r4ml8sg.fsf@posteo.net> <83v87qwg48.fsf@gnu.org> <87h6jaz8eo.fsf@daniel-mendler.de> <83r0idx1p1.fsf@gnu.org> <87mst1tgrt.fsf@posteo.net> <874jf39rn7.fsf@daniel-mendler.de> <871qa47ch1.fsf@posteo.net> <87a5osfka1.fsf@daniel-mendler.de> <87y1c3s2ts.fsf@posteo.net> <864jer59gm.fsf@gnu.org> <87h6ils91z.fsf@posteo.net> <86r0hpz8o2.fsf@gnu.org> <87r0hpqs8i.fsf@posteo.net> <875xz05h6m.fsf@posteo.net> <86sf24xj9t.fsf@gnu.org> <87plx7e74o.fsf@posteo.net> <861q9nxt6t.fsf@gnu.org> <878r3s471v.fsf@posteo.net> <86mss8tgxl.fsf@gnu.org> <87o7co2ro9.fsf@posteo.net> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Sun, 11 Feb 2024 21:52:04 +0000 Message-ID: <87v86usm7v.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66554-done Cc: mail@daniel-mendler.de, 66554-done@debbugs.gnu.org, stefankangas@gmail.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: > Eli Zaretskii writes: > >>> From: Philip Kaludercic >>> Cc: mail@daniel-mendler.de, 66554@debbugs.gnu.org, stefankangas@gmail.com, >>> monnier@iro.umontreal.ca >>> Date: Sat, 10 Feb 2024 16:29:00 +0000 >>> >>> >> Note that Compat provides replacement functions with extended >>> >> functionality for functions that are already defined (@code{sort}, >>> >> @code{assoc}, @dots{}). These functions may have changed their >>> >> calling convention (additional optional arguments) or may have changed >>> >> their behavior. These functions must be looked up explicitly with >>> >> @code{compat-function} or called explicitly with @code{compat-call}. >>> >> We call them ``Extended Definitions''. In contrast, newly ``Added >>> >> Definitions'' can be called as usual. >>> > >>> > Thanks. I suggest to copy the above paragraph to the ELisp reference >>> > manual, >>> >>> OK, can do. >>> >>> > and add a cross-reference to the Compat manual after it. >>> >>> IIUC the cross-reference will be broken, unless the user has installed >>> Compat manually. >> >> I wouldn't be worried about that: the cross-reference is readable, and >> the reader will understand what it says even if it cannot be followed. >> We do that for other manuals, which belong to other packages that >> might not be installed. > > OK. I don't have access to the machine with the latest version of the > patch, but as soon as I get that going again, I'll update it and push > the change to master. I have pushed the patch to master, and will therefore close this bug report. Thanks to everyone involved for helping out. From unknown Mon Aug 18 14:19:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 11 Mar 2024 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator