From: Visuwesh <visuweshm@gmail.com>
To: Ag Ibragimov <agzam.ibragimov@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: ASCII Tables with row and colspans
Date: Thu, 19 Oct 2023 12:16:00 +0530 [thread overview]
Message-ID: <87a5sf5cuv.fsf@gmail.com> (raw)
In-Reply-To: <m2o7h3a6wr.fsf@gmail.com> (Ag Ibragimov's message of "Thu, 12 Oct 2023 16:05:08 -0500")
[வியாழன் அக்டோபர் 12, 2023] Ag Ibragimov wrote:
> I've driven myself into a self-imposed headache. I need to render an HTML table (Elisp representation of it, result of libxml-parse) in ASCII. Org-mode tables are notorious for their lack of support for spanned columns or rows. Yay, table.el can do it, it's nice for inserting a table and modifying the content interactively. However, it's not really suitable for filling out a table programmatically. There's a `table-insert-sequence` command in table.el that allows you to insert text into a selected cell while automatically adjusting the table, but it's agonizingly slow to call as a function. Sadly, table.el doesn't seem to have a function that could "adjust the table" the way how `org-ctrl-c-ctrl-c` does in org-mode (which, again, doesn't support spans).
>
I am not sure how far this can go but perhaps you can use shr.el to
render the table with a monospace font (seems to be necessary) with the
table character changed appropriately. However, as shr inserts space
character with appropriately calculated space display properties, you
need to end up doing post processing to change the display properties
into actual space characters.
next prev parent reply other threads:[~2023-10-19 6:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 21:05 ASCII Tables with row and colspans Ag Ibragimov
2023-10-13 12:02 ` Ihor Radchenko
2023-10-19 2:13 ` Ag Ibragimov
2023-10-19 3:21 ` Emanuel Berg
2023-10-19 6:46 ` Visuwesh [this message]
2023-11-03 10:20 ` Jean Louis
2023-11-03 16:09 ` Emanuel Berg
2023-11-03 19:12 ` [External] : " Drew Adams
2023-11-03 19:27 ` Emanuel Berg
2023-11-04 15:17 ` Eric S Fraga
2023-11-05 15:53 ` Emanuel Berg
2023-11-08 6:13 ` Jean Louis
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=87a5sf5cuv.fsf@gmail.com \
--to=visuweshm@gmail.com \
--cc=agzam.ibragimov@gmail.com \
--cc=emacs-devel@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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).