unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Does seq.el need to work with older Emacs versions?
@ 2022-09-03 10:14 Mattias Engdegård
  2022-09-03 10:17 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Mattias Engdegård @ 2022-09-03 10:14 UTC (permalink / raw)
  To: emacs-devel

Please remind me: does lisp/emacs-lisp/seq.el need to work with older Emacs versions and if so which ones?




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does seq.el need to work with older Emacs versions?
  2022-09-03 10:14 Does seq.el need to work with older Emacs versions? Mattias Engdegård
@ 2022-09-03 10:17 ` Eli Zaretskii
  2022-09-03 10:31   ` Philip Kaludercic
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-09-03 10:17 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: emacs-devel

> From: Mattias Engdegård <mattiase@acm.org>
> Date: Sat, 3 Sep 2022 12:14:16 +0200
> 
> Please remind me: does lisp/emacs-lisp/seq.el need to work with older Emacs versions and if so which ones?

Only if it's on ELPA, AFAIU.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does seq.el need to work with older Emacs versions?
  2022-09-03 10:17 ` Eli Zaretskii
@ 2022-09-03 10:31   ` Philip Kaludercic
  2022-09-03 14:24     ` Mattias Engdegård
  2022-09-03 15:01     ` Stefan Kangas
  0 siblings, 2 replies; 6+ messages in thread
From: Philip Kaludercic @ 2022-09-03 10:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Mattias Engdegård, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Mattias Engdegård <mattiase@acm.org>
>> Date: Sat, 3 Sep 2022 12:14:16 +0200
>> 
>> Please remind me: does lisp/emacs-lisp/seq.el need to work with older Emacs versions and if so which ones?
>
> Only if it's on ELPA, AFAIU.

ELPA's seq currently only consists of the following

--8<---------------cut here---------------start------------->8---
(if (version< emacs-version "25")
    (require 'seq-24)
  (require 'seq-25))
--8<---------------cut here---------------end--------------->8---

where seq-24.el is a compatibility version, while seq-25.el appears to
be the same as lisp/emacs-lisp/seq.el (or at least the version from a
year ago).  What I guess this means is that lisp/emacs-lisp/seq.el
should preserve compatibility up until Emacs 25, unless another
backport version should be added to the ELPA package.

Out of curiosity, what are you looking to change that might break older
versions of Emacs?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does seq.el need to work with older Emacs versions?
  2022-09-03 10:31   ` Philip Kaludercic
@ 2022-09-03 14:24     ` Mattias Engdegård
  2022-09-03 15:01     ` Stefan Kangas
  1 sibling, 0 replies; 6+ messages in thread
From: Mattias Engdegård @ 2022-09-03 14:24 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Eli Zaretskii, emacs-devel

3 sep. 2022 kl. 12.31 skrev Philip Kaludercic <philipk@posteo.net>:

> Out of curiosity, what are you looking to change that might break older
> versions of Emacs?

Only simplification of some unnecessarily guarded code in the implementation (fboundp checks) but I'd like to make sure that it's safe to do so.
Since ELPA's seq appears to be maintained in separate files and does not copy seq.el from the Emacs tree directly this appears to be the case but it's nice to have it confirmed.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does seq.el need to work with older Emacs versions?
  2022-09-03 10:31   ` Philip Kaludercic
  2022-09-03 14:24     ` Mattias Engdegård
@ 2022-09-03 15:01     ` Stefan Kangas
  2022-09-03 16:00       ` Mattias Engdegård
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2022-09-03 15:01 UTC (permalink / raw)
  To: Philip Kaludercic, Eli Zaretskii; +Cc: Mattias Engdegård, emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> ELPA's seq currently only consists of the following
>
> --8<---------------cut here---------------start------------->8---
> (if (version< emacs-version "25")
>     (require 'seq-24)
>   (require 'seq-25))
> --8<---------------cut here---------------end--------------->8---
>
> where seq-24.el is a compatibility version, while seq-25.el appears to
> be the same as lisp/emacs-lisp/seq.el (or at least the version from a
> year ago).  What I guess this means is that lisp/emacs-lisp/seq.el
> should preserve compatibility up until Emacs 25, unless another
> backport version should be added to the ELPA package.

Unlike other core packages, seq.el is manually merged to GNU ELPA.  So
we can be flexible when we decide how to go about it.

Before breaking backwards compatibility with Emacs 25, perhaps it would
be a good idea to update seq-25.el on GNU ELPA to match what we
currently have on master.

We could then always,

    (if (version< emacs-version "29") ; or something
        (require 'seq-25)
      (require 'seq-29))

or even,

    (cond ((version< emacs-version "25") (require seq-24))
          ((version< emacs-version "29") (require seq-25))
          (t (require seq-29)))

And then update "Package-Requires" accordingly.

As for going forward, I guess it is somewhat nice to maintain backwards
compatibility.  But I don't know if it's worth doing indefinitely.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Does seq.el need to work with older Emacs versions?
  2022-09-03 15:01     ` Stefan Kangas
@ 2022-09-03 16:00       ` Mattias Engdegård
  0 siblings, 0 replies; 6+ messages in thread
From: Mattias Engdegård @ 2022-09-03 16:00 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Philip Kaludercic, Eli Zaretskii, emacs-devel

3 sep. 2022 kl. 17.01 skrev Stefan Kangas <stefankangas@gmail.com>:

> Before breaking backwards compatibility with Emacs 25, perhaps it would
> be a good idea to update seq-25.el on GNU ELPA to match what we
> currently have on master.

A bit late for that and I'm to blame: apparently I made one change (adding calls to `take`) carefully preserving compatibility and another blatantly ignoring it so now I'm doubling down and cutting the fat I could find. Sorry if I'm causing you extra trouble.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-03 16:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-03 10:14 Does seq.el need to work with older Emacs versions? Mattias Engdegård
2022-09-03 10:17 ` Eli Zaretskii
2022-09-03 10:31   ` Philip Kaludercic
2022-09-03 14:24     ` Mattias Engdegård
2022-09-03 15:01     ` Stefan Kangas
2022-09-03 16:00       ` Mattias Engdegård

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).