Code Monkey home page Code Monkey logo

anaconda-mode's Introduction

Anaconda mode MELPA MELPA Stable

CI

Code navigation, documentation lookup and completion for Python.

Completion screenshot

Reference search screenshot

Features

Anaconda mode provides the following features

  • context-sensitive code completion
  • jump to definitions
  • find references
  • view documentation
  • virtual environment
  • eldoc mode
  • all this stuff inside vagrant, docker and remote hosts

Supported Python Versions

2.7, 3.4 - 3.12

Installation

To use this package you need to install setuptools.

package.el

All you need to do is install the package from Melpa

M-x package-install RET anaconda-mode RET

Manual

Clone this repository somewhere and add this directory to your load-path.

Prelude

anaconda-mode is included in the Emacs Prelude distribution. You can use it as well. Look at the prelude-python module to see more details.

Spacemacs

anaconda-mode is included in the Spacemacs distribution. You can use it as well. Look at the python language layer to see more details.

Configuration

You can automatically enable anaconda-mode in all python buffers with following code in your configuration:

(add-hook 'python-mode-hook 'anaconda-mode)

ElDoc

anaconda-eldoc-mode provide document function to eldoc-mode so when your point is between the parenthesis of a function call, its parameters are shown in the echo area. All You need is to enable anaconda-eldoc-mode in addition to the previous setup.

(add-hook 'python-mode-hook 'anaconda-eldoc-mode)

Usage

To start a completion press C-M-i. This is the standard emacs binding for complete-at-point function. You can use company-mode with company-anaconda backend to get more intelligent UI.

Interactive commands

Here is a list of interactive commands available with anaconda-mode

Keybinding Description
C-M-i anaconda-mode-complete
M-. anaconda-mode-find-definitions
C-x 4 . anaconda-mode-find-definitions-other-window
C-x 5 . anaconda-mode-find-definitions-other-frame
M-= anaconda-mode-find-assignments
C-x 4 = anaconda-mode-find-assignments-other-window
C-x 5 = anaconda-mode-find-assignments-other-frame
M-r anaconda-mode-find-references
C-x 4 r anaconda-mode-find-references-other-window
C-x 5 r anaconda-mode-find-references-other-frame
M-, xref-pop-marker-stack
M-? anaconda-mode-show-doc

If multiple candidates are found for definitions, assignments or usages, you'll see an advanced anaconda navigator buffer.

PYTHONPATH

You can add your project to the Emacs PYTHONPATH. If you store project dependencies somewhere on your machine, you can add them as well.

(add-to-list 'python-shell-extra-pythonpaths "/path/to/the/project")
(add-to-list 'python-shell-extra-pythonpaths "/path/to/the/dependency")

Virtual environment

Use a virtual environment to isolate your project dependencies from others on the system. You can additionally install your project in an editable mode in the virtual environment. This will improve search functionality. Then activate this virtual environment inside Emacs.

M-x pythonic-activate RET /path/to/virtualenv RET

Also you can use pyenv-mode or similar package to hold virtual environment in actual state.

Each action above applies to anaconda-mode immediately. The next anaconda-mode command you call will use this environment for search completion candidates.

Tramp

It's possible to use anaconda-mode on a remote server when you connect to it using tramp. Anaconda-mode can search for completion candidates and all other stuff on remote server while you're running Emacs locally. Just open an interesting remote file.

C-x C-f /ssh:remote_host:project/__init__.py RET

After tramp successfully connects and you see actual buffer content, completion and definitions search should work as usual. You can even use virtual environment from remote host.

M-x pythonic-activate RET /ssh:remote_host:/home/user/venv RET

Or specify another remote interpreter

(setq python-shell-interpreter "/usr/bin/python")

It is important to remember that remote_host must be a real host name or an IP address. SSH aliases not allowed to be used with anaconda-mode. All kinds of searching from inside the virtual environment are available from any buffer. However searching inside your project is available only if you open it on the same machine as the interpreter.

Vagrant

You can get all the intelligent features of anaconda-mode with virtual environments deployed on your vagrant box. Fire up the vagrant machine as usual. The easiest way to handle authentication is to copy your public ssh key to the vagrant box.

ssh-copy-id vagrant@localhost -p 2222

Now open your project inside the vagrant box.

C-x C-f /ssh:vagrant@localhost#2222:/vagrant/polls/views.py

Optionally you can activate your project environment, if installed inside vagrant.

M-x pythonic-activate RET /ssh:vagrant@localhost#2222:/vagrant/polls/venv RET

Docker

You can use definition, reference and auto-completion search for dependencies installed in the Docker container. Let suppose your project layout is the same as in Compose and Django tutorial. To use anaconda-mode together with Docker you need to install two additional external dependencies. First of all, you need to install docker-tramp Emacs package. The second step is to install Unix socat utility. You should have your containers up and running

docker-compose up web

After that, you can set Python interpreter to one installed inside container

(setq python-shell-interpreter "/usr/local/bin/python")

Now you can open some file inside the project running inside a container

C-x C-f /docker:root@django_web_1:/code/manage.py

If you try to find the definition of the Django module imported in this buffer, anaconda-mode will jump to the package installed inside this Docker container.

FAQ

If you see constant response reading error, try to change localhost address from default 127.0.0.1 to localhost. This is likely to fix problems on Mac OS.

(setq anaconda-mode-localhost-address "localhost")

Bug Reports

Please attach *anaconda-mode*, *anaconda-response* and *anaconda-socat* buffer content to every created issue.

Thanks

  • Dmitry Gutov @dgutov
  • Bo Lin @sadboy
  • Vasilij Schneidermann @wasamasa
  • Fredrik Bergroth @fbergroth
  • Fabio Corneti @fabiocorneti
  • Tom Davis @tdavis
  • Sviridov Alexander @sviridov
  • Mario Rodas @marsam

anaconda-mode's People

Contributors

biscanli avatar celeritascelery avatar cjauvin avatar cthesky avatar dakra avatar dalanicolai avatar dgutov avatar fabiocorneti avatar falloutphil avatar fbergroth avatar gergelypolonkai avatar jabranham avatar jcs090218 avatar mineo avatar pitkali avatar proofit404 avatar richyliu avatar schmir avatar shanavas786 avatar sviridov avatar swsnr avatar syohex avatar tdavis avatar terrytsao avatar timlod avatar valignatev avatar watkurem avatar wilfred avatar wohanley avatar y-usuzumi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anaconda-mode's Issues

Make clear that either python-json-rpc or pip should be installed

When i decided to try this package out today, I ran into a little bit of trouble. Wasn't until I removed the filter on the server in the elisp file I understood that the problem was I didn't have pip or python-json-rpc installed.

Perhaps python-json-rpc could be pointed out as a dependency on the front page (and also the pip-behavior)?

use python-shell-interpreter as python executable.

In anaconda-mode-python, python executable is hardcoded as "python" . This is not convinient, especially when you have python3 and python2 installed at the same time. I think it will be better if you change it to use python-shell-interpreter.
Anyway, thank you for this great mode. I like it.

Compiler-macro error for python-syntax-context

As requested in 984050a#commitcomment-9329398, here is the traceback when I edit (triggering completion) a Python file.

Debugger entered--Lisp error: (error "Completion needs an inferior Python process running")
  signal(error ("Completion needs an inferior Python process running"))
  error("Completion needs an inferior Python process running")
  python-completion-complete-at-point()
  completion--capf-wrapper(python-completion-complete-at-point optimist)
  run-hook-wrapped(completion--capf-wrapper python-completion-complete-at-point optimist)
  company--capf-data-real()
  company--capf-data()
  company-capf(prefix)
  #[0 "\n\203   \nC\202\n�\211\205\245\211@\300�9\204�\306�!\203<�9\2036�\307N\310=\2046�\307N?\205@\311�!\205@�\312!\202@\313�\312\"\240\210\300\242\203\236\314\300\242!\203\230\315\300\242!�\211�\301\316\f!\240\210\301\242:\204l
\203\230\317\320!\210\202\230
\203t\300\242��\2119\203\203\321\322�!P��\202\211\323\301\242@!\210\324\301\242!\210\325\326\327 \"\210\330\331!\210\332\333\301\242\"\210�A\266\202\202\n\207" [(nil) (nil) company-backend company-backends company-prefix company--manual-action functionp company-init t company-init-backend prefix company--multi-backend-adapter company--good-prefix-p company--prefix-str company-calculate-candidates message "No completion found" " " symbol-name company--update-group-lighter company-update-candidates run-hook-with-args company-completion-started-hook company-explicit-action-p company-call-frontends show throw --cl-block-nil-- company--manual-prefix company-lighter] 6 "\n\n(fn)"]()
  funcall(#[0 "\n\203   \nC\202\n�\211\205\245\211@\300�9\204�\306�!\203<�9\2036�\307N\310=\2046�\307N?\205@\311�!\205@�\312!\202@\313�\312\"\240\210\300\242\203\236\314\300\242!\203\230\315\300\242!�\211�\301\316\f!\240\210\301\242:\204l
\203\230\317\320!\210\202\230
\203t\300\242��\2119\203\203\321\322�!P��\202\211\323\301\242@!\210\324\301\242!\210\325\326\327 \"\210\330\331!\210\332\333\301\242\"\210�A\266\202\202\n\207" [(nil) (nil) company-backend company-backends company-prefix company--manual-action functionp company-init t company-init-backend prefix company--multi-backend-adapter company--good-prefix-p company--prefix-str company-calculate-candidates message "No completion found" " " symbol-name company--update-group-lighter company-update-candidates run-hook-with-args company-completion-started-hook company-explicit-action-p company-call-frontends show throw --cl-block-nil-- company--manual-prefix company-lighter] 6 "\n\n(fn)"])
  company--begin-new()
  company--perform()
  #[0 "\301 \210�\207" [company-candidates company--perform] 1 "\n\n(fn)"]()
  funcall(#[0 "\301 \210�\207" [company-candidates company--perform] 1 "\n\n(fn)"])
  company-auto-begin()
  company-idle-begin(#<buffer api.py> #<window 8 on api.py> 756 814)
  apply(company-idle-begin (#<buffer api.py> #<window 8 on api.py> 756 814))
  byte-code("r\301�\302H�\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 21691 56161 440532 nil company-idle-begin (#<buffer api.py> #<window 8 on api.py> 756 814) nil 0])

Additionally, as I enter the Python file I have this message:

Compiler-macro error for python-syntax-context: (void-function python-syntax--context-compiler-macro) [2 times]

Thanks : )

http_proxy env variable causing issues with company-anaconda completion

Hey I have my http_proxy envs set which seems to be causing issues with completion

Using a proxy for http...                                                                        
Making url-show-status local to  *http 127.0.0.1:3128* while let-bound!                          
anaconda-mode-view-doc: Can't find documentation                                                 
Missing module docstring (C0111)                                                                 
Beginning of buffer [2 times]                                                                    
Mark set                                                                                         
Company: An error occurred in auto-begin                                                         
Company: Back-end company-anaconda error "End of file during parsing" with args (candidates fire)
Company: An error occurred in auto-begin                                                         
Company: Back-end company-anaconda error "End of file during parsing" with args (candidates fire)
Making completion list...                                                                        

Introduse contrib system.

There are following contib extensions planing by default in 0.2.0 version:

  • anaconda-mode-company-mode (company mode will be extension due to project renaming)
  • anaconda-mode-helm-mode (add automatically if helm available)
  • anaconda-mode-imenu-mode

Adding libraries

One little question. I'm using company-anaconda mode. And I'm getting some completions really good.
For example for:

import numpy as np
np.

After the . I'm getting good completions. But with some other libraries I don't. I'm sure that it's because of the libraries being loaded and the default paths. How can I add more paths for this usage?
Or is it a company-anaconda question?

Can't install it from melpa, windows

Trying to install this package from MELPA, emacs version: GNU Emacs 24.3.1 (i386-mingw-nt6.1.7600)

Compile log:

Leaving directory `c:/Users/dmishin/AppData/Roaming/.emacs.d/elpa/anaconda-mode-20140327.142'

Compiling file c:/Users/dmishin/AppData/Roaming/.emacs.d/elpa/anaconda-mode-20140327.142/anaconda-eldoc.el at Thu Mar 27 13:32:33 2014
Entering directory `c:/Users/dmishin/AppData/Roaming/.emacs.d/elpa/anaconda-mode-20140327.142/'

Compiling file c:/Users/dmishin/AppData/Roaming/.emacs.d/elpa/anaconda-mode-20140327.142/anaconda-mode-pkg.el at Thu Mar 27 13:32:33 2014

Compiling file c:/Users/dmishin/AppData/Roaming/.emacs.d/elpa/anaconda-mode-20140327.142/anaconda-mode.el at Thu Mar 27 13:32:33 2014

In anaconda-mode-do-request:
anaconda-mode.el:109:26:Warning: reference to free variable
    `url-http-response-status'

Compiling file c:/Users/dmishin/AppData/Roaming/.emacs.d/elpa/anaconda-mode-20140327.142/company-anaconda.el at Thu Mar 27 13:32:33 2014
company-anaconda.el:26:1:Error: Cannot open load file: company

cask integration

Hello,
I have a jedi-mode, autocomplete, projectile setup right now.
And I want to change it to anaconda-mode, company-mode, projectile.
When I checked the code I saw that anaconda-mode has hardcoded integration to cask. But I want to use projectile instead. Is it possible to use projectile with anaconda-mode? I want to start anaconda server on projectile project root. So goto-source commands would work right.
Here is how I change the root in my current setup.
https://github.com/huseyinyilmaz/emacs-config/blob/master/lisp/user-init-jedi.el#L52-L56

Vagrant and Tramp support.

So remote autocomplete is really cool and I plan to add it to anaconda-mode. So this is check list to implement this feature.

  • this feature considered to be enable if anaconda-mode-host set to 'vagrant symbol or doesn't set to loop back interface
  • start anaconda-mode server with ssh tunnel
  • check that anaconda mode alive by checking ssh connection
  • in case of tramp buffers translate filename to local file name of remote machine

How to append `sys.path` to enable search modules in other place?

Hi, thanks for this great and simple plugin.

I am developing some private modules in emacs with anaconda-mode. I want anaconda to aware of the modules I am developing.
I need to edit sys.path to inform anaconda about this module, is there a configuration to allow me do that?

Best,

Start anaconda_mode server synchronously.

Few first requests will always fail due to server initialization lag. Server must be started synchronously with emacs. Protect anaconda-mode-call with and function. This'll allow don't perform rpc calls on broken nodes.

Lookup definition by typing the name

Hello - goto definition works great. I just can't figure this out, but how would I lookup a definition by searching for it by typing the name ? maybe integrated with helm.

In Atom or Sublime its easy to do cmd-shift-R, lookup the class name and go straight to the definition.

I've made an etags file for emacs, but its matching imports and usages. When I search in helm it doesn't know where the class def itself is.

Obviously jedi knows where the class def is (because goto definition works correctly)

So is this a command that anaconda-mode should implement ? Or should I look more at helm ?

Thanks for your help and for the package.

Assertion of jedi version fails

Since now anaconda use pip to install jedi, using assert to check version of jedi and jsonrpc may fail on some systems. In my case, I use mac os x, and pip1.5.6, my jedi version is "0.8.1-final10". This causes error in anaconda_mode.py.
I fixed it on my computer by modify line 37 of anaconda_mode.py:

assert jedi.__version__ == '0.8.1-final0', 'Jedi version does not match 0.8.1'

But obviously this is not a good solution.
Please fix this. Thanks.

company-jedi-candidates returns nil

I've downloaded and installed company-jedi with cask and MELPA, running Emacs 24.3 on Arch Linux. Because I already have jedi installed for python3, I've used (setq company-jedi-bin "python3") before loading company-jedi with (require 'company-jedi). I switch to a sample python file looking like this (| is point):

def main():
    pas|

if __name__ == '__main__':
    main()

I start the company-jedi-process with (company-jedi-start). No complaints there. htop tells me it's running. I execute (company-jedi-candidates) and it returns nil. I do a counter-check by opening a python3 instance and making a sample request with the requests module, using the output pasted from (company-jedi-request-json "candidates"):

>>> import requests
>>> requests.post('http://localhost:24970', data="{\"command\":\"candidates\", \"attributes\":{\"source\":\"def main():\\n    pas\\n\\nif __name__ == '__main__':\\n    main()\\n\", \"line\":2, \"column\":7, \"point\":19, \"path\":\"\\/home\\/wasa\\/tmp\\/complete.py\", \"company_prefix\":\"\", \"company_arg\":\"\"}}").text
'["pass"]'

That proves the server is running and is able to return the correct response. I suspect something goes wrong when doing the POST request, simply because (with-current-buffer (company-jedi-retrive (company-jedi-request-json "candidates")) (buffer-string)) returns an empty string. Could you investigate this?

HTTP server should bind to '127.0.0.1' by default

Starting the HTTP server on '0.0.0.0' is a security concern for those running on a machine without a properly configured firewall. This fix changes default ip interface to 'localhost', and allow override from command line by '--ip' option.

diff --git a/company-jedi.el b/company-jedi.el
index 6620529..2014eb8 100644
--- a/company-jedi.el
+++ b/company-jedi.el
@@ -64,6 +64,7 @@
   (mapconcat 'identity
              (list company-jedi-python-bin "-m" "start_jedi"
                    "--port" (number-to-string company-jedi-port)
+                   "--ip" company-jedi-host
                    (when company-jedi-debug "--debug"))
              " ")
   "Command to run start_jedi server.")
diff --git a/start_jedi/__init__.py b/start_jedi/__init__.py
index c028e80..02e1b87 100644
--- a/start_jedi/__init__.py
+++ b/start_jedi/__init__.py
@@ -2,10 +2,10 @@ import start_jedi.httpd
 import start_jedi.cli


-def run(port):
+def run(port, ip='127.0.0.1'):
     """Run jedi server."""

-    address = ('', port)
+    address = (ip, port)

     handler = start_jedi.httpd.JediHandler

diff --git a/start_jedi/__main__.py b/start_jedi/__main__.py
index 1ae2b6c..988db8e 100644
--- a/start_jedi/__main__.py
+++ b/start_jedi/__main__.py
@@ -22,4 +22,4 @@ if args.debug:
     logger.addHandler(handler)


-start_jedi.run(args.port)
+start_jedi.run(args.port, args.ip)
diff --git a/start_jedi/cli.py b/start_jedi/cli.py
index 1d8ea3b..97347a6 100644
--- a/start_jedi/cli.py
+++ b/start_jedi/cli.py
@@ -10,6 +10,8 @@ def args():
     parser.add_argument('-d', '--debug', action='store_true',
                         help='enable debug logging')

+    parser.add_argument('-i', '--ip', type=str, default='localhost',
+                        help='server IP')
     parser.add_argument('-p', '--port', type=int, default=8000,
                         help='server port number')

Receive server error when finding completions

I'm using company-anaconda, though I don't think it's related to that package. Here's the JSON-RPC error that Company gets back:

JSON-RPC error condition: :data, (:type "AttributeError\" :args ("'FakeStatement' object has no attribute 'path'") :message "'FakeStatement' object has no attribute 'path'"), :code, -32000, :message, "Server error"" with args (candidates )"))

Jumps and navigation

Jedi provides goto_definitions, goto_assignments and usages that each returns a list of definitions. I think we need a mode for navigating such a list. Below is the usages of script_method. Definitions are grouped by module, inspired by occur.

2014-05-27-130628_477x589_scrot

You navigate up and down with n and p, and a preview is shown in other-window. If you press enter or click a row, you jump to that location. When you jump, the current position is pushed to a stack so that you are able to navigate back.

goto_definitions and goto_assignments should immediately jump if there is just 1 candidate. M-. should be bound to goto_definitions, and we can have another key for goto_assignments. I don't think goto_definitions and goto_assignments should be mixed.

What do you think @proofit404, is this a good idea? I have implemented some parts of this.

Goto definition in new window/frame functions.

Rebind find-tag-other-window and find-tag-other-frame to equivalent commands go to definition and find reference functionality. Read definition name from package module to specified method if no symbol at point available or C-u given. This behaviour must be provided in anaconda-mode-view-doc function too.

Drop inferrior-python-mode support.

For provide interpreter support we must obtain local() namespace from it. This require extra interaction with inferior process similar to slime. This is out of anaconda-mode aims.

Avoid asking "active process exist" question when exiting emacs

Hi,

I just want to know if there a way to avoid the "active process exist; kill then and exit anyway?" when I close Emacs and there is the running process python anaconda_mode.py. If it's possible to configure it, do you know how I can do? If not, do you think it's possible to slightly modify the code?

I quickly tried jedi and there is no such message. I switch to anaconda because I replace auto-complete to company and jedi depends on auto-complete.

Thanks,
Damien

What do I need to do to install Anconda-mode and how do I tell that I've succeeded

Hi--

I've been playing around for an hour with anaconda-mode, but I can't seem to get it to work.

I've installed the json-rpc and jedi from pip. I didn't get a specific version like in the req file, I just used pip install jedi etc. I've installed anaconda-mode and pyenv-mode from melpa and added the following to my .emacs:

;;trying to get anaconda-mode to work
(pyenv-mode)
(add-hook 'python-mode-hook 'anaconda-mode)

I now have a json-rpc process running in the background and I can choose stuff like anaconda-mode when I press M-x. Still the various anaconda-mode options do not seem to do anything and I do not get any autocompletions.

Can you tell what I am doing wrong? Have I missed any crucial steps? Perhaps I also need the jedi.el package?

(And it might be nice for other newbs if you added some minimal steps needed to install conda mode and what you should expect to see if you have installed it correctly. Seems like a really useful package this, would be a shame if people are prevented from using due to it being slightly hard to install.)

company-jedi-work-on command

Define company-jedi-work-on, company-jedi-deactivate and company-jedi-virtualenv commands in emacs lisp side. This commands will use /virtualenv/ resource of start_jedi api. After activation of some virtualenv its name appears in the mode line after vc branch name. Something like Env:django-env. Ask user to switch virtualenv automatically if current file changes on the disk. This happens mostly on switching vcs branch and many projects use different virtualenvs in different branches.

Rename project to anaconda-mode.

Add following sections to README:

  • customization section with code snippets for users configs
  • explain keybindings
  • real world example for django project with branch switching
  • how its work

import jsonrpc failed

Hello,
I was having some problems with the installation and in the end I tried a simple command python anaconda_mode.py for which I got the following result:

$ python  anaconda_mode.py
Traceback (most recent call last):
  File "/home/atlas/.emacs.d/elisp/anaconda-mode/anaconda_mode.py", line 2, in <module>
    from jsonrpc import dispatcher, JSONRPCResponseManager
ImportError: cannot import name dispatcher

I just installed jsonrpc with sudo pip install jsonrpc. Have you any idea what the problem could be?

Blocking call to accept-process-output with quit inhibited

I've had this issue recently after updating anaconda-mode from melpa. My emacs hung when company-mode tries to auto complete with anaconda, and I see message as following in minibar.

Blocking call to accept-process-output with quit inhibited.

I guess this is a regression as I saw previous discussion on this issue before. Below is backtrace log on toggle-debug-on-quit.

Debugger entered--Lisp error: (quit)
  anaconda-mode-bootstrap()
  anaconda-mode-start()
  anaconda-mode-call("complete")
  anaconda-mode-complete()
  company-anaconda-candidates()
  company-anaconda(candidates #("fo" 0 2 (fontified nil)))
  apply(company-anaconda (candidates #("fo" 0 2 (fontified nil))))
  #[0 "\302 !\203��\303 \300\"\207\303\304  \300#\207" [(candidates #("fo" 0 2 (fontified nil))) company-backend functionp apply company--multi-backend-adapter] 4 "\n\n(fn)"]()
  funcall(#[0 "\302 !\203��\303 \300\"\207\303\304  \300#\207" [(candidates #("fo" 0 2 (fontified nil))) company-backend functionp apply company--multi-backend-adapter] 4 "\n\n(fn)"])
  company-call-backend-raw(candidates #("fo" 0 2 (fontified nil)))
  company--fetch-candidates(#("fo" 0 2 (fontified nil)))
  company-calculate-candidates(#("fo" 0 2 (fontified nil)))
  #[0 "\n\203   �\nC\202\n��\211\205\245�\211@\300�9\204��\306�!\203<��9\2036��\307N\310=\2046��\307N?\205@�\311�!\205@��\312!\202@�\313�\312\"\240\210\300\242\203\236�\314\300\242!\203\230�\315\300\242!�\211�\301\316\f!\240\210\301\242:\204l�
\203\230�\317\320!\210\202\230�
\203t�\300\242��\2119\203\203�\321\322�!P��\202\211�\323\301\242@!\210\324\301\242!\210\325\326\327 \"\210\330\331!\210\332\333\301\242\"\210�A\266\202\202\n�\207" [(#("fo" 0 2 (fontified nil))) (nil) company-backend company-backends company-prefix company--manual-action functionp company-init t company-init-backend prefix company--multi-backend-adapter company--good-prefix-p company--prefix-str company-calculate-candidates message "No completion found" " " symbol-name company--update-group-lighter company-update-candidates run-hook-with-args company-completion-started-hook company-explicit-action-p company-call-frontends show throw --cl-block-nil-- company--manual-prefix company-lighter] 6 "\n\n(fn)"]()
  funcall(#[0 "\n\203   �\nC\202\n��\211\205\245�\211@\300�9\204��\306�!\203<��9\2036��\307N\310=\2046��\307N?\205@�\311�!\205@��\312!\202@�\313�\312\"\240\210\300\242\203\236�\314\300\242!\203\230�\315\300\242!�\211�\301\316\f!\240\210\301\242:\204l�
\203\230�\317\320!\210\202\230�
\203t�\300\242��\2119\203\203�\321\322�!P��\202\211�\323\301\242@!\210\324\301\242!\210\325\326\327 \"\210\330\331!\210\332\333\301\242\"\210�A\266\202\202\n�\207" [(#("fo" 0 2 (fontified nil))) (nil) company-backend company-backends company-prefix company--manual-action functionp company-init t company-init-backend prefix company--multi-backend-adapter company--good-prefix-p company--prefix-str company-calculate-candidates message "No completion found" " " symbol-name company--update-group-lighter company-update-candidates run-hook-with-args company-completion-started-hook company-explicit-action-p company-call-frontends show throw --cl-block-nil-- company--manual-prefix company-lighter] 6 "\n\n(fn)"])
  company--begin-new()
  company--perform()
  #[0 "\300 \207" [company--perform] 1 "\n\n(fn)"]()
  funcall(#[0 "\300 \207" [company--perform] 1 "\n\n(fn)"])
  company-auto-begin()
  company-idle-begin(#<buffer *scratch*> #<window 3 on *scratch*> 5 3)
  apply(company-idle-begin (#<buffer *scratch*> #<window 3 on *scratch*> 5 3))
  byte-code("r\301�\302H�\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 21662 39799 656946 nil company-idle-begin (#<buffer *scratch*> #<window 3 on *scratch*> 5 3) nil 0])

When I was editing the .py file, the emacs opened in second terminal stuck

The OS I used is Ubuntu 14.04, and the version of Emacs is 24.3.1.
My emacs config files is copied from https://github.com/redguardtoo/emacs.d, which using anaconda-mode for python scripts complement.
I opened first emacs program to edit python file in ubuntu terminal with emacs -nw a.py, and opened second emacs program to edit python file in another ubuntu terminal with emacs -nw b.py. The first emacs worked fine, but the second emacs has some problem. The emacs was working in vim mode, and when I press 'j' to move the cursor in the second emacs, I got some mseeage in message buffer:
Blocking call to accept-process-output with quit inhibited!!
Company back-end 'company-jedi' could not be initialized:
Symbol's function definition is void: company-jedi

then, the second emacs stuck, no response for key operations, and CPU usage was up to 100%, I had to close terminal to kill the second emacs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.