From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gJTZEcxjX2OlUAAAbAwnHQ (envelope-from ) for ; Mon, 31 Oct 2022 06:57:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4N3fEcxjX2OeowAA9RJhRA (envelope-from ) for ; Mon, 31 Oct 2022 06:57:32 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CA9B53174E for ; Mon, 31 Oct 2022 06:57:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opNnD-0006ux-U5; Mon, 31 Oct 2022 01:57:03 -0400 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 1opNnC-0006uc-73 for emacs-orgmode@gnu.org; Mon, 31 Oct 2022 01:57:02 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opNn7-0000RQ-Qy for emacs-orgmode@gnu.org; Mon, 31 Oct 2022 01:57:00 -0400 Received: from localhost ([::ffff:197.239.4.235]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000081D92.00000000635F63A7.00004E5A; Sun, 30 Oct 2022 22:56:54 -0700 Date: Mon, 31 Oct 2022 08:56:26 +0300 From: Jean Louis To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: org table proposal: merge and split cells in org-tables Message-ID: Mail-Followup-To: Ihor Radchenko , emacs-orgmode@gnu.org References: <877d0ia7vd.fsf@mat.ucm.es> <87leoxoe75.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <87leoxoe75.fsf@localhost> User-Agent: Mutt/2.2.7+37 (a90f69b) (2022-09-02) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL=0.141, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667195852; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Q6WcqvorrZwH8+tpOU6m+uxMP8NZSj8T5rg7Zno5FM0=; b=ejUTw1+OJs5cW9wEC6Ez7AQD9bU/wmQBriV5bFnw2VEDoObsUsfinD5GFEMGOI35wKiX6W ZRKSMlHRCX+z94SqpJAyHmoFRSqpDNaL8jj5tDhWGBwhMSr29CmFG6j15azlCamTxE66/E k1pDnfPoW5yw1okV8g9mmINh2YDtMSIonAlLFX5P1BkQ6m/rYKuI0KGZekfHgknEVp4UsP KMb7uUotuOC4T5d8/E90fMikLdvzejmmfzIV12rZoBuRbdAbTQGKqjZxCjExAGIz41urJX FPWDHm39F73bNO+17gUg5fo/cHb4jFHYD1fjngx9oZrp/3lCAOPjW0l8VHqp+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667195852; a=rsa-sha256; cv=none; b=evlXamEnfrjRJw9kaqhKHcRe4yc+k9w0iQvCqKjXc58ovlN3Hi970AgE+8x8yjF8IPgqB5 gjLH2L14KrGGLfcCc3ermbIRulxybGCSgP7YDl1iMRxsRP4dWSXFGSJwtV+6QwMKddtvgN AU45+qVf/6kqAQtucz/dVhmwPQpsM6ascDbN5vyhJqW5gOiGvvjl2zDp5CxEg/RlPyYeNC GYXeUuyLtUrjT7ARjYSq5xW7ojVPRSnK4HkJ18F8yIXWL3OSbQSFkFuQqcBM3DOwSK6ekk Ko3kyn584r2T9NOkdWIW8DiFEAvoVjB74JByLa5sG+d9WK58FjStoIOctxVk/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.56 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CA9B53174E X-Spam-Score: -3.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4bWyF+C653Ex * Ihor Radchenko [2022-10-30 12:27]: > Jean Louis writes: > > > To solve that problem personally, I use Asciidoctor, see how it is > > done there: > > > > Example 76. Table with formatted, aligned and merged cells: > > https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#ex-cell-format > > I am sorry, but this looks unreadable. I would avoid re-using such > syntax ideas. You have got an extreme reference on what can be done. Other people and other projects have faced same issues as you are facing in Org mode, and have resolved it. To understand anything one cannot just read simple reference, but better understand the surrounding meanings, the context. Org tables are nothing harder or simpler than tables in other lightweight markup languages. What appears "unreadable" to you is readable to other person. In fact, there is no single char in the extreme example of Asciidoc table below that you can't read. The meaning of "unreadable" is most probably "not understandable". That is why I said, one has to inspect the context and look for definitions. [cols="e,m,^,>s",width="25%"] |=== |1 >s|2 |3 |4 ^|5 2.2+^.^|6 .3+<.>m|7 ^|8 |9 2+>|10nnp |=== In fact, looking into functionality of other lightweigh markup languages may only be helpful for Org development. For [cols="e,m,^p,>s",width="25%"] look here: https://docs.asciidoctor.org/asciidoc/latest/tables/format-column-content/ Thus `e' before first comma, means emphasized (I guess) and in fact on the original demonstration one can see that first column is emphasized. The fact that one may "describe" column's font style in Asciidoc(tor) could be adopted as well in Org mode. `m' after first comma says that text of that column shall be in monospaced font, which I find very useful for table columns. `^' signifies centered column in `[cols="e,m,^,>s",width="25%"]' and `>s' means right centered, bold column; `width=25%' tells about table width. I would like it if Org mode could provide such functionality for tables, to specify various attributes for columns. It does provide, though I am not sure if it can provide so many. And in that extreme example then we have following lines: |=== for begin of the table |1 >s|2 |3 |4 the second `|' has attribute `>s' or complete `>s|' which specifically formats number "2" to be bold and right centered. ^|5 2.2+^.^|6 .3+<.>m|7 It is good to read about span factor: https://docs.asciidoctor.org/asciidoc/latest/tables/span-cells/ 2.2+^.^|6 -- talks about spanning 2 columns, two rows and its alignment. while .3+<.>m|7 talks about spanning 3 rows, that is where number 7 comes. |=== for end of the table It is surely good to try to make visual tables with merged cells as general Org functionality. It is also very useful to look how other people implement various functionalities and try to see if such could be useful in Org as well. But when you don't have the functionality yet, due to the Babel and inclusion of other files, one may achieve the final result by including HTML directly, or by using external tools. Org is integrator of almost anything. Babel and integration of, to the Org external tools, allows user to include almost any value or results from outside the file. I do agree that it is "hard" to understand at once what it is, but it is a solution for reason that Org allows external tools' values to be included in the Org file. In this case it is the HTML output from Asciidoctor. This elaboration is for opening the mind of Org user, it is to understand that extensibility, due to Babel and inclusion of any external tools has no limits at any point of time. One need not wait for that feature X to be implemented in Org, while there is plenty of available options to reach the purpose of feature X. #+BEGIN_SRC shell :results raw echo " [cols=\"e,m,^,>s\",width=\"25%\"] |=== |1 >s|2 |3 |4 ^|5 2.2+^.^|6 .3+<.>m|7 ^|8 |9 2+>|10nnp |=== " | asciidoctor -e -o - - #+END_SRC #+RESULTS:

1

2

3

4

5

6

7

8

9

10nnp

-- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/