From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre-Henry Frohring Subject: Is there a org-babel-map-src-blocks but for tables? Date: Sun, 16 Oct 2016 21:53:43 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0102d8007ea303053f00d3a9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvrVu-0005VH-TK for emacs-orgmode@gnu.org; Sun, 16 Oct 2016 15:54:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvrVt-0001l0-O1 for emacs-orgmode@gnu.org; Sun, 16 Oct 2016 15:54:30 -0400 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:36292) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvrVt-0001kg-Fs for emacs-orgmode@gnu.org; Sun, 16 Oct 2016 15:54:29 -0400 Received: by mail-lf0-x236.google.com with SMTP id b75so248796080lfg.3 for ; Sun, 16 Oct 2016 12:54:28 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --089e0102d8007ea303053f00d3a9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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)) =E2=80=8BFrom here: https://github.com/phfrohring/org-to-blog/blob/master/org_to_blog.el=E2=80= =8B Thx! --089e0102d8007ea303053f00d3a9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi list!

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

Use case:

I have a file with multiple headings like:
<= br>
* Heading
** Result
(some ch= art computed by processing data)

** Processing
(code block for tr= ansforming data into chart)

** Data
(org table containing the dat= a)

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 char= ts
3) exporting org file to html

Problem with 1) : did not find a function like `org-babel-map-src-blo= cks' 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/o= rg_to_www ()
=C2=A0 (setq org-confirm-babel-evaluate nil)
=C2=A0 (blo= g/check_blog)
=C2=A0 (blog/tangle_blog)
=C2=A0 (blog/export_tables)=C2=A0 (blog/eval_safe_code_blocks)
=C2=A0 (blog/map_entries_assets_to= _html_files_assets)
=C2=A0 (blog/map_entries_to_html_files)
=C2=A0 (b= log/create_sitemap)
=C2=A0 (setq org-confirm-babel-evaluate t))

<= /div>
Thx!

--089e0102d8007ea303053f00d3a9--