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

Add conditional support for execution of elixir code blocks in org files #1918

Closed
wants to merge 1 commit into from
Closed

Conversation

ghost
Copy link

@ghost ghost commented Jun 10, 2015

Was wondering if this might be useful, or appropriate, to add here.

Also, not sure if local sourced package not available on MELPA should be simply copied into extensions/?

I'm using it like this, in my dotspacemacs:

(defun dospacemacs/layers ()
     (elixir :variables elixir-enable-ob-elixir t)
...

and also,

(defun dotspacemacs/init ()
...
  (org-babel-do-load-languages
   'org-babel-load-languages
   '(
     ...
     (elixir . t)
     ))

PS

ob-elixir is not dependent on elixir-mode and executes an external command to evaluate code.

@syl20bnr
Copy link
Owner

Interesting proposal. We discussed a bit about this in #1159.

What I propose is to have automatic support for babel for all used layers. It is easily achievable by pushing to org-bable-load-languages in the config.el of a package (must be done conditionally though, i.e. when org layer is used, I guess we should declare a macro or function for this).

You can ask for MELPA support on the ob-elixir repo.

I'm not sure I will merge this but it is a proposal that we need to address.

cc @CestDiego @cpaulik @trishume @tuhdo

@CestDiego
Copy link
Contributor

I think that if org layer is being used, and a setup-babel or some variable like that is set, then it should install it automatically.

@ghost
Copy link
Author

ghost commented Jun 10, 2015

@CestDiego The docs indicate that once an ob-xxx library was required, you should already be able to evaluate.

In my case, I can evaluate elixir even if I don't add it to org-babel-load-languagesorg-babel-load-languages`. I guess it's just an autoload feature provided by org-mode?

http://orgmode.org/manual/Languages.html

@CestDiego
Copy link
Contributor

kek oh well this might be a thing for ob-xyz packages, but not for bundled ones, which are a lot.

@ghost ghost mentioned this pull request Jun 10, 2015
syl20bnr added a commit that referenced this pull request Oct 17, 2016
@syl20bnr
Copy link
Owner

Thank you !
I was not able to merge this since the repo is gone, but I added babel support for elixir via the package ob-elixir in commit 42a33f3
Cherry-picked into develop branch, you can safely delete your branch.

@syl20bnr syl20bnr closed this Oct 17, 2016
@syl20bnr syl20bnr removed the Merged label Oct 17, 2016
syl20bnr added a commit that referenced this pull request Oct 19, 2016
george-miller pushed a commit to george-miller/spacemacs that referenced this pull request Nov 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants