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

"wrong type arguments: stringp sh" #203

Open
cheremin opened this issue Feb 7, 2019 · 1 comment
Open

"wrong type arguments: stringp sh" #203

cheremin opened this issue Feb 7, 2019 · 1 comment

Comments

@cheremin
Copy link

cheremin commented Feb 7, 2019

I'm using ob-ipython-20180224.953, and I've seen this error ("wrong type arguments: stringp sh") while doing something completely unrelated to ipython. I've traced it, and it ends up in the following code:

(defun ob-ipython--configure-kernel (kernel-lang)
  "Configure org mode to use specified kernel."
  (let* ((kernel (car kernel-lang))
         (language (cdr kernel-lang))
         (jupyter-lang (concat "jupyter-" language))
         (mode (intern (or  (cdr (assoc language org-src-lang-modes))
                           (replace-regexp-in-string "[0-9]*" "" language))))
         (header-args (intern (concat "org-babel-default-header-args:" jupyter-lang))))
...

It seems like most kernel names are like "Julia-0.6", and not directly found in org-src-lang-modes, thus their names are going through (replace-regexp-in-string ...) branch. But in my case I has kernel "bash", installed in my jupyter, and this kernel name is as-is present in org-src-lang-modes. And here is the catch: this map contains languages as symbols not strings, but intern expect string, not symbol.

Personally, I've fixed it in my copy by just add (symbol-name ..) call around (cdr (assoc language org-src-lang-modes)). Probably, even better solution would be to move (intern ..) to be only around (replace-regexp-in-string ...), since it is not needed in first branch.

@vv111y
Copy link

vv111y commented May 29, 2019

same issue except instead of sh it is c++. The error prevents ediff-current-file from working for an orgmode buffer.

Your hack worked, thank you.

Further though, this package seems to be abandoned #202 , so I think I will remove it altogether in favour of emacs-jupyter

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