From: Eric Schulte <schulte.eric@gmail.com>
To: Jakob Lombacher <Jakob@lombacher.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bugfix ob-C.el mixed input variable
Date: Thu, 27 Mar 2014 17:54:01 -0400 [thread overview]
Message-ID: <874n2jcnpi.fsf@gmail.com> (raw)
In-Reply-To: <CALAc-Bt1vgz6R0fiKpX2E3HJnkc-wrTbHvwiJM9Z8T-seBJ_xg@mail.gmail.com> (Jakob Lombacher's message of "Thu, 27 Mar 2014 19:47:53 +0100")
Applied, Thanks!
Jakob Lombacher <Jakob@lombacher.net> writes:
> When using org-babel with mixed (double, int) input like below, the c file
> was not written correctly. The numbers where left out and only the commas
> where written.
>
> I guess it was a typo. Attached is the patch.
>
> Jakob
>
> ---
>
> #+RESULTS[8894f01ba8e219bd6cafb49748f4d5cad8bb6fd1]: test-parameter
> | 1 | 2.3 |
> | 3 | 4.2 |
>
>
>
> #+begin_src cpp :var x=test-parameter :includes '("<iostream>")
> using namespace std;
> cout << "hallo" << endl;
> #+end_src
>
> From baea909dd3e6d7e4c8eaa2c506a3c6f31c472f11 Mon Sep 17 00:00:00 2001
> From: Jakob Lombacher <Jakob@Lombacher.net>
> Date: Thu, 27 Mar 2014 19:27:03 +0100
> Subject: [PATCH] Bugfix, there was one entry too much.
>
> It failed when mixed (int double) table is used as input variable e.g
> | 1 | 1.2 |
> ---
> lisp/ob-C.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/ob-C.el b/lisp/ob-C.el
> index 4c2d1ba..bbd0525 100644
> --- a/lisp/ob-C.el
> +++ b/lisp/ob-C.el
> @@ -264,7 +264,7 @@ FORMAT can be either a format string or a function which is called with VAL."
> (when (and type (not (string= type-name tmp-type-name)))
> (if (and (member type-name '("int" "double" "int32_t"))
> (member tmp-type-name '("int" "double" "int32_t")))
> - (setq tmp-type '("double" "" "%f"))
> + (setq tmp-type '("double" "%f"))
> (error "Only homogeneous lists are supported by C. You can not mix %s and %s"
> type-name
> tmp-type-name)))
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D
prev parent reply other threads:[~2014-03-27 21:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 18:47 Bugfix ob-C.el mixed input variable Jakob Lombacher
2014-03-27 21:54 ` Eric Schulte [this message]
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=874n2jcnpi.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=Jakob@lombacher.net \
--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).