all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: larsi@gnus.org, jonas@bernoul.li, 59328@debbugs.gnu.org
Subject: bug#59328: 29.0.50; `seq-keep' implementation only valid for lists
Date: Thu, 24 Nov 2022 19:02:04 +0200	[thread overview]
Message-ID: <838rk0wak3.fsf@gnu.org> (raw)
In-Reply-To: <877czktlvr.fsf@web.de> (message from Michael Heerdegen on Thu, 24 Nov 2022 16:25:44 +0100)

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: 59328@debbugs.gnu.org,  larsi@gnus.org,  jonas@bernoul.li
> Date: Thu, 24 Nov 2022 16:25:44 +0100
> 
> Eli Zaretskii <eliz@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.





  reply	other threads:[~2022-11-24 17:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17  2:17 bug#59328: 29.0.50; `seq-keep' implementation only valid for lists Michael Heerdegen
2022-11-19 13:12 ` Eli Zaretskii
2022-11-24 13:04   ` Michael Heerdegen
2022-11-24 14:19     ` Eli Zaretskii
2022-11-24 14:26       ` Michael Heerdegen
2022-11-24 15:00         ` Eli Zaretskii
2022-11-24 15:09           ` Michael Heerdegen
2022-11-24 15:15             ` Eli Zaretskii
2022-11-24 15:25               ` Michael Heerdegen
2022-11-24 17:02                 ` Eli Zaretskii [this message]
2022-11-25  9:47                   ` Michael Heerdegen
2022-11-25 11:34                     ` Stefan Kangas
2022-11-25 11:55                     ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838rk0wak3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59328@debbugs.gnu.org \
    --cc=jonas@bernoul.li \
    --cc=larsi@gnus.org \
    --cc=michael_heerdegen@web.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.