Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol's function definition is void: org-babel--get-vars #10

Closed
ghost opened this issue Jul 5, 2016 · 6 comments
Closed

Symbol's function definition is void: org-babel--get-vars #10

ghost opened this issue Jul 5, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Jul 5, 2016

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.

@macalinao
Copy link

@i4ki
Copy link
Contributor

i4ki commented Jul 11, 2016

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...

@macalinao
Copy link

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

@i4ki
Copy link
Contributor

i4ki commented Jul 11, 2016

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

@i4ki
Copy link
Contributor

i4ki commented Jul 11, 2016

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...

i4ki added a commit to NeowayLabs/ob-go that referenced this issue Jul 11, 2016
The function `org-babel--get-vars` is only defined in the master
branch (orgmode 9.0).

Add a simple check verifying if `org-babel-get-header` exists and only
use `org-babel--get-vars` otherwise.

Closes pope#10
@ghost
Copy link
Author

ghost commented Jul 11, 2016

Maybe check if function is defined is better idea than checking version number at here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants