From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#33309: Add flatten-list? Date: Wed, 07 Nov 2018 15:19:59 -0600 Message-ID: <87pnvg7fgg.fsf@gmail.com> References: <87r2fw7jsa.fsf@gmail.com> <058f4a0f-7ce4-49c4-ae54-0bc259bd82d1@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1541625546 2357 195.159.176.226 (7 Nov 2018 21:19:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2018 21:19:06 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: 33309@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 07 22:19:01 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKVE4-0000TT-Q9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Nov 2018 22:19:01 +0100 Original-Received: from localhost ([::1]:51206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKVGB-0005O0-DF for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Nov 2018 16:21:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKVG5-0005Nr-Kz for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 16:21:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKVG2-0001BW-Ge for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 16:21:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKVG2-0001BJ-Bf for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 16:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gKVG2-0004ba-66 for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 16:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Nov 2018 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33309 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33309-submit@debbugs.gnu.org id=B33309.154162560917620 (code B ref 33309); Wed, 07 Nov 2018 21:21:02 +0000 Original-Received: (at 33309) by debbugs.gnu.org; 7 Nov 2018 21:20:09 +0000 Original-Received: from localhost ([127.0.0.1]:39970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKVFA-0004a8-Tc for submit@debbugs.gnu.org; Wed, 07 Nov 2018 16:20:09 -0500 Original-Received: from mail-ot1-f52.google.com ([209.85.210.52]:32797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKVF9-0004Zq-TP for 33309@debbugs.gnu.org; Wed, 07 Nov 2018 16:20:08 -0500 Original-Received: by mail-ot1-f52.google.com with SMTP id q1so16214757otk.0 for <33309@debbugs.gnu.org>; Wed, 07 Nov 2018 13:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=6Yivrf1MuGd4taDl0/GoEHwO4PVA4HL9iMOSuLet/QM=; b=loRqXDtCdD1O3CJ51x+n/eB9CFoSqqHfpRc4ahioSxKtFGaz+c72frf11LC1P56IGJ LxeEdxNVmQnRvu2Zf2oKvT9tGCJiytZKsMGMI8pNdGCer14jh7VD4KGwsKL7ul/ElBp4 mbp7LmDsvBtOmprDqephJ8AE1N1dSO2wnjHcXQaXe9b38O9ZYQfRCJ4u5LLP/B00vHzs p+ob3PXT8Gzkh+r/2UkQobT3aQqQF4Pt2wLd1DLyj522WwNYLjG5pCOaa/l5zz23mZx+ c2kDOh+2zUc7UoNk3Au4tje1+SQbo29aE+w8UEqMwQKEsK4J5qzke6ZrFoi/f2ye1G3S TZ+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=6Yivrf1MuGd4taDl0/GoEHwO4PVA4HL9iMOSuLet/QM=; b=A4I9jQSRZQis1Esow+/ZKzUos4VahOv5o8hHFE5jXhpHEx0JUKpLY+XCL027I7qggL wLHsfjXKjOQ54um/u2C18vm5UJAft1TmpxtCM5e/4iCVtxXkGOwpHFTxbP7TCbqwNqZg SUPQj0vBvry3RFDcLIMWGPgnzypLhaidvaYtgL4UJj3qMC6nKUY0ns9IXLyNMWvdEeOY ktxn8C3gH967idiI+8U+9S2HzFFJ9S8QxVjXuRoVbIUiMwB2s79Og9+/Z7j8bUCjFIMe IDlwcJzYhcBavam8JAa6RLtOlcKqAvbUSv+2PyicSSZ5O15N5bfHlMutAJVTyhFJGD8e +EcA== X-Gm-Message-State: AGRZ1gIOrloE6DfT6Ml2ZdaCm6W8kOHSojX0yN+VtvNzh+qdhtJlDpsZ /lpV7BOqdQ6wV5G3vCvms5+A3QTM X-Google-Smtp-Source: AJdET5d0Kols23nKWFOcS2LdW99HFXWvNTrIQULJvdxYmv2Au0LT9ovHIQXRRW8tnRMD1dXGPWvWnw== X-Received: by 2002:a9d:5749:: with SMTP id x9mr1132861oti.190.1541625601765; Wed, 07 Nov 2018 13:20:01 -0800 (PST) Original-Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id j3sm675894ote.16.2018.11.07.13.20.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Nov 2018 13:20:00 -0800 (PST) In-reply-to: <058f4a0f-7ce4-49c4-ae54-0bc259bd82d1@default> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152135 Archived-At: --=-=-= Content-Type: text/plain On Wed 07 Nov 2018 at 14:36, Drew Adams wrote: > FWIW, I don't think Emacs Lisp needs a flatten > function. > > 1. Even Common Lisp doesn't bother with one. > (And there are lots of Common Lisp > functions I'd sooner see added to Emacs.) > > 2. It's trivial to define when needed, and > there are not a lot of existing uses of it. Like I said, there's at least four implementations in Emacs of the same thing, and who knows how many in 3rd-party packages in ELPA or elsewhere. I'm not sure what you consider "a lot," but DRY kicks in around three times for me. > 3. The functions you mention do not all behave > the same. Even their arg lists are not the > same. (But sure, they could all be made to > use a common version, if that were important.) > > 4. (flatten-list 42) => (42) > > The doc string says nothing about the case > where the argument LIST (a bad name here) > is not a list. And if the arg need not be > a list then "-list" in the function name > is not good. Right, I didn't mean to imply that the one I sent be added in its current state. I just meant to kick off discussion. I basically copy/pasted it from somewhere (lpr, I think?). If added it'll need to be properly documented and perhaps message-flatten-list and the others made obsolete aliases. Thanks, Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlvjVv8ACgkQHkInolPp mscb4wf/cY9FokM66oPHllooK+NVvFHudpa1tDlx/JmPOt3d0PpawXDT4Ttye9xI zKyliCZOZ70haVTtLCsizIAJVpIr5/QmFSBgvnsRmeL3tofrUfS3LDtzS7+PD2Tu 9TUZ4Gfnm66cD2T14oVMObJ2Zl8IwaQvfhxPAVgXqOaT5fBwA2YpMMGNzHHpXRO2 ghxhtVrq/hY/qYsu7Cco1Fl/GkHLgxXVWJ9/PEv2QxoID7rA8tp89x459vzZfBrV 8iAgMt6G6YwhKK/Z045upw6NaNTMGunoBReSBDwyRRFJs9zP0xa7Oo/WCpFUqRY7 UK+CcjE7e0CsaqlISpdvG7otYiYdKQ== =HQTA -----END PGP SIGNATURE----- --=-=-=--