From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 gKmWJk4rZmMNQwAAbAwnHQ (envelope-from ) for ; Sat, 05 Nov 2022 10:22:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0GCZJk4rZmNfFwEA9RJhRA (envelope-from ) for ; Sat, 05 Nov 2022 10:22:22 +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 772F4CC5D for ; Sat, 5 Nov 2022 10:22:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orFMQ-0001kt-He; Sat, 05 Nov 2022 05:21:06 -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 1orFMH-0001ie-1t for emacs-orgmode@gnu.org; Sat, 05 Nov 2022 05:21:03 -0400 Received: from mail-40132.protonmail.ch ([185.70.40.132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orFME-0000y8-M2 for emacs-orgmode@gnu.org; Sat, 05 Nov 2022 05:20:56 -0400 Date: Sat, 05 Nov 2022 09:20:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667640051; x=1667899251; bh=Sl3siKRo7qFlfd6x/nqtVnitqDHrmicwD5jaf3rCYbU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=V5jxsRou6ZsE7fsDYpI0GVSSKlx7R+/ReDapCrRyi68dnLSAnCjCpG5Z1AGNFJpLX cDgd9ACPybn7FTVWxSF/ExTwTg9YogfNB2MmigZ51fDsNyFukPr9LXBuiElMhYdpqL SKfKzsWcBR+DFiEyKjISGa04480h2+KZGPyvajzUbTAB/m3154jb65XK8RDXcznEQr 6GMg7p+7wrA8rSggs+bQMMOOaw+14hGZzRyHR0jhqZljTBdCP2weIfK1ict+lLr+wX vfue/UCkTA1iaECwOp16I3ZJ1DqAodS0POf5ddc9d8ssoRSbvcB8hprAeg9zTvfhAI 7vru6fB8/hqHA== To: Ihor Radchenko From: Heime Cc: "emacs-orgmode@gnu.org" Subject: Re: Inserting tables programatically in elisp Message-ID: In-Reply-To: <87y1spkcpk.fsf@localhost> References: <87y1spkcpk.fsf@localhost> Feedback-ID: 57735886:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.132; envelope-from=heimeborgia@protonmail.com; helo=mail-40132.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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=1667640141; 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:dkim-signature; bh=Sl3siKRo7qFlfd6x/nqtVnitqDHrmicwD5jaf3rCYbU=; b=C8TjDcFdxmP/ig1uuXZszfmrFTlqhz6Yb+ISjW2n9O+GbgBp1hQ2K2d5Qx5vrK3GdUdLrC LsqUGkV8uhiJd81mxTZbkeQ3WSqP1zzyTocAQGjdPceUc4RDI+rr1NS+8E3mq1ltA2K14C n1zKMcgIy2ItzInZyGYa7vprFn1qrhtKJhJUJmyTFzMxGs+MWRh5RgYcS8F0sPjNz1rrAF lFjbLwfoSZ8B6jneZbHzhH8Xb40Ho8ULwwOY+/hAkolEwp3DlVDMsl5hqipZvzXCDgtl9L Q7iK6Vv1qs2g3sn1Ux8rB/H8RtfpXdO22ZhN0G5OdAIz150YVRGsZ/laNIadVw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667640141; a=rsa-sha256; cv=none; b=A5PPXVGzXQ4y6nlhYJmxaUpTpULlqaJJ4dUL2od9W5IrH/n+y+NAiEYGk/KE42XqZQffFm 2hsMVYawldu3zbugfUykE4oq8DaMQE4HtMogAIUtlXmk7zvq6zZ/+7Q6Nen307gilastZ8 bxIa3PFF2RGRGZ43ghJvrtVjARJwPe4dR3EPB/bSjoXzdxb9d4YNlHuxabsoXOvBhVDD6u LBp+FLrBL5GDWuLKSNG+p3+HpTN2wGu8VaNgG5mUX0lpi3oG0EXeUoS2OnwEbQXWRsWRAy 27NtZG/ahnUboPb3A+5jnNX9srtCG0PSDMGJZvpEUuQrzdk29VHaLNkDVKZ6Ng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=V5jxsRou; dmarc=pass (policy=quarantine) header.from=protonmail.com; 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: -2.50 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=V5jxsRou; dmarc=pass (policy=quarantine) header.from=protonmail.com; 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: 772F4CC5D X-Spam-Score: -2.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: hIYV92Zu2Uvj ------- Original Message ------- On Saturday, November 5th, 2022 at 8:49 AM, Ihor Radchenko wrote: > Heime heimeborgia@protonmail.com writes: >=20 > > Have constructed this function, but the difficulty centers around > > the challenge of inserting text in specific tests. > >=20 > > (defun make-table () > > (interactive) > > (table-insert 4 5) > > (table-forward-cell) > > (table-insert-sequence "icomplt-horz" 1 1 1 'center) > > (table-forward-cell 4) > > (table-insert-sequence "icomplt-vert" 1 1 1 'center) > > (table-release)) > >=20 > > It might be that "table.el" was designed under the assumption that the = table would > > be edited interactively rather than from ELisp. The lack of info may ju= st reflect > > that nobody has thought about it making tables programatically that als= o goes beyond > > its utilisation in "org-mode". >=20 > You can call functions interactively from lisp, if needed. One could work as you say, but only if the calls do not rely on finding tab= le regions and so on. =20 > > I understand that "Org" cooperates with its author Takaaki Ota, perhaps= things could > > be extended in a way that makes inserting tables programatically much e= asier to work > > with. >=20 >=20 > Do you refer to things on table.el side? Then, you may have more luck > asking on emacs-devel list. Correct. Thanks. =20 =20 > As for programmatically inserting native Org tables, you can always > construct table AST via org-element-create API and then insert it via > org-element-interpret-data. I am discussing the use of tables beyond "org". =20