scimax
scimax copied to clipboard
scimax-ob-ipython-complete-ivy does not suggest python object attributes
Consider the following org code
#+BEGIN_SRC ipython
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
#+END_SRC
#+RESULTS:
:RESULTS:
# Out[10]:
:END:
#+BEGIN_SRC ipython
x = np.arange(0, 2*np.pi)
plt.plot(x, np.cos(x))
#+END_SRC
#+RESULTS:
:RESULTS:
# Out[15]:
# text/plain
: [<matplotlib.lines.Line2D at 0x7f0dab0a2208>]
# image/png
[[file:obipy-resources/c4bff27bf1b13f13b356c09036fd753b-20257oEH.png]]
:END:
#+BEGIN_SRC ipython
np.ara
x.trans
#+END_SRC
I'm using scimax-ob-ipython-complete-ivy
for autocompletions. With the cursor at np.aran_ where _ denotes position of cursor, the completion correctly displays the suggestion arange. But with the cursor at x.trans_, no suggestions are displayed. I expect the suggestions to display transpose.
Also oddly enough, using ob-ipython-completions
instead of scimax-ob-ipython-complete-ivy
does not work for me.
Installation Details: Ubuntu 18.04
UPDATE: Calling company-ob-ipython
does work for both these cases although is a bit slower which as I read more seems to be a nagging issue for most.
I can't reproduce this on my end (Mac). scimax-ob-ipython-complete-ivy acts as expected in both those last cases for me, and shows x.transpose.
ob-ipython-completions does not work for me. I guess it is why I wrote the scimax version.
company-ob-ipython also works with company-mode enabled. I don't recall off the top of my head why this is slower. They are both defined in scimax and work on basically the same output from the jupyter kernel. It is not obvious why one would have options the other doesn't.
Correction: Both of the above mentioned cases work after invoking (org-edit-special) (C-c ')
but if I am in my org file, then only the first case works but not the second. Is this consistent with the behaviour observed on a mac?
I thought everything was working as expected, but as I play more with it, I am no longer convinced. Somethings work sometimes, and then they don't. I have to give a final exam tomorrow, and then grade it, so it could be later this week before I figure it out. Completion and inspection are important features to get to work, so I will definitely get back to this.