emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Uwe Brauer <oub@mat.ucm.es>, emacs-orgmode@gnu.org
Subject: Re: org table proposal: merge and split cells in org-tables
Date: Sun, 30 Oct 2022 08:22:07 +0100	[thread overview]
Message-ID: <87v8o17p40.fsf@mat.ucm.es> (raw)
In-Reply-To: 878rkyarvm.fsf@localhost

[-- Attachment #1: Type: text/plain, Size: 3741 bytes --]

>>> "IR" == Ihor Radchenko <yantar92@posteo.net> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> In a conversation with Ihor Radchenko it was considered as being helpful
>> to provide a table in which cells are merged and split.

> We should consider this idea seriously as this and related features are
> being requested frequently in the community. I recall the following
> contexts:

> - Support merging cells when exporting to LaTeX tables
> - Text filling inside tables

I would suggest that filling, might be the point to start, since this
the lack of this feature is one of the inconvenience of org-tables.

I am sometimes running org-table-wrap 
found in 
https://github.com/analyticd/org-table-wrap-functions.git 

It is nice but takes a long long time to finish.


>> Here is one
>> 
>> +--------+-------------------------------------------------+
>> | Region |                      Sales                      |
>> |        +-------------+-----------+-----------+-----------+
>> |        |      Q1     |    Q2     |    Q3     |    Q4     |
>> |        +-------+-----+-----+-----+-----+-----+-----+-----+
>> |        | foo   | bar | foo | bar | foo | bar | foo | bar |
>> +--------+-------+-----+-----+-----+-----+-----+-----+-----+
>> | North  | 350   |  46 | 253 |  34 | 234 |  42 | 382 |  68 |
>> +--------+-------+-----+-----+-----+-----+-----+-----+-----+
>> | South  | 462   |  84 | 511 |  78 | 435 |  45 | 534 |  89 |
>> +--------+-------+-----+-----+-----+-----+-----+-----+-----+

> This essentially suggests supporting table.el syntax natively. Or maybe
> extending it by mixing with native Org tables.

> In terms of syntax, adding cell boundary support might be simply a
> question of allowing +----+ in Org tables. It will not break anything as
> we already parse +-----+ as table.el tables.

> At lower level of org-element representation, we do not need to change
> much either. table-row elements are already not tied to a fixed number
> of cells in every row. And we may extend table-row 'rule type to define
> the "+----+   +   +---+--+" cell boundaries.

> However, in order to support merging cells, one needs to rework Org in a
> number of places. At least:

> 1. org-element parser and interpreter
> 2. org-table.el in its totality
> 3. export backends
> 4. table formulas; in particular, cell references
> 5. update syntax document

Or would leave 4 and 5 out for the moment, since it sounds like a headache
>> Or better

>> ------------------------------------------------------------
>> | Region |                      Sales                      |
>> |        ---------------------------------------------------
>> |        |      Q1     |    Q2     |    Q3     |    Q4     |
>> |        ---------------------------------------------------
>> |        | foo   | bar | foo | bar | foo | bar | foo | bar |
>> ------------------------------------------------------------
>> | North  | 350   |  46 | 253 |  34 | 234 |  42 | 382 |  68 |
>> ------------------------------------------------------------
>> | South  | 462   |  84 | 511 |  78 | 435 |  45 | 534 |  89 |
>> ------------------------------------------------------------

> This will clash with horizontal-rule syntax. Not acceptable. Also,
> parsing this kind of table will be significantly harder programatically.


Ok.


-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

  reply	other threads:[~2022-10-30  7:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29 16:53 org table proposal: merge and split cells in org-tables Uwe Brauer
2022-10-30  3:54 ` Ihor Radchenko
2022-10-30  7:22   ` Uwe Brauer [this message]
2022-10-30  9:13 ` Jean Louis
2022-10-30  9:25   ` Ihor Radchenko
2022-10-31  5:56     ` Jean Louis
2022-10-31  8:50       ` Ihor Radchenko
2022-10-30  9:13 ` Timothy
2022-11-04  7:38 ` Max Nikulin
2022-11-05  5:44   ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2022-10-30  8:23 Mati
2022-10-30  8:35 ` Ihor Radchenko
2022-10-30  8:47   ` Timothy
2022-10-30  8:56     ` Ihor Radchenko
2022-10-30  9:08       ` Timothy

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8o17p40.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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/org-mode.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).