unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Heime <heimeborgia@protonmail.com>
Cc: Akib Azmain Turja <akib@disroot.org>,
	Christopher Dimech <dimech@gmx.com>,
	Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: rcd-box.el for box drawings and tables
Date: Tue, 8 Nov 2022 09:39:32 +0300	[thread overview]
Message-ID: <Y2n5pC2I6sC0I1l2@protected.localdomain> (raw)
In-Reply-To: <nzj8UX8oMeRyXVQyMiwbuA1OETVUao28FFLJcoW05ebIOWS69lySOoOVBOggv4bZ06GMhbvzdn0qdURQfE58QvWx_SzCrm72vQkuRqM1y3o=@protonmail.com>

Here is my attempt to generate Unicode tables:
https://hyperscope.link/7/3/9/8/1/Emacs-Lisp-rcd-box-el-package-for-table-drawings-73981.html

(rcd-box-table '(("Transport to Makindye" 1 20.00)
		 ("Mobile charges" 1 2000))
	       '("Description" "Quantity" "Subtotal")
	       '("left" "center" "right")) ⇒ "
╔═══════════════════════╦═══════════════════════╦═══════════════════════╗
║ Description           ║       Quantity        ║              Subtotal ║
╠═══════════════════════╬═══════════════════════╬═══════════════════════╣
║ Transport to Makindye ║           1           ║                  20.0 ║
╠═══════════════════════╬═══════════════════════╬═══════════════════════╣
║ Mobile charges        ║           1           ║                  2000 ║
╚═══════════════════════╩═══════════════════════╩═══════════════════════╝

"

(rcd-box-table '((1 2 3))) ⇒ "
╔═══╦═══╦═══╗
║ 1 ║ 2 ║ 3 ║
╚═══╩═══╩═══╝

"

(rcd-box-table '((1 2 3 "Hello"))) ⇒ "
╔═══════╦═══════╦═══════╦═══════╗
║ 1     ║ 2     ║ 3     ║ Hello ║
╚═══════╩═══════╩═══════╩═══════╝

"

(rcd-box-table '((1 2 3 "Hello")) nil "center") ⇒ "
╔═══════╦═══════╦═══════╦═══════╗
║   1   ║   2   ║   3   ║ Hello ║
╚═══════╩═══════╩═══════╩═══════╝

"


(rcd-box-table '((1 2 3 "Hello")) nil '("left" "right" "right" "center")) ⇒ "
╔═══════╦═══════╦═══════╦═══════╗
║ 1     ║     2 ║     3 ║ Hello ║
╚═══════╩═══════╩═══════╩═══════╝

"

Major bug is that cell width is currently calculated by the
longest cell length. Later I will calculcate it by column.

I also wish to add the FOOTER option that may include functions
to calculate column values.

(rcd-box-table '(("Good bye for now"))) ⇒ "
╔══════════════════╗
║ Good bye for now ║
╚══════════════════╝

"

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



  parent reply	other threads:[~2022-11-08  6:39 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
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       ` Jean Louis [this message]
2022-11-08  7:58         ` rcd-box.el for box drawings and tables 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=Y2n5pC2I6sC0I1l2@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=akib@disroot.org \
    --cc=dimech@gmx.com \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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).