emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org table proposal: merge and split cells in org-tables


From: Ihor Radchenko
Subject: Re: org table proposal: merge and split cells in org-tables
Date: Sat, 05 Nov 2022 05:44:59 +0000

Max Nikulin <manikulin@gmail.com> writes:

> I believe that tables in Org are already too complicated due to the 
> spreadsheet feature.

They are, but merging cells is widely demanded. If we can come up with
some reasonable extension of Org syntax, it will be a benefit for the
whole Org community.

> However those who are brave enough to add cells 
> spanning columns and rows may take some inspiration from 
> reStructuredText, in particular horizontal lines marked by "+===+===+"

These are the table.el Emacs tables we already support (partially).
Uwe's proposal is supporting table.el more fully, but it will be
incompatible (if taken as is) with the current Org table syntax.

We can learn from the design, but cannot just blindly re-use it.

> Besides "grid" tables there are "simple" tables without vertical lines.

That's similar to the ASCIIDoctor tables as I read it in the link.
I do not think that it is a good option to move away from the visual
table style employed in Org.

> Perhaps it better to implement new table features as src blocks for some 
> new language and a dedicated Emacs mode. In the case of success such 
> proof of concept may be merged into Org core.

That's what our table.el integration does. But it is not enough.

Some features are only present in native Org tables and some features
are only present in table.el tables. We will end up needing to extend
either of the table syntaxes to obtain full Org table functionality.

Then, it is better to extend native Org tables rather than replacing the
existing table syntax with third party.

> My impression is that Org tables quickly become hardly maintainable when 
> their complexity is above some quite low threshold. E.g. automatic 
> recalculation works only for first #+tblfm: line. It requires some 
> efforts to figure out association of particular formula with cell spans.

I'd say that the problem is mostly with org-table.el which heavily
relies on direct regexp matching. If we generalize things using parser,
it should become easier to maintain even with merge cells.

> Merge cells add more complexity to formula ranges. Some protocol should 
> be defined to allow source blocks to generate extended cells.

Agree. And such protocol will improve maintainability even if
implemented without extended cells. Either way, it is a good idea to
refactor org-table.el

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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