GNU bug report logs - #59328
29.0.50; `seq-keep' implementation only valid for lists

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Thu, 17 Nov 2022 02:19:02 UTC

Severity: wishlist

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, jonas <at> bernoul.li, 59328 <at> debbugs.gnu.org
Subject: bug#59328: 29.0.50; `seq-keep' implementation only valid for lists
Date: Thu, 24 Nov 2022 16:09:32 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> > Every kind of sequence (in the sense of seq.el) that exists in Emacs is
> > not affected by the bug.  A test makes only sense for types that are,
> > but those are defined in libraries that are not in Gnu Emacs, only in
> > Gnu Elpa.  But I can't make the test depend on them.
>
> I see I was confused by the Subject of your bug report.
>
> OK, then just install this, though now I wonder why we need this change...

Without that change `seq-keep' would error for sequence types like
streams.  Try for example

#+begin_src emacs-lisp
(require 'stream)
(seq-keep
 (lambda (x) (and (<= 0 x) x))
 (stream (list -1 2 -3 4)))
#+end_src

That errors without the proposed change but it's a legitimate call (and
it should return a stream of course).

Michael.




This bug report was last modified 125 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.