millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 122 forks source link

ein:company-backend does not complete relative paths correctly #224

Closed LordZorgoth closed 5 years ago

LordZorgoth commented 7 years ago

Check list

Description of the problem you have

ein:company-backend fails to properly complete relative paths. See "Steps to reproduce the problem" for details.

Steps to reproduce the problem

  1. Create a directory ~/foodir and a file ~/foodir/barfile

  2. Start an IPython notebook, and if necessary, navigate to ~

  3. Enable company completion. To do this, turn on company mode with M-x company-mode and ensure that we are using the python3 kernel. Further add ein:company-backend to the list of company backends using customize. (alternatively, you could just use M-x ein:company-backend in place of TAB in steps 4 and 5)

  4. In the input prompt, type foo, then hit TAB. If company mode has been enabled correctly, and you have no other directories or files beginning with ~/foo, you should get foodir/. This behavior is correct.

  5. Now type bar, then hit TAB. Company will give you foodir/foodir/barfile. This is obviously not correct.

  6. Note that this bug does not occur if you prepend the path with a ~/ or ./.

Expected output

Your EIN configuration (in .emacs.d/init.el or somewhere else)

Your IPython configuration

  1. What is your IPython version? (run ipython --version): 6.1.0

  2. How do you start IPython? (e.g., ipython notebook --port 9999): jupyter notebook --port 9999

  3. What is your IPython notebook port number or URL?: 9999

Additional information (if any)

System info:

("EIN system info"
 :emacs-version
 "GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21)
 of 2017-05-22"
 :emacs-bzr-version nil
 :window-system mac
 :emacs-variant nil
 :os
 (:uname
  "Darwin Jonathans-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
"
  :lsb-release nil)
 :image-types
 (svg image-io imagemagick png gif tiff jpeg xpm xbm pbm)
 :image-types-available
 (svg image-io imagemagick png gif tiff jpeg xpm xbm pbm)
 :request
 (:backend curl)
 :ein
 (:version "0.13.0"
       :source-dir "/Users/jonathan/.emacs.d/elpa/ein-20170616.1117/")
 :lib
 ((:name "websocket"
     :path "~/.emacs.d/elpa/websocket-20170610.2117/websocket.elc"
     :featurep t
     :version-var websocket-version
     :version "1.5")
  (:name "request"
     :path "~/.emacs.d/elpa/request-20170131.1747/request.elc"
     :featurep t
     :version-var request-version
     :version "0.3.0")
  (:name "auto-complete"
     :path "~/.emacs.d/elpa/auto-complete-20170124.1845/auto-complete.elc"
     :featurep nil
     :version-var nil
     :version nil)
  (:name "auto-complete"
     :path "~/.emacs.d/elpa/auto-complete-20170124.1845/auto-complete.elc"
     :featurep nil
     :version-var nil
     :version nil)
  (:name "popup"
     :path "~/.emacs.d/elpa/popup-20160709.729/popup.elc"
     :featurep nil
     :version-var nil
     :version nil)
  (:name "python"
     :path "/Applications/Emacs.app/Contents/Resources/lisp/progmodes/python.elc"
     :featurep t
     :version-var nil
     :version nil)))
millejoh commented 7 years ago

Yep, that is definitely happening, but it almost seems to be an issue with company-mode. I think it may have something to do with the setting of company-auto-complete-chars, but I need to play around a bit to be sure.

millejoh commented 5 years ago

company-mode support is in a much better place now; so far I don't seem to see this issue anymore. Closing this one out.