From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2INwAXf1XWMVVAEAbAwnHQ (envelope-from ) for ; Sun, 30 Oct 2022 04:54:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EPo/AXf1XWMjqQAAauVa8A (envelope-from ) for ; Sun, 30 Oct 2022 04:54:31 +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 5A94F3840A for ; Sun, 30 Oct 2022 04:54:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oozO5-0008M7-GN; Sat, 29 Oct 2022 23:53:29 -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 1oozO3-0008J5-I2 for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 23:53:27 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oozO1-0008Ra-A3 for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 23:53:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D35D8240027 for ; Sun, 30 Oct 2022 04:53:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667102002; bh=3iHYCRbmeMxZNS5BrwMkhIg3Sk3d39QPrxLMgKfXnbI=; h=From:To:Cc:Subject:Date:From; b=RM5j+LlIkcGRltqdCHmtRXRSdLeRSfP+uFaJLiVahhZlOlT+xT8ph3ISOwW7kC2Wv o5lf4t5GU32lTe/Yu9tOTeWXswfqLxDY2tLzaxc1gpRPQyhx+1Qr3TarB//YHT4XIv uL3Y8YzU3rJn91tubYPlHQ3ATP8RVeEBexTugvpCsyH+m6tStqDM+CSrCGdARVAYUd J2GBgid6nIylPP6Y6IiFE28dNMnp89BHCc+SqIFxezjpWHXw7hQNZDIXbMpxkgthwm eet0yFpUDOoM0llGQ3CUhtNurXh4CiGEMtiXh+mG4rucndUVkHo/TC8Xm+ctCnl5dn 6XP9t9rHu6XIg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N0Mns3Bbxz6tmP; Sun, 30 Oct 2022 04:53:21 +0100 (CET) From: Ihor Radchenko To: Uwe Brauer Cc: emacs-orgmode@gnu.org Subject: Re: org table proposal: merge and split cells in org-tables In-Reply-To: <877d0ia7vd.fsf@mat.ucm.es> References: <877d0ia7vd.fsf@mat.ucm.es> Date: Sun, 30 Oct 2022 03:54:05 +0000 Message-ID: <878rkyarvm.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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=1667102070; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+q5RK4iv6sP6Cz/NGcdaoOXux9NBiDu5nV0lxbJ5KAg=; b=CgkZRql8f7pn7BjglP8SH7ZjIpX60YK5ZJP82kqCkcEXLB72xM09fYsy3cjJedDQ9VBRyh /xCgA8DI8V8drn8/iLDgIwHC73PlavsXnW+llgjG4WiLaNUgVgy5uSNPuMYayqmKpWCgPK N2tiDhUIOgSZkIh7o7oaac1wWjLruiRwCy9WFVl4LqbFpTJepLgbc+3TJVNWwkGxQ7hoC4 fbguL2BFoRdCeX8S7NQ7XVdTWPHWZPyUkdalEW5Z4TYm5R3tA9IqVDIKMTUAD+G7a5VsV0 qVOIwJm8QCP2dDIqFdQ1NlkzGZJ9RjTxMTADQGHz0ATxaYww6JC3sN1n9q0pyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667102070; a=rsa-sha256; cv=none; b=QOBq9Xg3jLf+yXWMFhfuSaZOfW4rZxpCS+uxtH3Dp4mfIRQvhiCiCI8BmfkTqn7a4fCSFS z/1CX6bsSvLKLVxCNe6MIT9rDA5/mPgh8xGXNzXIf94oyUqqzgO0E95p24rJmgkTU9GHr6 lEHSJ4+DdYtaqfu+lm5w5RcwG5ekSR7Piq7VKX8hnNOmpYTxcFS12Q/HLiXYnOAgJRpee+ YHJn3apnvnq4/E/2iIveH/oXjW2U3BvIcXLw7DwIhU94vTutGXzBwCXTH6jbUZsFqFo0s6 K4l7/358xaAEagl/0yYwuC9apmlBmDi+nabzUSz2jlmascqhiwbUdp20QDm1WQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RM5j+LlI; dmarc=pass (policy=none) header.from=posteo.net; 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: -9.24 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=RM5j+LlI; dmarc=pass (policy=none) header.from=posteo.net; 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: 5A94F3840A X-Spam-Score: -9.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: rUbPIdmyfHgU Uwe Brauer 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 > 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 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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at