From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#66554: [PATCH] Add the public API of Compat to the core Date: Thu, 11 Jan 2024 19:24:09 +0000 Message-ID: <87edenptba.fsf@posteo.net> 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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35380"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66554@debbugs.gnu.org, eliz@gnu.org, Stefan Kangas , Stefan Monnier To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 11 20:25:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rO0g7-0008zw-W1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jan 2024 20:25:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rO0fv-0005mv-Ml; Thu, 11 Jan 2024 14:25:11 -0500 Original-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 1rO0fp-0005mV-FQ for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2024 14:25:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rO0fo-0004Av-6u for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2024 14:25:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rO0fl-0004Gb-Me for bug-gnu-emacs@gnu.org; Thu, 11 Jan 2024 14:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jan 2024 19:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66554-submit@debbugs.gnu.org id=B66554.170500105916343 (code B ref 66554); Thu, 11 Jan 2024 19:25:01 +0000 Original-Received: (at 66554) by debbugs.gnu.org; 11 Jan 2024 19:24:19 +0000 Original-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 Original-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 Original-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== Original-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) In-Reply-To: <87h6jjah1g.fsf@daniel-mendler.de> (Daniel Mendler's message of "Thu, 11 Jan 2024 18:58:19 +0100") 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277935 Archived-At: --=-=-= 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 --=-=-=--