From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.devel Subject: Re: ASCII Tables with row and colspans Date: Thu, 19 Oct 2023 12:16:00 +0530 Message-ID: <87a5sf5cuv.fsf@gmail.com> References: 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="27625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Ag Ibragimov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 19 08:47:00 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qtMo8-0006vf-Cw for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Oct 2023 08:47:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtMnJ-00067P-IH; Thu, 19 Oct 2023 02:46:09 -0400 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 1qtMnG-0005sM-UG for emacs-devel@gnu.org; Thu, 19 Oct 2023 02:46:07 -0400 Original-Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtMnF-0007wn-5W for emacs-devel@gnu.org; Thu, 19 Oct 2023 02:46:06 -0400 Original-Received: by mail-pg1-x541.google.com with SMTP id 41be03b00d2f7-5892832f8daso349935a12.0 for ; Wed, 18 Oct 2023 23:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697697963; x=1698302763; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r0AGCWjLK7hJtLdUyUXYQJ58J1+O133P3/MiP1z06+U=; b=PZkhqvCjFYOsnEya5xHEsAA+mWuh5KoqSmtCLPzcSxHGso0ZaczRFX+2nARScR690u o9+unExgzg2JaHjfalLI7iB7kPJTJb5ZlJKJu/rxS2NbE/5dVetR3Yc11tYOU2uLe8D7 1rT24fV7SxPeZLIloFGJvKExmt/F/hGQTXPBDfD1S4HjV8vmJM2DibwIFx7KRXgrUfKl 0r7XuPiRcl+HriKlEO/6MYtm+g8/Ze5gTjVfB5Fh/cPfZ6wuc8oAkvQQfFX3oP73IIuo FLRBDiUZCkwZqhBz91ge/y4JMonfZAHDEe/bqoFwLCCGSOZbxTwpXJ668hUwg3+WjeTl sS8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697697963; x=1698302763; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=r0AGCWjLK7hJtLdUyUXYQJ58J1+O133P3/MiP1z06+U=; b=uiTAUhXXfJ+kpoLJH7Mul4V7lSyeoWdLGvUgB+H00GZfrgO/fbd9N1moPfn4WD32np x9xP2TTolGC3xjh+LoCkmv4n18F6r8TKRt9MdF1RI5LTXl+fH1beDa9wHXiLcDwrE1nU i9s5h9PVRPdDpQ7Vxtx3/dNGGuUhzSXRp+6S4ogG+ugSX/yDWJinM45uJYe6AEuhKlNM 0REFA8OdT4gPE9uwXnRVhGYCOwJQnfbH2xUPZpC4KxMIHBEYw0hBn8zFxvhUxTVwqiqE PwQNtWgDuhcMKIeEnRAxEMEtKc2MQtaxg4jpV5fRMKllmt6zRL/sG1V/jr1Misg9Szc+ Hk7g== X-Gm-Message-State: AOJu0YyFHU723BEq3yDV1Z9OCjQviSrKB2ZUnfjs00c+6azyEUPVvT31 GVuQJwWolQtNJVJqe8TH3as= X-Google-Smtp-Source: AGHT+IEZz7zqFayXtee20nYm4UwVCLOte2aRb7fIzyKO7jURjDkwUNQKjG7piDN2mrb0aM7JoGW3ng== X-Received: by 2002:a17:90a:a413:b0:277:68c3:64b9 with SMTP id y19-20020a17090aa41300b0027768c364b9mr1542675pjp.5.1697697962963; Wed, 18 Oct 2023 23:46:02 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id iq13-20020a17090afb4d00b002792b7182dcsm921895pjb.49.2023.10.18.23.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 23:46:02 -0700 (PDT) In-Reply-To: (Ag Ibragimov's message of "Thu, 12 Oct 2023 16:05:08 -0500") Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=visuweshm@gmail.com; helo=mail-pg1-x541.google.com 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311574 Archived-At: [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=85= =E0=AE=95=E0=AF=8D=E0=AE=9F=E0=AF=8B=E0=AE=AA=E0=AE=B0=E0=AF=8D 12, 2023] A= g 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-m= ode tables are notorious for their lack of support for spanned columns or r= ows. 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 o= ut a table programmatically. There's a `table-insert-sequence` command in t= able.el that allows you to insert text into a selected cell while automatic= ally 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 tabl= e" 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.