gregsexton / gregsexton/ob-ipython

Potential feature improvements

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

Description

Hi,

I've been using ob-ipython for a few weeks now and I'm really loving it! Thanks a ton for this package. As I've adapted my workflow to it, which oftentimes includes connecting to a remote kernel, I've stumbled on a few kinks that I've managed to iron out and I'm curious if you'd find some of these additions valuable, for which I'm happy to submit pull requests:

- On occasion, I may start an inferior python process outside of org, which gets assigned a name like *Python* and which I'd like to keep running . If I then start a REPL from org with the default session, it starts the kernel but not a new inferior process because one's already running. Unfortunately, that process does not get connected to the new ipython kernel. The workaround here is to have all REPL created by ob-ipython to have names like *Python:ob-ipython:* to keep them distinct from python processes started via other means.
- When I'm in an ipython src edit buffer (C-c ' ), sometimes I find it convenient to send code directly from this buffer to the underlying python process, but we need to know which python process to send the code to. Org-babel allows for functions of the form org-babel-edit-prep: which, in this case, can be used to locally set python-shell-buffer-name to the correct python buffer (made less ambiguous by the naming convention adopted above).
- The company-ob-ipython backend works quite slowly for me in general, and really really slowly when I'm connected to a remote kernel. I've found through some mucking around that the prefix function is one of the major culprits here, and if instead of farming out the prefix computation to the kernel we instead adopt an approach like in company-anaconda (https://github.com/proofit404/company-anaconda/blob/master/company-anaconda.el#L84), everything works much faster, and is definitely usable even with remote connections.
- Last, when connected to a remote kernel, the inferior python process is unable to obtain completions (python.el, which is responsible for completions in shell mode, doesn't handle remote kernels). I've managed to extend company-ob-ipython to work in inferior-python-mode.

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.