emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Babel] Difficult to follow code execution in HTML exported file
Date: Fri, 26 Nov 2010 13:33:54 -0700	[thread overview]
Message-ID: <87eia7lt8t.fsf@gmail.com> (raw)
In-Reply-To: <80oc9c2vv6.fsf@missioncriticalit.com> ("Sébastien Vauban"'s message of "Fri, 26 Nov 2010 11:59:57 +0100")

Hi Seb,

The title of your email mentions code execution, but the body seems to
focus on export of table names.  I'll reply to the latter and my
apologies if I've missed something related to the former.

Table names have existed in Org-mode since before the existence of
active code blocks, and I don't think they have ever been exported, so
the export of table names would be a Org-mode wide feature request.  I
imagine that such a change would meet with some resistance, at least I
know I would not want all of my table names exported by default.  Is
there a reason you don't just add the table name manually?  e.g.

Numbers-1
#+tblname: numbers-1
|        1 |
|        2 |
|       45 |
|     test |
| 3.141592 |

Hope this helps -- Eric

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> #+TITLE:     Tables don't have their name exported
> #+DATE:      2010-11-26
> #+LANGUAGE:  en_US
>
> * Abstract
>
> Chunks of code are exported to HTML with their parameters, such as table
> names. But *tables aren't exported with their name*.
>
> * Playing with data and code
>
> Here is one table:
>
> #+tblname: numbers-1
> |        1 |
> |        2 |
> |       45 |
> |     test |
> | 3.141592 |
>
> Another one is here:
>
> #+tblname: numbers-2
> |       21 |
> |       22 |
> |      245 |
> |    test2 |
> | 23.14159 |
>
> When applying the following chunk of code to some data (find who is
> =numbers-1=!):
>
> #+srcname: add-type
> #+begin_src emacs-lisp :var data=numbers-1 :exports both
> (mapcar
>  (lambda (line)
>    (let ((number (car line)))
>      (list number (type-of number))))
>  data)
> #+end_src
>
> I get the following results:
>
> #+results: add-type
> #+BEGIN_RESULT
> |        1 | integer |
> |        2 | integer |
> |       45 | integer |
> |     test | string  |
> | 3.141592 | float   |
> #+END_RESULT
>
>
> * Explanation
>
> In HTML, I can't entirely follow the explanation, as the code's parameter
> (here: =numbers-1=) is not visible anywhere: *tables don't have their name
> exported*...
>
> I well see that the chunk of code is called on table =numbers-1=, but I don't
> which one of the two tables it is.
>
> Best regards,
>   Seb

  reply	other threads:[~2010-11-26 20:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 10:59 [Babel] Difficult to follow code execution in HTML exported file Sébastien Vauban
2010-11-26 20:33 ` Eric Schulte [this message]
2010-11-26 23:04   ` Sébastien Vauban
2010-11-26 23:23     ` Eric Schulte

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=87eia7lt8t.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.com \
    /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).