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: Mon, 07 Nov 2022 07:32:35 +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> 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="8795"; 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 Mon Nov 07 08:33:45 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 1orwdc-00027s-Kk for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 07 Nov 2022 08:33:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orwcw-0004ZB-PH; Mon, 07 Nov 2022 02:33:02 -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 1orwcr-0004Yp-Hg for help-gnu-emacs@gnu.org; Mon, 07 Nov 2022 02:32:57 -0500 Original-Received: from mail-40141.protonmail.ch ([185.70.40.141]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orwcp-0007js-GJ for help-gnu-emacs@gnu.org; Mon, 07 Nov 2022 02:32:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667806367; x=1668065567; bh=d0WNo3H/daQp4DLKXt7/MM85p22HzxUj0Yarv8RoV3c=; 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=keRuY9ndf/+EuVOY0VhuLiWDgvdnVuls+DWuSmzDipSS/dCdYYnJK5cKkcl41EtLD a9ErCj4yK5TXYg7+x2DZE9I08/V19u6XynX5TUmcxuc2cPXIT3HPsdy9wQ3UQT/0Dv fgzjnX6hgAO9bEqeMVQ769q3TqxCVcPTaUQYvr0DxKJVwtbKYoeVY3tPO2M0ULhPWH JooUUtA0TuBpqTXzBUlrLFIz2TSaqtXsv3CX2vPtijPvrg59NrT84yhGuQloj9ttT+ xkg1BKAcIjMkgu2e4nSNJyaSPzRGYiQP/01WS2YXVr7na39dLpiwDLiq8HYHntMi6Q itLylcMyYto3w== In-Reply-To: <87r0yfbyhj.fsf@web.de> Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.141; envelope-from=heimeborgia@protonmail.com; helo=mail-40141.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:140767 Archived-At: ------- Original Message ------- On Sunday, November 6th, 2022 at 8:48 PM, Michael Heerdegen wrote: > Heime heimeborgia@protonmail.com writes: >=20 > > As I was talking about making tables from elisp, I though there should > > be something in the Elisp Manual as well. Or perhaps in the Elisp > > Tutorial? >=20 >=20 > Emacs doesn't have a simple function to format simple text tables > built-in (so there is nothing to document). I wrote my own one some > time ago, maybe it is of help: I have the following function that makes a list of lists, with one list constituting a row. (defun pmchart (descr rekr) "Makes a tabel structure." (mapcar (lambda (n) (append (make-list n "xxxxx") (make-list (- 3 n) ""))) rekr)) The call (pmchart '("A" "B" "C" "D" "E") [3 2 2 1 0]) produces '(("xxxxx" "xxxxx" "xxxxx") ("xxxxx" "xxxxx" "") ("xxxxx" "xxxxx" "") ("xxxxx" "" "") ("" "" ""))) I would like to adapt it to produce=20 '(("A" "xxxxx" "xxxxx" "xxxxx") ("B" "xxxxx" "xxxxx" "") ("C" "xxxxx" "xxxxx" "") ("D" "xxxxx" "" "") ("E" "" "" "")))