emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org table proposal: merge and split cells in org-tables
Date: Sat, 05 Nov 2022 05:44:59 +0000	[thread overview]
Message-ID: <87fseykl9g.fsf@localhost> (raw)
In-Reply-To: <tk2fhn$biv$1@ciao.gmane.io>

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	other threads:[~2022-11-05  5:46 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
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 [this message]
  -- 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=87fseykl9g.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /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).