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

Org-Mode Evaluation of code disabled #7641

Open
Atrifex opened this Issue Nov 3, 2016 · 58 comments

Comments

Projects
None yet
@Atrifex

Atrifex commented Nov 3, 2016

I am trying to run code as a part of org-mode's code blocks. However, it keeps saying that evaluation of code-blocks is disabled. I am not sure where to go to turn this option on. Please let me know. Thank you in advance.

@TheBB

This comment has been minimized.

Show comment
Hide comment
@TheBB
Collaborator

TheBB commented Nov 3, 2016

@Atrifex

This comment has been minimized.

Show comment
Hide comment
@Atrifex

Atrifex Nov 3, 2016

I actually looked through this page.

I am currently doing the following in my user-config()

  (with-eval-after-load 'org
    (require 'ob-python)
    (org-babel-do-load-languages
     'org-babel-load-languages
     '((C . t)
       (python . t)))
  )

However, this doesn't seem to change anything.

Atrifex commented Nov 3, 2016

I actually looked through this page.

I am currently doing the following in my user-config()

  (with-eval-after-load 'org
    (require 'ob-python)
    (org-babel-do-load-languages
     'org-babel-load-languages
     '((C . t)
       (python . t)))
  )

However, this doesn't seem to change anything.

@LemmingAvalanche

This comment has been minimized.

Show comment
Hide comment
@LemmingAvalanche

LemmingAvalanche Nov 3, 2016

Contributor

I was able to get Python to work.

In my dotspacemacs/user-init:

(require 'ob-python)
(org-babel-do-load-languages
  'org-babel-load-languages
  '((python . t)))

So I didn’t use the with-eval-after-load bit.

I also included the Python layer in dotspacemacs/layers.

Then I executed org-babel-execute-src-block while point was inside the source
block below:

#+BEGIN_SRC python
import time
print("Hello, today's date is %s" % time.ctime())
print('Two plus two is')
return 2 + 2
#+END_SRC

#+RESULTS:
: 4

I get prompted about whether I want to execute the code each time I execute that
function.

Could you try the above? Then try with C if that works.

Contributor

LemmingAvalanche commented Nov 3, 2016

I was able to get Python to work.

In my dotspacemacs/user-init:

(require 'ob-python)
(org-babel-do-load-languages
  'org-babel-load-languages
  '((python . t)))

So I didn’t use the with-eval-after-load bit.

I also included the Python layer in dotspacemacs/layers.

Then I executed org-babel-execute-src-block while point was inside the source
block below:

#+BEGIN_SRC python
import time
print("Hello, today's date is %s" % time.ctime())
print('Two plus two is')
return 2 + 2
#+END_SRC

#+RESULTS:
: 4

I get prompted about whether I want to execute the code each time I execute that
function.

Could you try the above? Then try with C if that works.

@Atrifex

This comment has been minimized.

Show comment
Hide comment
@Atrifex

Atrifex Nov 3, 2016

It did help with that. However, for some reason the bullets just appear as , *, ***. This is not a big deal however cuz i am just manually able to turn them on with little to no effort. Thank.

Atrifex commented Nov 3, 2016

It did help with that. However, for some reason the bullets just appear as , *, ***. This is not a big deal however cuz i am just manually able to turn them on with little to no effort. Thank.

@LemmingAvalanche

This comment has been minimized.

Show comment
Hide comment
@LemmingAvalanche

LemmingAvalanche Nov 3, 2016

Contributor

@TheBB it seems that this can be closed.

Contributor

LemmingAvalanche commented Nov 3, 2016

@TheBB it seems that this can be closed.

@bmag bmag closed this Nov 3, 2016

@agzam

This comment has been minimized.

Show comment
Hide comment
@agzam

agzam Nov 4, 2016

Let's re-open this issue, something definitely not right, in org 9.0 you have to load explicitly for every language you want to use? Every language I'm trying not working. lua (which supposed to be added in 9.0), javascript, bash, etc.

and ob-http (which is part of restclient layer) does not work at all - babel complains 'no such language mode: http-mode

agzam commented Nov 4, 2016

Let's re-open this issue, something definitely not right, in org 9.0 you have to load explicitly for every language you want to use? Every language I'm trying not working. lua (which supposed to be added in 9.0), javascript, bash, etc.

and ob-http (which is part of restclient layer) does not work at all - babel complains 'no such language mode: http-mode

@bmag

This comment has been minimized.

Show comment
Hide comment
@bmag

bmag Nov 4, 2016

Collaborator

@agzam it seems the issue has been resolved for @Atrifex so I closed it. I don't use org-babel and I'm not aware of the differences with Org 9.0, can you explain the bug using the usual template please?

Collaborator

bmag commented Nov 4, 2016

@agzam it seems the issue has been resolved for @Atrifex so I closed it. I don't use org-babel and I'm not aware of the differences with Org 9.0, can you explain the bug using the usual template please?

@bmag bmag reopened this Nov 4, 2016

@agzam

This comment has been minimized.

Show comment
Hide comment
@agzam

agzam Nov 4, 2016

@TheBB it was kinda expected - things to break due to org-mode 9.0. Maybe we need a separate issue or maybe each one should be treated individually - it's up to you guys, but there are couple of things that appear to be broken at the moment (prob. there is more, but that's what I can see):

  • at Emacs startup, warning:

    Error (use-package): org post-:config hook: Unknown keyword: :export-block

  • eval of org-babel languages doesn't work out of the box anymore, except for emacs-lisp, so if in org-mode you make something like:

      #+BEGIN_SRC shell
      ls
      #+END_SRC
    

and then C-c C-c to evaluate that piece, it would not do anything so EVERY single language (except emacs-lisp) now has to be explicitly loaded, e.g.:

(org-babel-do-load-languages
 'org-babel-load-languages
 '((shell . t)
   (js . t)
   (clojure . t) ... etc, etc.)

So maybe that should be handled by org-layer?

agzam commented Nov 4, 2016

@TheBB it was kinda expected - things to break due to org-mode 9.0. Maybe we need a separate issue or maybe each one should be treated individually - it's up to you guys, but there are couple of things that appear to be broken at the moment (prob. there is more, but that's what I can see):

  • at Emacs startup, warning:

    Error (use-package): org post-:config hook: Unknown keyword: :export-block

  • eval of org-babel languages doesn't work out of the box anymore, except for emacs-lisp, so if in org-mode you make something like:

      #+BEGIN_SRC shell
      ls
      #+END_SRC
    

and then C-c C-c to evaluate that piece, it would not do anything so EVERY single language (except emacs-lisp) now has to be explicitly loaded, e.g.:

(org-babel-do-load-languages
 'org-babel-load-languages
 '((shell . t)
   (js . t)
   (clojure . t) ... etc, etc.)

So maybe that should be handled by org-layer?

@nanounanue

This comment has been minimized.

Show comment
Hide comment
@nanounanue

nanounanue Nov 8, 2016

I have the same problem:

My version of org-mode is

Org mode version 9.0 (9.0-elpa @ /home/nanounanue/.emacs.d/elpa/org-20161102/)

the Emacs version is

GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.8) of 2016-10-15

The relevant part of my personal emacs init file is:

(require 'ob-python)
(require 'ob-clojure)
(require 'ob-perl)
(require 'ob-dot)
(require 'ob-R)
(require 'ob-gnuplot)
(require 'ob-lisp)
(require 'ob-org)
(require 'ob-screen)
(require 'ob-calc)
(require 'ob-js)
(require 'ob-latex)
(require 'ob-plantuml)
(require 'ob-sh)
(require 'ob-ditaa)
(require 'ob-awk)
(require 'ob-octave)
(require 'ob-sed)
(require 'ob-sql)
(require 'ob-sqlite)

(org-babel-do-load-languages
 'org-babel-load-languages
 '( (perl . t)
    (dot . t)
    (R . t)
    (gnuplot . t)
    (clojure . t)
;;    (graphviz . t)
    (lisp . t)
;;    (stan . t)
    (org . t)
    (screen . t)
    (calc . t)
    (js . t)
    (latex . t)
    (plantuml . t)
    (ruby . t)
    (sh . t)
    (python . t)
    (emacs-lisp . t)
    (ditaa . t)
    (awk . t)
    (octave . t)
    (sed . t)
    (sql . t)
    (sqlite . t)
    ))

When I try to execute any block, even this from the documetation:

#+BEGIN_SRC emacs-lisp
(defun org-xor (a b)
"Exclusive or."
(if a (not b) b))
#+END_SRC

I got

Evaluation of this emacs-lisp code-blockis disabled.

The same happens with python, R, etc

Any ideas?

nanounanue commented Nov 8, 2016

I have the same problem:

My version of org-mode is

Org mode version 9.0 (9.0-elpa @ /home/nanounanue/.emacs.d/elpa/org-20161102/)

the Emacs version is

GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.8) of 2016-10-15

The relevant part of my personal emacs init file is:

(require 'ob-python)
(require 'ob-clojure)
(require 'ob-perl)
(require 'ob-dot)
(require 'ob-R)
(require 'ob-gnuplot)
(require 'ob-lisp)
(require 'ob-org)
(require 'ob-screen)
(require 'ob-calc)
(require 'ob-js)
(require 'ob-latex)
(require 'ob-plantuml)
(require 'ob-sh)
(require 'ob-ditaa)
(require 'ob-awk)
(require 'ob-octave)
(require 'ob-sed)
(require 'ob-sql)
(require 'ob-sqlite)

(org-babel-do-load-languages
 'org-babel-load-languages
 '( (perl . t)
    (dot . t)
    (R . t)
    (gnuplot . t)
    (clojure . t)
;;    (graphviz . t)
    (lisp . t)
;;    (stan . t)
    (org . t)
    (screen . t)
    (calc . t)
    (js . t)
    (latex . t)
    (plantuml . t)
    (ruby . t)
    (sh . t)
    (python . t)
    (emacs-lisp . t)
    (ditaa . t)
    (awk . t)
    (octave . t)
    (sed . t)
    (sql . t)
    (sqlite . t)
    ))

When I try to execute any block, even this from the documetation:

#+BEGIN_SRC emacs-lisp
(defun org-xor (a b)
"Exclusive or."
(if a (not b) b))
#+END_SRC

I got

Evaluation of this emacs-lisp code-blockis disabled.

The same happens with python, R, etc

Any ideas?

@madhat2r

This comment has been minimized.

Show comment
Hide comment
@madhat2r

madhat2r Nov 8, 2016

Contributor

I have same exact issue as @nanounanue

Contributor

madhat2r commented Nov 8, 2016

I have same exact issue as @nanounanue

@SimonAB

This comment has been minimized.

Show comment
Hide comment
@SimonAB

SimonAB Nov 10, 2016

Same problem here using ipython code blocks, and not using Spacemacs... This bug seems to have been introduced to org mode after 2016-10-31.

SimonAB commented Nov 10, 2016

Same problem here using ipython code blocks, and not using Spacemacs... This bug seems to have been introduced to org mode after 2016-10-31.

@seldomworks

This comment has been minimized.

Show comment
Hide comment
@seldomworks

seldomworks Nov 10, 2016

Deleting *.elc files for org mode was the only thing that fixed the issue for me.
http://emacs.stackexchange.com/questions/28441/org-mode-9-unable-to-eval-code-blocks

seldomworks commented Nov 10, 2016

Deleting *.elc files for org mode was the only thing that fixed the issue for me.
http://emacs.stackexchange.com/questions/28441/org-mode-9-unable-to-eval-code-blocks

@SimonAB

This comment has been minimized.

Show comment
Hide comment
@SimonAB

SimonAB Nov 10, 2016

@seldomworks I can confirm this worked for me too. Thanks!

SimonAB commented Nov 10, 2016

@seldomworks I can confirm this worked for me too. Thanks!

@madhat2r

This comment has been minimized.

Show comment
Hide comment
@madhat2r

madhat2r Nov 10, 2016

Contributor

This worked for me also, but in addition I had to recompile org-plus-contrib.

Thanks @seldomworks!

Contributor

madhat2r commented Nov 10, 2016

This worked for me also, but in addition I had to recompile org-plus-contrib.

Thanks @seldomworks!

@cpaulik

This comment has been minimized.

Show comment
Hide comment
@cpaulik

cpaulik Nov 10, 2016

Contributor

This might be related to the fact that a package update often installs org and org-plus-contrib in some order and the bytecode is then compiled with the wrong version. There might be a problem during the dependency resolution there.

Contributor

cpaulik commented Nov 10, 2016

This might be related to the fact that a package update often installs org and org-plus-contrib in some order and the bytecode is then compiled with the wrong version. There might be a problem during the dependency resolution there.

@nickanderson

This comment has been minimized.

Show comment
Hide comment
@nickanderson

nickanderson Nov 11, 2016

Contributor

Purging ~/.emacs.d/elpa/org-20161102/*.elcworked for me as well.

Contributor

nickanderson commented Nov 11, 2016

Purging ~/.emacs.d/elpa/org-20161102/*.elcworked for me as well.

@mathpunk

This comment has been minimized.

Show comment
Hide comment
@mathpunk

mathpunk Nov 13, 2016

Contributor

Purging ~/.emacs.d/elpa/org-20161102 did not work for me. Removed that entire dir, restarted emacs, same error.

(with-eval-after-load 'org
(setq-default dotspacemacs-configuration-layers
              '((org :variables org-enable-github-support t)))
(setq org-confirm-babel-evaluate nil
      org-src-fontify-natively t
      org-src-tab-acts-natively t)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((http       . t)
   (sh         . t)
   (js         . t)
   (emacs-lisp . t)
   (clojure    . t)
   (python     . t)
   (dot        . t)
   )))

I also tried putting in a (require 'ob-sh) to see if that had an effect, but no.

Contributor

mathpunk commented Nov 13, 2016

Purging ~/.emacs.d/elpa/org-20161102 did not work for me. Removed that entire dir, restarted emacs, same error.

(with-eval-after-load 'org
(setq-default dotspacemacs-configuration-layers
              '((org :variables org-enable-github-support t)))
(setq org-confirm-babel-evaluate nil
      org-src-fontify-natively t
      org-src-tab-acts-natively t)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((http       . t)
   (sh         . t)
   (js         . t)
   (emacs-lisp . t)
   (clojure    . t)
   (python     . t)
   (dot        . t)
   )))

I also tried putting in a (require 'ob-sh) to see if that had an effect, but no.

@nickanderson

This comment has been minimized.

Show comment
Hide comment
@nickanderson

nickanderson Nov 13, 2016

Contributor

Did you try just removing the elc files?

Contributor

nickanderson commented Nov 13, 2016

Did you try just removing the elc files?

@mathpunk

This comment has been minimized.

Show comment
Hide comment
@mathpunk

mathpunk Nov 14, 2016

Contributor

@nickanderson That was the first thing that I tried. But I assumed that just trying to run the thing would get those files recompiled, and now I'm wondering if I need to take more action to get org reinstalled --- it is listed as a package in my .spacemacs, but the org directory has not reappeared in ~/.emacs.d/elpa.

Contributor

mathpunk commented Nov 14, 2016

@nickanderson That was the first thing that I tried. But I assumed that just trying to run the thing would get those files recompiled, and now I'm wondering if I need to take more action to get org reinstalled --- it is listed as a package in my .spacemacs, but the org directory has not reappeared in ~/.emacs.d/elpa.

@nickanderson

This comment has been minimized.

Show comment
Hide comment
@nickanderson

nickanderson Nov 14, 2016

Contributor

@mathpunk I had previously tried without success to delete the org directory in ~/.emacs.d/elpa. Restarting emacs would cause the package to he re-downloaded but my issue with SRC blocks persisted until I only removed the elc files and then restarted emacs.

Contributor

nickanderson commented Nov 14, 2016

@mathpunk I had previously tried without success to delete the org directory in ~/.emacs.d/elpa. Restarting emacs would cause the package to he re-downloaded but my issue with SRC blocks persisted until I only removed the elc files and then restarted emacs.

@dubnde

This comment has been minimized.

Show comment
Hide comment
@dubnde

dubnde Nov 19, 2016

Contributor

I still see this issue as well

Contributor

dubnde commented Nov 19, 2016

I still see this issue as well

@Rand01ph

This comment has been minimized.

Show comment
Hide comment
@Rand01ph

Rand01ph Nov 20, 2016

reinstall org layer maybe reslove this problem

Rand01ph commented Nov 20, 2016

reinstall org layer maybe reslove this problem

@dubnde

This comment has been minimized.

Show comment
Hide comment
@dubnde

dubnde Nov 20, 2016

Contributor

@Rand01ph works if I delete the org-plus-contrib package in elpa folder so it reinstalls on next start up.

Note: It did not work when I wiped all org- packages or wiped the whole elpa folder. So it does seem the org-plus-contrib package must be the last package to install to mitigate the issue.

rm -rf elpa/org-plus-contrib-20161118/
Contributor

dubnde commented Nov 20, 2016

@Rand01ph works if I delete the org-plus-contrib package in elpa folder so it reinstalls on next start up.

Note: It did not work when I wiped all org- packages or wiped the whole elpa folder. So it does seem the org-plus-contrib package must be the last package to install to mitigate the issue.

rm -rf elpa/org-plus-contrib-20161118/
@dubnde

This comment has been minimized.

Show comment
Hide comment
@dubnde

dubnde Nov 20, 2016

Contributor

blind me! It only works for a single session. If I restart emacs, stops working. Got to delete org-plus-contrib again.

Contributor

dubnde commented Nov 20, 2016

blind me! It only works for a single session. If I restart emacs, stops working. Got to delete org-plus-contrib again.

@yssource

This comment has been minimized.

Show comment
Hide comment
@yssource

yssource Dec 10, 2016

+1 @torgeir Thank you.
rm org-plus-contrib-20161102/*.elc working for me.
Not only for the current emacs instance, Still working after restarting emacs

yssource commented Dec 10, 2016

+1 @torgeir Thank you.
rm org-plus-contrib-20161102/*.elc working for me.
Not only for the current emacs instance, Still working after restarting emacs

torgeir added a commit to torgeir/.emacs.d that referenced this issue Dec 17, 2016

@mathpunk

This comment has been minimized.

Show comment
Hide comment
@mathpunk

mathpunk Dec 19, 2016

Contributor

I'm back to being unable to evaluate source blocks, and looking in my elpa directory, I don't even have an org-plus-contrib-***** directory to try this "delete the compiled files" workaround.

Contributor

mathpunk commented Dec 19, 2016

I'm back to being unable to evaluate source blocks, and looking in my elpa directory, I don't even have an org-plus-contrib-***** directory to try this "delete the compiled files" workaround.

@oneyb

This comment has been minimized.

Show comment
Hide comment
@oneyb

oneyb Jan 4, 2017

I report the same problem with the following purge sufficing as a workaround.

find ~/.emacs.d/elpa/org* -name "*elc" -delete

System Info 💻

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.200.5
  • Spacemacs branch: master (rev. 664ba6a)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(html vimscript auto-completion better-defaults emacs-lisp git lua
      (markdown :eval-after-load
                (auto-fill-mode 1)
                (spacemacs/toggle-auto-completion))
      pandoc
      (org :eval-after-load
           (auto-fill-mode 1)
           (spacemacs/toggle-auto-completion))
      (latex :variables latex-enable-auto-fill t :eval-after-load
             (auto-fill-mode 1)
             (spacemacs/toggle-auto-completion))
      shell-scripts syntax-checking
      (ess :variables ess-enable-smart-equals t)
      python csv)

oneyb commented Jan 4, 2017

I report the same problem with the following purge sufficing as a workaround.

find ~/.emacs.d/elpa/org* -name "*elc" -delete

System Info 💻

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.200.5
  • Spacemacs branch: master (rev. 664ba6a)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(html vimscript auto-completion better-defaults emacs-lisp git lua
      (markdown :eval-after-load
                (auto-fill-mode 1)
                (spacemacs/toggle-auto-completion))
      pandoc
      (org :eval-after-load
           (auto-fill-mode 1)
           (spacemacs/toggle-auto-completion))
      (latex :variables latex-enable-auto-fill t :eval-after-load
             (auto-fill-mode 1)
             (spacemacs/toggle-auto-completion))
      shell-scripts syntax-checking
      (ess :variables ess-enable-smart-equals t)
      python csv)
@xificurC

This comment has been minimized.

Show comment
Hide comment
@xificurC

xificurC Jan 5, 2017

Contributor

Quite interesting that rm -rf ~/.emacs.d/elpa and restart of spacemacs didn't solve this, but then a find ~/.emacs.d/elpa/org* -name "*elc" -delete solved it. It would seem the byte compilation messes something up?

Contributor

xificurC commented Jan 5, 2017

Quite interesting that rm -rf ~/.emacs.d/elpa and restart of spacemacs didn't solve this, but then a find ~/.emacs.d/elpa/org* -name "*elc" -delete solved it. It would seem the byte compilation messes something up?

@oneyb

This comment has been minimized.

Show comment
Hide comment
@oneyb

oneyb Jan 5, 2017

I think it's all related.
see #4618
specifically:
#4618 (comment)

I guess the broad removal of all byte-compiled files is overkill, but doesn't break anything (for me, yet).

My experience is that org-mode is a moving target and it happens to often that my org files won't compile/export to anything. I am annoyed but somehow still stick with org. It may be advisable for spacemacs to be specific about which version it uses, to keep things from breaking. Any further thoughts? How could I be specific about which version of org I install?

oneyb commented Jan 5, 2017

I think it's all related.
see #4618
specifically:
#4618 (comment)

I guess the broad removal of all byte-compiled files is overkill, but doesn't break anything (for me, yet).

My experience is that org-mode is a moving target and it happens to often that my org files won't compile/export to anything. I am annoyed but somehow still stick with org. It may be advisable for spacemacs to be specific about which version it uses, to keep things from breaking. Any further thoughts? How could I be specific about which version of org I install?

@RockyRoad29

This comment has been minimized.

Show comment
Hide comment
@RockyRoad29

RockyRoad29 Feb 22, 2017

After trying unsuccessfully to debug the faulty #'org-babel-confirm-evaluate I decided to compare myself the "old" code, i.e.
/usr/share/emacs/25.1/lisp/org/ob-core.el.gz and the new : ~/.emacs.d/elpa/org-plus-contrib-20170210/ob*.el:
I found these interesting:
image

So the key point is that the definitions used to be inline functions, which are hard to debug and to get rid of.

\o/ After recompiling specifically elpa/org-plus-contrib-20170210/ob-core.el ,
Org Babel evaluation works !

I still wonder why recompile-elpa didn't do the job.

RockyRoad29 commented Feb 22, 2017

After trying unsuccessfully to debug the faulty #'org-babel-confirm-evaluate I decided to compare myself the "old" code, i.e.
/usr/share/emacs/25.1/lisp/org/ob-core.el.gz and the new : ~/.emacs.d/elpa/org-plus-contrib-20170210/ob*.el:
I found these interesting:
image

So the key point is that the definitions used to be inline functions, which are hard to debug and to get rid of.

\o/ After recompiling specifically elpa/org-plus-contrib-20170210/ob-core.el ,
Org Babel evaluation works !

I still wonder why recompile-elpa didn't do the job.

@aang7

This comment has been minimized.

Show comment
Hide comment
@aang7

aang7 Feb 25, 2017

@RockyRoad29 Yiep! It works for me, thanks:)
PD: When I Update org-mode something breaks 🤕

aang7 commented Feb 25, 2017

@RockyRoad29 Yiep! It works for me, thanks:)
PD: When I Update org-mode something breaks 🤕

@Atraii

This comment has been minimized.

Show comment
Hide comment
@Atraii

Atraii Mar 22, 2017

I would like to add that after deleting the *.elc files and recompiling, the python and emacs-lisp babel packages work for me, but C and C++ do not still.

I am getting No org-babel-execute function for C++!

Any solution for this?

Atraii commented Mar 22, 2017

I would like to add that after deleting the *.elc files and recompiling, the python and emacs-lisp babel packages work for me, but C and C++ do not still.

I am getting No org-babel-execute function for C++!

Any solution for this?

@krux02

This comment has been minimized.

Show comment
Hide comment
@krux02

krux02 May 3, 2017

I just wanted to comment. I tried several things here. I don't know what is the right thing to do and what is the wrong thing to do. I have this problem, and I thing this bug should get highest priority.

krux02 commented May 3, 2017

I just wanted to comment. I tried several things here. I don't know what is the right thing to do and what is the wrong thing to do. I have this problem, and I thing this bug should get highest priority.

@aang7

This comment has been minimized.

Show comment
Hide comment
@aang7

aang7 May 5, 2017

@ Krux02 Yep! It's so stressful that something breaks down when we update emacs packages, primordially org.

aang7 commented May 5, 2017

@ Krux02 Yep! It's so stressful that something breaks down when we update emacs packages, primordially org.

@krux02

This comment has been minimized.

Show comment
Hide comment
@krux02

krux02 May 5, 2017

I just realized that this is the spacemacs issue tracker. I did not know that when I wrote that comment. I don't use spacemacs, and still I had this problem. I don't know if it helps to know that this problem is not just a spacemacs thing.

krux02 commented May 5, 2017

I just realized that this is the spacemacs issue tracker. I did not know that when I wrote that comment. I don't use spacemacs, and still I had this problem. I don't know if it helps to know that this problem is not just a spacemacs thing.

@agzam

This comment has been minimized.

Show comment
Hide comment
@agzam

agzam May 6, 2017

@krux02 then maybe you should switch to Spacemacs. Some users don't have that problem ;)

agzam commented May 6, 2017

@krux02 then maybe you should switch to Spacemacs. Some users don't have that problem ;)

@nickanderson

This comment has been minimized.

Show comment
Hide comment
@nickanderson

nickanderson May 11, 2017

Contributor

I had this again after wiping my elpa subdirectory.
This time purging ~/.emacs.d/elpa/org-plus-contrib-* and restarting emacs seemed to do the trick as noted in #7641 (comment) I hadn't made it down to #7641 (comment) which is probably more specific.

Contributor

nickanderson commented May 11, 2017

I had this again after wiping my elpa subdirectory.
This time purging ~/.emacs.d/elpa/org-plus-contrib-* and restarting emacs seemed to do the trick as noted in #7641 (comment) I hadn't made it down to #7641 (comment) which is probably more specific.

@frapples

This comment has been minimized.

Show comment
Hide comment
@frapples

frapples May 14, 2017

I suggest that after upgrading org-mode, recompile the .elc file:

:spacemacs/recompile-elpa

frapples commented May 14, 2017

I suggest that after upgrading org-mode, recompile the .elc file:

:spacemacs/recompile-elpa
@mathpunk

This comment has been minimized.

Show comment
Hide comment
@mathpunk

mathpunk May 15, 2017

Contributor

@frapples I am very happy that you've taught me this command exists; I've tried to force recompiling using deletions but this is better.

Contributor

mathpunk commented May 15, 2017

@frapples I am very happy that you've taught me this command exists; I've tried to force recompiling using deletions but this is better.

@localredhead

This comment has been minimized.

Show comment
Hide comment
@localredhead

localredhead Jun 12, 2017

@frapples that simple command did the trick for me. thanks!

localredhead commented Jun 12, 2017

@frapples that simple command did the trick for me. thanks!

@nickanderson

This comment has been minimized.

Show comment
Hide comment
@nickanderson

nickanderson Jun 19, 2017

Contributor

+1 @frapples that worked for me as well. Previously I was purging files under .emacs.d/elpa/. :spacemacs/recompile-elpa is cleaner.

Contributor

nickanderson commented Jun 19, 2017

+1 @frapples that worked for me as well. Previously I was purging files under .emacs.d/elpa/. :spacemacs/recompile-elpa is cleaner.

@duianto

This comment has been minimized.

Show comment
Hide comment
@duianto

duianto Jun 20, 2017

Contributor

@nickanderson The i and l in recompile got flipped to recomplie. You should probably fix that, so that someone else doesn't try the command and report that it doesn't work.

Contributor

duianto commented Jun 20, 2017

@nickanderson The i and l in recompile got flipped to recomplie. You should probably fix that, so that someone else doesn't try the command and report that it doesn't work.

@dabro

This comment has been minimized.

Show comment
Hide comment
@dabro

dabro Sep 25, 2017

None of these techniques work for me anymore. I've been through my spacemacs file multiple times looking for anything that could cause premature loading. The amount of time lost on this one bug is unbelievable.

dabro commented Sep 25, 2017

None of these techniques work for me anymore. I've been through my spacemacs file multiple times looking for anything that could cause premature loading. The amount of time lost on this one bug is unbelievable.

@Hellseher

This comment has been minimized.

Show comment
Hide comment
@Hellseher

Hellseher Sep 25, 2017

Recompilation of Elpa did work for me as well, after update of packages. It's worth to include to main functionality of updates.

Hellseher commented Sep 25, 2017

Recompilation of Elpa did work for me as well, after update of packages. It's worth to include to main functionality of updates.

@tekacs

This comment has been minimized.

Show comment
Hide comment
@tekacs

tekacs Oct 22, 2017

Contributor

spacemacs/recompile-elpa after updating packages worked for me too.

Contributor

tekacs commented Oct 22, 2017

spacemacs/recompile-elpa after updating packages worked for me too.

@dabro

This comment has been minimized.

Show comment
Hide comment
@dabro

dabro Oct 23, 2017

I've had a couple of successes since my last post deleting ob-core.elc and recompiling that one file.

dabro commented Oct 23, 2017

I've had a couple of successes since my last post deleting ob-core.elc and recompiling that one file.

@tonylotts

This comment has been minimized.

Show comment
Hide comment
@tonylotts

tonylotts Oct 26, 2017

Contributor

Let's get to the bottom of this and close it. @dabro, if the issue arises again, can you post specifics?

Fortunately spacemacs/recompile-elpa is documented under Troubleshoot in DOCUMENTATION.org. Perhaps it's worthwhile to call spacemacs/recompile-elpa from configuration-layer/update-packages. Another idea is to check the emacs version at startup, if it has changed, call spacemacs/recompile-elpa.

Final point, this is yet another upstream change that is biting us. It's a common pattern. There has been a lot of discussion around pinning specific package versions. Such functionality, either via melpa-stable or our own package mirror, would diminish this class of bug from affecting Spacemacs.

Contributor

tonylotts commented Oct 26, 2017

Let's get to the bottom of this and close it. @dabro, if the issue arises again, can you post specifics?

Fortunately spacemacs/recompile-elpa is documented under Troubleshoot in DOCUMENTATION.org. Perhaps it's worthwhile to call spacemacs/recompile-elpa from configuration-layer/update-packages. Another idea is to check the emacs version at startup, if it has changed, call spacemacs/recompile-elpa.

Final point, this is yet another upstream change that is biting us. It's a common pattern. There has been a lot of discussion around pinning specific package versions. Such functionality, either via melpa-stable or our own package mirror, would diminish this class of bug from affecting Spacemacs.

@costrouc

This comment has been minimized.

Show comment
Hide comment
@costrouc

costrouc Jan 17, 2018

I ran into this exact error and I was not using spacemacs. Strangely doing the refresh talked about in the comments worked... but only for that session. in my case this stemmed from ob-sh.el trying to call a function that no longer exists org-babel-get-header https://emacs.stackexchange.com/questions/37692/how-to-fix-symbols-function-definition-is-void-org-babel-get-header . Setting (sh . t) -> (shell . t) in my .emacs fixed my issue.

I am by no means an expert at emacs and lisp so this could be unrelated.

costrouc commented Jan 17, 2018

I ran into this exact error and I was not using spacemacs. Strangely doing the refresh talked about in the comments worked... but only for that session. in my case this stemmed from ob-sh.el trying to call a function that no longer exists org-babel-get-header https://emacs.stackexchange.com/questions/37692/how-to-fix-symbols-function-definition-is-void-org-babel-get-header . Setting (sh . t) -> (shell . t) in my .emacs fixed my issue.

I am by no means an expert at emacs and lisp so this could be unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment