Symbol's function definition is void: org-babel--get-vars
Closed this issue · 6 comments
I am using Emacs 25 (compiled from source) and org-mode (release-8.3.4)
When I try code block as below:
#+BEGIN_SRC go
fmt.Println("Hello World!")
#+END_SRC
I got error: "Symbol's function definition is void: org-babel--get-vars"
When I install org-mode from master branch, it works fine.
Strange... I'm using org-mode 8.3.4 (but with emacs 24.5) and symbol org-babel--get-vars
exists. We already have a compat function called org-babel-go-get-var
to handle compatibility with older org-mode (< 8.3).
https://github.com/pope/ob-go/blob/master/ob-go.el#L187
I had a similar problem, but for 'org-babel-get-header not defined` in 8.3.3 and then I added this compat function to solve the problem. At that time I found this link:
https://lists.gnu.org/archive/html/emacs-orgmode/2016-01/msg00468.html
I don't know what to do here... The release notes of org-mode 8.3.[3,4] doesn't say nothing about org-babel-get-header/org-babel--get-vars, but the master branch (or 9.0 release notes) do say to avoid org-babel-get-header
and use org-babel--get-vars
instead:
http://orgmode.org/cgit.cgi/org-mode.git/tree/etc/ORG-NEWS#n367
As I'd said before, I think the best way to guarantee this package working across orgmode versions should be submitting it upstream...
org-babel-get-header
is defined for me.
org-version
output:
Org-mode version 8.3.4 (8.3.4-79-gbd4948-elpa @ /usr/local/google/home/igm/.emacs.d/elpa/org-20160606/)
emacs-version
output:
GNU Emacs 25.0.95.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8), modified by Debian
org-babel-get-header
not defined here.
org-version
output:
Org-mode version 8.3.4 (release_8.3.4-655-g9fb077 @ /home/i4k/.emacs.d/lib/org-mode/lisp/)
emacs-version
output:
GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.6) of 2016-06-04 on juergen
Hmm, just figured out that my org is not a released version of orgmode 8.3.4 but a cloned git repo... It says 8.3.4 in (org-version) but it was the master branch of March 14 2016 ...
Sorry about that.
@pope The function org-babel-go-get-var
is really wrong... Instead of using org-version to decide between get-header/--get-vars better to only verify if org-babel-get-header
is defined and use org-babel--get-vars
otherwise...
Maybe check if function is defined is better idea than checking version number at here.