From: Heime <heimeborgia@protonmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Inserting tables programatically in elisp
Date: Sat, 05 Nov 2022 09:20:40 +0000 [thread overview]
Message-ID: <t2qTNt6fpE6Z2fD_PrU9ipWMFlkbIBp4kEDMGt0v-Q8kxkde7dwlBuHvJniZ5LlgT1Xw2uRkcGXhoyfpAYGCPqHTtaalptqB7fxXAO3Vxrc=@protonmail.com> (raw)
In-Reply-To: <87y1spkcpk.fsf@localhost>
------- Original Message -------
On Saturday, November 5th, 2022 at 8:49 AM, Ihor Radchenko <yantar92@posteo.net> wrote:
> Heime heimeborgia@protonmail.com writes:
>
> > Have constructed this function, but the difficulty centers around
> > the challenge of inserting text in specific tests.
> >
> > (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))
> >
> > 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 just reflect
> > that nobody has thought about it making tables programatically that also goes beyond
> > its utilisation in "org-mode".
>
> 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 table regions
and so on.
> > I understand that "Org" cooperates with its author Takaaki Ota, perhaps things could
> > be extended in a way that makes inserting tables programatically much easier to work
> > with.
>
>
> Do you refer to things on table.el side? Then, you may have more luck
> asking on emacs-devel list.
Correct. Thanks.
> 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".
next prev parent reply other threads:[~2022-11-05 9:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 7:41 Inserting tables programatically in elisp Heime
2022-11-05 8:49 ` Ihor Radchenko
2022-11-05 9:20 ` Heime [this message]
2022-11-05 9:02 ` Jean Louis
2022-11-05 9:26 ` Heime
2022-11-05 10:05 ` Jean Louis
2022-11-05 10:23 ` Jean Louis
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='t2qTNt6fpE6Z2fD_PrU9ipWMFlkbIBp4kEDMGt0v-Q8kxkde7dwlBuHvJniZ5LlgT1Xw2uRkcGXhoyfpAYGCPqHTtaalptqB7fxXAO3Vxrc=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--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).