From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.bugs Subject: bug#58278: Add new function seq-keep Date: Mon, 03 Oct 2022 23:30:13 +0200 Message-ID: <87y1twtx22.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6957"; mail-complaints-to="usenet@ciao.gmane.io" To: 58278@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 04 00:07:34 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ofTb4-0001c2-92 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Oct 2022 00:07:34 +0200 Original-Received: from localhost ([::1]:42060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofTb3-00048D-3h for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Oct 2022 18:07:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofT1k-0007cA-5I for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2022 17:31:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofT1j-00061a-1y for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2022 17:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ofT1i-0004NK-MP for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2022 17:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Oct 2022 21:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58278 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166483262816772 (code B ref -1); Mon, 03 Oct 2022 21:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Oct 2022 21:30:28 +0000 Original-Received: from localhost ([127.0.0.1]:51823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ofT1A-0004MR-00 for submit@debbugs.gnu.org; Mon, 03 Oct 2022 17:30:28 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:59756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ofT18-0004MF-0a for submit@debbugs.gnu.org; Mon, 03 Oct 2022 17:30:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofT17-0006oZ-K7 for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2022 17:30:25 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]:46498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofT0z-0005pw-Vi for bug-gnu-emacs@gnu.org; Mon, 03 Oct 2022 17:30:23 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id A1C2116586 for ; Mon, 3 Oct 2022 23:30:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :subject:subject:from:from:received:received; s=sel2011a; t= 1664832613; bh=SC27abI5fW/XckMwRK1NiyrhiJ7/5kVEJ1xzCprwYIc=; b=X I9K+zrZ7uoPC+E+BolWvmWVkh/+8rmI/86ATuCvIDl2MJQE5866aSGzngB3pQMNc f3UH3bLPBLRBq/RZJ/7BOrAYrSoXzGX1qmOt26QQaq7Ti3jknRYiKpY4vjrsNdli dYyCPlGW+50GCP5PcUw831OWu4S2qkzvgcK2FvOLZk= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id tbUb8xIAv3co for ; Mon, 3 Oct 2022 23:30:13 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 76FE4165FF for ; Mon, 3 Oct 2022 23:30:13 +0200 (CEST) Received-SPF: none client-ip=212.243.197.30; envelope-from=jonas@bernoul.li; helo=mail.hostpark.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244336 Archived-At: While I still appreciate the `dash' package, I try to avoid it in a package when all or most of its used `dash' functions and macros, can be replaced with equivalent functions/macros from `seq', `cl-lib' or other parts of Emacs. Unfortunately I cannot find a replacement for `-keep', which I have been using a lot. I propose that we add something like: (cl-defgeneric seq-keep (pred sequence) "Return a list of all non-nil results of (PRED element) for elements in SEQUENCE." (delq nil (seq-map (lambda (elt) (funcall pred elt)) sequence))) Cheers, Jonas