gregsexton / gregsexton/ob-ipython

Python executable lookup fails with relative paths

Open
#113 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
742
Forks
107
PR merge metrics
No merged PRs in 30d

Description

These lines

https://github.com/gregsexton/ob-ipython/blob/a0ae4add0310d131c6b4b15139b929955cec93dd/ob-ipython.el#L169-L172

assume that python is somewhere on the system's executable path. I don't think this is a good idea, as e.g. on my NixOS system, this is not the case, and I want to specify an executable relative to the current file.

Note that the corresponding code which gets called for org-babel-python functionality adds the current directory to the lookup path before resolving the command (this is deep down in `comint.el`)

(let ((exec-path (if (and command (file-name-directory command))
;; If the command has slashes, make sure we
;; first look relative to the current directory.
(cons default-directory exec-path) exec-path)))

Since ob-ipython does not seem to travel that code path, I think it makes sense to copy that behavior.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.