emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ASCII Tables with row and colspans


From: Visuwesh
Subject: Re: ASCII Tables with row and colspans
Date: Thu, 19 Oct 2023 12:16:00 +0530
User-agent: Gnus/5.13 (Gnus v5.13)

[வியாழன் அக்டோபர் 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]