From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Elisp Reference Manual on inserting tables Date: Tue, 08 Nov 2022 04:09:33 +0000 Message-ID: References: <87iljuishm.fsf@ucl.ac.uk> <87v8nth846.fsf@ucl.ac.uk> <6Z6_K1-F06LaCcWUNoIbXE2j8T1KXL2FCaQ-hNfVFK6TfqUFTZPVJIdJR2pn_MlmjA-eSlg1Hzcl-t2WhXmzKztKLhvVn2iY_PP9JWaCVe4=@protonmail.com> <87r0yfbyhj.fsf@web.de> <87k046lk1w.fsf@web.de> <878rkmlb9s.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 08 05:10:16 2022 Return-path: Envelope-to: geh-help-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 1osFwG-000A5E-Bs for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Nov 2022 05:10:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osFvi-000568-MK; Mon, 07 Nov 2022 23:09:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osFvg-00051u-SV for help-gnu-emacs@gnu.org; Mon, 07 Nov 2022 23:09:40 -0500 Original-Received: from mail-40138.protonmail.ch ([185.70.40.138]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osFve-00073x-Uy for help-gnu-emacs@gnu.org; Mon, 07 Nov 2022 23:09:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667880576; x=1668139776; bh=4i6fmdE6cXXl+7fLwr+5BNOKDAM3liJpDq9Mon2u8eE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=P+HlBxbpPVcIMZL0NZUw3dolGPRB2x12Y1Q0v7P8UmV0Offbom+cZefHhqH2+lVKe 2WooWh/LXzVnqog6Uw3JLwc6nhvSyGoAmtzccdBLj7kLLgzuv5uLGlGsmRFhawFNjq FML2I0wDx++2v3S8ayF6B3c400R0c5DPtGOPljJtwg8+mpu+KlV4JXrchOvbpmeK9f zaMbS5mbI4qbYJMYC08RndabkL1USnQcu1jpZ4gwJu7AkhV41sopebBgs732/aRB4d f0OGsmFop7kHsgL98rl6NgXtbPWpgj/iEsbFBYGvksuW9rwugQfsOhT39m0B5VcrHz GkvszQ/PGas2w== In-Reply-To: <878rkmlb9s.fsf@web.de> Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.138; envelope-from=heimeborgia@protonmail.com; helo=mail-40138.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140804 Archived-At: ------- Original Message ------- On Monday, November 7th, 2022 at 9:12 PM, Michael Heerdegen wrote: > Heime heimeborgia@protonmail.com writes: >=20 > > > `cl-mapcar' allows to map over multiple sequences. Alternatively use = nested` mapcar' calls. > >=20 > > There is also the possibility of using mapcar* >=20 >=20 > That's only the old, now obsolete, name of `cl-mapcar'. >=20 > Michael. Have been focusing on this implementation. But I have to gen rid of the=20 split-string part in mapconcat. Have found that I can use seq-mapn to=20 iterate over two sequences simultaneously. Then use mapconcat to make the= =20 string, and use y (from the selectr sequence) as a counter in the function argument. There exists the convenient "prog1" that makes it possible to=20 lower the counter after the "if" form, but return the value of the "if"=20 form (the first function in the prog1 body). (chart-struct '("Peter" "Paul") [3 2]) (defun chart-struct (descr selectr) "TODO." (seq-mapn (lambda (x y) (list x (mapconcat =09=09 (lambda (s) =09=09 (prog1 =09=09=09(if (> y 0) (append (make-list y "xxxxx"))) (setq y (1- y)))) =09=09 (split-string "|||" "" t)) (append (make-list y "")))) descr selectr))