From: sergio ruiz <sergio.rrd@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Inserting a row divider/header into org-babel results
Date: Tue, 14 Jan 2020 16:01:45 -0500 [thread overview]
Message-ID: <929AA126-B482-4D29-A37B-B538D4A4CDB0@gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1701 bytes --]
Adding a header to the data
===========================
I am presenting some simple data here, but the idea is, I would like
to programatically add a header to the results of an org-babel
evaluation. Looking at the results from `data_table', I would like to
intercept the first line so that I can massage it into the preferred
output. I am just unsure how to insert the header into my output.
My goal is to be able to generate the "Preferred result"
programatically.
Any Ideas?
Thanks!
Latex Test
~~~~~~~~~~
Table test here:
----------------
,----
| rows = (1..5)
| columns = (1..5)
| results = []
| rows.each_with_index do |row|
| result_row = []
| columns.each do |column|
| result_row << column * row
| end
| results << result_row
| end
| results
`----
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
Preferred result
----------------
column 1 column 2 column 3 column 4 column 5
--------------------------------------------------
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
----
peace,
sergio
photographer, journalist, visionary
Public Key: https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
@sergio_101@mastodon.social
https://sergio101.com
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
[-- Attachment #1.2: Type: text/html, Size: 6223 bytes --]
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
reply other threads:[~2020-01-14 21:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=929AA126-B482-4D29-A37B-B538D4A4CDB0@gmail.com \
--to=sergio.rrd@gmail.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).