unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Elisp Reference Manual on inserting tables
Date: Mon, 07 Nov 2022 07:32:35 +0000	[thread overview]
Message-ID: <LqxRzgjLlEK0QZZSCxp9ungBzhO7SITdVGIm4gHog2-cLGPiI2j7i2ixEvwMkblrVIAzZYgH8UjaokruNazwVrebzaoGs75Sd5ZvtKAkhHs=@protonmail.com> (raw)
In-Reply-To: <87r0yfbyhj.fsf@web.de>


------- Original Message -------
On Sunday, November 6th, 2022 at 8:48 PM, Michael Heerdegen <michael_heerdegen@web.de> wrote:


> Heime heimeborgia@protonmail.com writes:
> 
> > 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?
> 
> 
> 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 

'(("A" "xxxxx" "xxxxx" "xxxxx")
  ("B" "xxxxx" "xxxxx" "")
  ("C" "xxxxx" "xxxxx" "")
  ("D" "xxxxx" "" "")
  ("E" "" "" "")))







  parent reply	other threads:[~2022-11-07  7:32 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 16:04 Elisp Reference Manual on inserting tables Christopher Dimech
2022-11-04 16:39 ` Eric S Fraga
2022-11-04 17:07   ` Christopher Dimech
2022-11-05 12:57     ` Fraga, Eric
2022-11-06  4:18       ` Heime
2022-11-06 20:48         ` Michael Heerdegen
2022-11-07  6:23           ` Jean Louis
2022-11-07 16:05             ` Michael Heerdegen
2022-11-07 16:49               ` Emanuel Berg
2022-11-08 15:57                 ` Michael Heerdegen
2022-11-07  7:24           ` Heime
2022-11-07 12:32             ` Emanuel Berg
2022-11-07 13:53               ` Heime
2022-11-07  7:32           ` Heime [this message]
2022-11-07 18:02             ` Michael Heerdegen
2022-11-07 18:07               ` Heime
2022-11-07 18:10               ` Heime
2022-11-07 21:12                 ` Michael Heerdegen
2022-11-08  4:09                   ` Heime
2022-11-08  4:12                     ` Emanuel Berg
2022-11-08 16:06                       ` Heime
2022-11-08 20:38                         ` Jean Louis
2022-11-09  0:49                         ` Emanuel Berg
2022-11-08 22:49                     ` Michael Heerdegen
2022-11-04 20:26   ` Heime
2022-11-04 16:43 ` Akib Azmain Turja
2022-11-05 19:37   ` Emanuel Berg
2022-11-06  6:48   ` Jean Louis
2022-11-06  8:31     ` Heime
2022-11-06  9:48       ` Jean Louis
2022-11-06 10:12         ` Heime
2022-11-06 12:26           ` Jean Louis
2022-11-06 12:54             ` Heime
2022-11-06 13:01               ` Emanuel Berg
2022-11-06 14:48                 ` Heime
2022-11-06 15:20                   ` Emanuel Berg
2022-11-07  5:38                   ` Jean Louis
2022-11-07  7:05                     ` Heime
2022-11-07  7:35                       ` Jean Louis
2022-11-07  5:37               ` Jean Louis
2022-11-08  6:39       ` rcd-box.el for box drawings and tables Jean Louis
2022-11-08  7:58         ` Heime
2022-11-08 12:29           ` Jean Louis
2022-11-08 15:29             ` Heime
2022-11-08 20:31               ` Jean Louis
2022-11-08 15:42           ` Jude DaShiell
2022-11-08 20:33             ` Jean Louis
2022-11-09  3:34               ` Jude DaShiell
2022-11-09  4:03                 ` Jean Louis
2022-11-09  4:28                   ` Emanuel Berg
2022-11-10  6:07                     ` Jean Louis
2022-11-10 18:22                       ` Emanuel Berg
2022-11-11 22:28                         ` [External] : " Drew Adams
2022-11-08  9:49         ` Emanuel Berg
2022-11-08 11:54           ` Jean Louis
2022-11-09  0:52             ` Emanuel Berg
2022-11-09 15:48               ` Jude DaShiell
2022-11-10 13:02                 ` Jean Louis
2022-11-10 13:13                   ` Jude DaShiell
2022-11-10 14:13                     ` Jean Louis
2022-11-09 15:49               ` Jude DaShiell
2022-11-09 16:03                 ` Emanuel Berg

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='LqxRzgjLlEK0QZZSCxp9ungBzhO7SITdVGIm4gHog2-cLGPiI2j7i2ixEvwMkblrVIAzZYgH8UjaokruNazwVrebzaoGs75Sd5ZvtKAkhHs=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).