emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Inserting tables programatically in elisp
Date: Sat, 05 Nov 2022 07:41:57 +0000	[thread overview]
Message-ID: <ormzZI3RH_irS2cEIvdZQZFQsbW5xbRn6lqmjs4_oz7mtmwKFDyJi7-1Q4RWsH7gWn48qS89AVwJU6vWep1bBQO1bcXOdCCfRBJuMMF66UA=@protonmail.com> (raw)

Have been introspecting the possibility of conveniently inserting table programatically
in elisp and encountered "table.el".

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".

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.
 




             reply	other threads:[~2022-11-05  7:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05  7:41 Heime [this message]
2022-11-05  8:49 ` Inserting tables programatically in elisp Ihor Radchenko
2022-11-05  9:20   ` Heime
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='ormzZI3RH_irS2cEIvdZQZFQsbW5xbRn6lqmjs4_oz7mtmwKFDyJi7-1Q4RWsH7gWn48qS89AVwJU6vWep1bBQO1bcXOdCCfRBJuMMF66UA=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).