emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Is there a org-babel-map-src-blocks but for tables?
@ 2016-10-16 19:53 Pierre-Henry Frohring
  2016-10-16 20:55 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre-Henry Frohring @ 2016-10-16 19:53 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

Hi list!

Wondering if there was a function like `org-babel-map-src-blocks'
but for tables.

Use case:

I have a file with multiple headings like:

* Heading
** Result
(some chart computed by processing data)

** Processing
(code block for transforming data into chart)

** Data
(org table containing the data)

So, it would be nice to:

1) transform all tables into tsv files
2) eval code blocks that read these files and turn them into charts
3) exporting org file to html

Problem with 1) : did not find a function like `org-babel-map-src-blocks'
but for tables.

Corresponding code is here: https://github.com/phfrohring/org-to-blog

It maps every heading with a :ready: tag to matching html of one org file:

(defun blog/org_to_www ()
  (setq org-confirm-babel-evaluate nil)
  (blog/check_blog)
  (blog/tangle_blog)
  (blog/export_tables)
  (blog/eval_safe_code_blocks)
  (blog/map_entries_assets_to_html_files_assets)
  (blog/map_entries_to_html_files)
  (blog/create_sitemap)
  (setq org-confirm-babel-evaluate t))

​From here:
https://github.com/phfrohring/org-to-blog/blob/master/org_to_blog.el​

Thx!

[-- Attachment #2: Type: text/html, Size: 1811 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is there a org-babel-map-src-blocks but for tables?
  2016-10-16 19:53 Is there a org-babel-map-src-blocks but for tables? Pierre-Henry Frohring
@ 2016-10-16 20:55 ` Nicolas Goaziou
  2016-10-16 21:03   ` Pierre-Henry Frohring
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-10-16 20:55 UTC (permalink / raw)
  To: Pierre-Henry Frohring; +Cc: emacs-orgmode

Hello,

Pierre-Henry Frohring <frohring.pierrehenry@gmail.com> writes:

> Wondering if there was a function like `org-babel-map-src-blocks'
> but for tables.

See `org-table-map-tables'.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is there a org-babel-map-src-blocks but for tables?
  2016-10-16 20:55 ` Nicolas Goaziou
@ 2016-10-16 21:03   ` Pierre-Henry Frohring
  2016-10-16 21:13     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre-Henry Frohring @ 2016-10-16 21:03 UTC (permalink / raw)
  To: Pierre-Henry Frohring, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

Nice thx!
Probably good to put that in the doc (http://orgmode.org/org.html)!
I would do it if I could.

Regards

Cordialement,
Pierre-Henry Fröhring
06 34 48 17 57
Skype: pierre.henry.frohring


2016-10-16 22:55 GMT+02:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:

> Hello,
>
> Pierre-Henry Frohring <frohring.pierrehenry@gmail.com> writes:
>
> > Wondering if there was a function like `org-babel-map-src-blocks'
> > but for tables.
>
> See `org-table-map-tables'.
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 1719 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is there a org-babel-map-src-blocks but for tables?
  2016-10-16 21:03   ` Pierre-Henry Frohring
@ 2016-10-16 21:13     ` Nicolas Goaziou
  2016-10-17 14:20       ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-10-16 21:13 UTC (permalink / raw)
  To: Pierre-Henry Frohring; +Cc: emacs-orgmode

Pierre-Henry Frohring <frohring.pierrehenry@gmail.com> writes:

> Probably good to put that in the doc (http://orgmode.org/org.html)!

Not sure where it could fit, tho.

> I would do it if I could.

You can provide a patch. Org can also export to Texinfo, if that's a problem.

Regards,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is there a org-babel-map-src-blocks but for tables?
  2016-10-16 21:13     ` Nicolas Goaziou
@ 2016-10-17 14:20       ` Nick Dokos
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2016-10-17 14:20 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Pierre-Henry Frohring <frohring.pierrehenry@gmail.com> writes:
>
>> Probably good to put that in the doc (http://orgmode.org/org.html)!
>
> Not sure where it could fit, tho.
>

The mapping API section perhaps?

-- 
Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-17 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-16 19:53 Is there a org-babel-map-src-blocks but for tables? Pierre-Henry Frohring
2016-10-16 20:55 ` Nicolas Goaziou
2016-10-16 21:03   ` Pierre-Henry Frohring
2016-10-16 21:13     ` Nicolas Goaziou
2016-10-17 14:20       ` Nick Dokos

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