gjkerns / ob-julia

36 stars 25 forks source link

ob-julia, src block execution undefined function org-babel-get-header #5

Open Xparx opened 8 years ago

Xparx commented 8 years ago

Hi, I was directed here from the org-mode mailing list. I have come across this bug for the latest org-mode version that I detail below.

I use: Org-mode version 8.3.3 (release_8.3.3-468-gf3f4b2) GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) of 2016-01-17 ess-version: 15.09-2 patched [git: 6d05ba7c89371764c43e30a436d7166417cabd4d] julia version 0.4.2

I'm trying to execute julia code src blocks but have come across a problem.

When trying to do C-c C-c in the src block emacs complain about an undefined function org-babel-get-header. I think I have tracked down the error to ob-julia where org-babel-get-header is used. I found a reference to a similar problem for ob-html package here: https://github.com/zweifisch/ob-http/issues/12 I tried to edit the ob-julia file based on that fix but failed to make it work as I am not really that good with lisp.

I should also mention that a similar issue was covered in a previous thread on the orgmode-mailing list but the info in this thread https://lists.gnu.org /archive/html/emacs-orgmode/2015-11/msg00426.html I can't apply to my problem as there is only one ob-julia.

This looks like an issue in ob-julia, unless I overlooked something in my setup. I tried running the same setup with a fresh emacs -q -l init.el loading only org-version: Org-mode version 8.2.10 (release_8.2.10 @ /usr/share/emacs/25.1.50/lisp/org /) which is bundled with my emacs and the ess package and I could evaluate julia src blocks with that setup.

Thanks for your time

Xparx commented 8 years ago

Given a little time it seems like I have found this substitution for org-babel-get-header to work for me

(mapcar #'cdr (org-babel--get-vars params))

This was quoted from the change-log in the answer I got from the mailing list

org-babel-get-header was removed in 0d000f5 (babel: small change in API, 2015-10-29) and has the following NEWS entry:

*\ ~org-babel-get-header~ is removed. Use ~org-babel--get-vars~ or ~assq~ instead, as applicable.

I hope this can be helpful.

fleimgruber commented 6 years ago

@Xparx Can this be closed with https://github.com/gjkerns/ob-julia/pull/7?