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

Can't use R in babel #4618

Closed
maxigit opened this issue Jan 14, 2016 · 17 comments
Closed

Can't use R in babel #4618

maxigit opened this issue Jan 14, 2016 · 17 comments
Labels
- Bug tracker - Org stale marked as a stale issue/pr (usually by a bot)

Comments

@maxigit
Copy link
Contributor

maxigit commented Jan 14, 2016

I'm trying to use R and babel and I get the following error message :

Error in dotspacemacs/user-config: Invalid function: org-babel-header-args-safe-fn

I only get this error message when I add (R . t) in the orb-babel-do-load-languages section. If I use python or ruby it works fine.

@tboby
Copy link
Contributor

tboby commented Jan 14, 2016

Try deleting the Org and org-plus-contrib packages from spacemacs/elpa/.

It's possible this is due to a conflict with the different versions of org, although I'm not quite sure how it happens in the first place.

@Andre0991
Copy link
Contributor

Have a look at "Important Note" in the org layer docs, it might have to do with that too.

Basically, you have to wrap everything that is related to org in (with-eval-after-load 'org ...)

@maxigit
Copy link
Contributor Author

maxigit commented Jan 15, 2016

I suppose so. Everything but R works. Also I get spacemacs updates and
everything. But I can double check, how can I do that ?

On 14 January 2016 at 22:18, tboby notifications@github.com wrote:

Are you sure you have git on your path?


Reply to this email directly or view it on GitHub
#4618 (comment)
.

@maxigit
Copy link
Contributor Author

maxigit commented Jan 15, 2016

It is in the right section. I can get other language work (sql, python,
ruby etc ...). Only R causes this error ...

On 15 January 2016 at 09:23, bmx007 bmx007@gmail.com wrote:

I suppose so. Everything but R works. Also I get spacemacs updates and
everything. But I can double check, how can I do that ?

On 14 January 2016 at 22:18, tboby notifications@github.com wrote:

Are you sure you have git on your path?


Reply to this email directly or view it on GitHub
#4618 (comment)
.

@maxigit
Copy link
Contributor Author

maxigit commented Jan 16, 2016

I upgraded to 0.105.8 and updated all the packages and know it's workingi :-)

@maxigit maxigit closed this as completed Jan 16, 2016
@maxigit
Copy link
Contributor Author

maxigit commented Jan 19, 2016

I had the problem again (after upgrading to 0.105.9) the solution was to clear the elpa subdirectory.

@maxigit maxigit reopened this Jan 19, 2016
@izahn
Copy link
Contributor

izahn commented Jan 27, 2016

This is an upstream bug in org-mode, see http://comments.gmane.org/gmane.emacs.orgmode/99644 and https://www.mail-archive.com/emacs-orgmode@gnu.org/msg98762.html. I think this issue should be closed and an upstream bug reported to org-mode.

@cpaulik
Copy link
Contributor

cpaulik commented Jul 13, 2016

Just had the same issue. Removing ob-R.elc fixed it.

@GregorySchwartz
Copy link

I have this issue and no amount of recompiling, restarting, removing org-* folders, or anything of that sort work. The only solution for me is to remove R . t from my configuration, but then I can't use R in babel. Is there some other solution?

@TheBB
Copy link
Collaborator

TheBB commented Sep 8, 2016

@GregorySchwartz The solution of @cpaulik should work. Remove only the file ob-R.elc.

I don't know for sure but I assume this happens because ob-R.elc is byte-compiled with the old version of org.

@GregorySchwartz
Copy link

@TheBB Unfortunately that solution did not work for me. I should mention that these techniques of removal did work a few weeks ago--this just started happening.

@izahn
Copy link
Contributor

izahn commented Sep 9, 2016

It usually happens in spacemacs that you end up with both org and org-plus-contrib package, making it harder to know where the broken ob-R.elc file is. Start package manager with M-x paradox, delete org and org-plus-contrib, then install only prg-plus-contrib. This usually works for me.

@syl20bnr
Copy link
Owner

syl20bnr commented Sep 9, 2016

@izahn do you think we can automate these steps in Spacemacs to have a clean org installation ?

Also moving org to :step pre would ensure that the above steps are executed prior to other packages configuration.

EDIT: never mind this issue is at installation time, right now packages are all installed in alphabetical order. Maybe taking into account the :step keyword for installation as well could solve the issue.

@izahn
Copy link
Contributor

izahn commented Sep 9, 2016

I think the right thing is to fix this in upstream org-mode. I'm super busy now but I will look into it when I get a free moment.

@GregorySchwartz
Copy link

@izahn That solution using paradox worked. It must be because deleteing just org-plus-contrib or both org and that package repeated installs, but with your way it works.

@bmag
Copy link
Collaborator

bmag commented Dec 10, 2016

Just adding two links to (slightly) better understand possible problem in compiling packages during installation of new packages:

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Bug tracker - Org stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

10 participants