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


Message #32 received at 59328 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: larsi <at> gnus.org, jonas <at> bernoul.li, 59328 <at> debbugs.gnu.org
Subject: Re: bug#59328: 29.0.50; `seq-keep' implementation only valid for lists
Date: Thu, 24 Nov 2022 19:02:04 +0200
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: 59328 <at> debbugs.gnu.org,  larsi <at> gnus.org,  jonas <at> bernoul.li
> Date: Thu, 24 Nov 2022 16:25:44 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > > 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
> >
> > Didn't you just say that 'stream' is not in Emacs?  If I try the above, the
> > debugger kicks in right on the 'require' line.
> 
> Yes.
> 
> But seq-keep is not a generic function, so it would be broken for
> sequence types defined elsewhere, and there is no way for those other
> sequence types to fix this.  Defining a generic interface for sequences
> would not make much sense if it then only supports lists (and maybe
> vectors).
> 
> So we want to support cases like streams.

Can tests for this be written in a way that they are only run if the
relevant packages are available on the user's system?  If so, I'd prefer to
have that than no tests at all.

Your call.

Thanks.




This bug report was last modified 124 days ago.

Previous Next


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