From: Philip Kaludercic <philipk@posteo.net>
To: Daniel Mendler <mail@daniel-mendler.de>
Cc: 66554@debbugs.gnu.org, eliz@gnu.org,
Stefan Kangas <stefankangas@gmail.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#66554: [PATCH] Add the public API of Compat to the core
Date: Thu, 11 Jan 2024 19:24:09 +0000 [thread overview]
Message-ID: <87edenptba.fsf@posteo.net> (raw)
In-Reply-To: <87h6jjah1g.fsf@daniel-mendler.de> (Daniel Mendler's message of "Thu, 11 Jan 2024 18:58:19 +0100")
[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]
Daniel Mendler <mail@daniel-mendler.de> writes:
> Philip Kaludercic <philipk@posteo.net> 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
[-- Attachment #2: Type: text/plain, Size: 651 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 1124 bytes --]
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
next prev parent reply other threads:[~2024-01-11 19:24 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-15 9:35 bug#66554: [PATCH] Add the public API of Compat to the core Philip Kaludercic
2024-01-10 22:02 ` Stefan Kangas
2024-01-11 5:27 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 7:54 ` Philip Kaludercic
2024-01-11 8:06 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 17:35 ` Philip Kaludercic
2024-01-11 17:58 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 19:24 ` Philip Kaludercic [this message]
2024-01-11 20:11 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 20:24 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 20:43 ` Philip Kaludercic
2024-01-11 21:01 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 16:29 ` Philip Kaludercic
2024-01-12 18:05 ` Eli Zaretskii
2024-01-12 18:17 ` Philip Kaludercic
2024-01-12 18:29 ` Eli Zaretskii
2024-01-12 18:40 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 20:05 ` Eli Zaretskii
2024-01-12 22:27 ` Philip Kaludercic
2024-01-13 6:44 ` Eli Zaretskii
2024-01-13 12:23 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-18 19:51 ` Philip Kaludercic
2024-01-18 20:17 ` Eli Zaretskii
2024-01-18 20:33 ` Stefan Kangas
2024-01-19 6:40 ` Eli Zaretskii
2024-01-19 6:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-18 20:35 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-19 6:43 ` Eli Zaretskii
2024-01-19 6:57 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-19 16:44 ` Philip Kaludercic
2024-01-19 18:50 ` Eli Zaretskii
2024-01-24 6:23 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-26 7:58 ` Philip Kaludercic
2024-01-26 10:42 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-26 12:35 ` Eli Zaretskii
2024-02-01 15:53 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-02 8:11 ` Philip Kaludercic
2024-02-02 12:36 ` Eli Zaretskii
2024-02-06 19:10 ` Philip Kaludercic
2024-02-06 19:37 ` Eli Zaretskii
2024-02-06 19:59 ` Philip Kaludercic
2024-02-07 17:15 ` Philip Kaludercic
2024-02-07 17:31 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-07 17:43 ` Eli Zaretskii
2024-02-08 7:40 ` Philip Kaludercic
2024-02-08 8:21 ` Eli Zaretskii
2024-02-08 10:47 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-10 16:29 ` Philip Kaludercic
2024-02-10 16:36 ` Eli Zaretskii
2024-02-10 16:46 ` Philip Kaludercic
2024-02-10 17:20 ` Eli Zaretskii
2024-02-10 17:40 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-10 17:47 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-10 18:03 ` Eli Zaretskii
2024-02-10 18:00 ` Eli Zaretskii
2024-02-10 18:14 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-10 19:12 ` Eli Zaretskii
2024-02-11 21:52 ` Philip Kaludercic
2024-01-18 20:47 ` Philip Kaludercic
2024-01-19 6:47 ` Eli Zaretskii
2024-01-18 20:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-18 20:41 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-18 23:34 ` Stefan Kangas
2024-01-19 5:49 ` Philip Kaludercic
2024-01-19 6:42 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 8:10 ` Eli Zaretskii
2024-01-11 20:24 ` Philip Kaludercic
2024-01-11 20:40 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 7:32 ` Eli Zaretskii
2024-01-12 7:38 ` Philip Kaludercic
2024-01-12 11:54 ` Eli Zaretskii
2024-01-11 10:32 ` Eli Zaretskii
2024-01-11 19:35 ` Stefan Kangas
2024-01-11 20:07 ` Philip Kaludercic
2024-01-12 7:12 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edenptba.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=66554@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mail@daniel-mendler.de \
--cc=monnier@iro.umontreal.ca \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).