[PYTHON] Put jedi in emacs 24

Put jedi, which is a complementary system of python, in emacs. There should be a lot of information on the net, but I ended up fighting for over an hour, so make a note.

Reference page [python] I installed emacs24 + jedi on mac [How to use the jedi package of emacs](http://hiroom2.jimdo.com/2015/09/20/emacs%E3%81%AEjedi%E3%83%91%E3%83%83%E3%82%B1 % E3% 83% BC% E3% 82% B8% E3% 81% AE% E4% BD% BF% E3% 81% 84% E6% 96% B9 /)

emacs version

The method written here depends on the MELPA package-install, so emacs 24 is recommended. (There seems to be a way to use MELPA even with emacs 23, but I will omit it)

MELPA Add the following to init.el.

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)

M-x package-install You can go to the official website with M-x package-install RET jedi RET! It says (I also noticed that RET means Enter), For those who use MELPA or ELPA for the first time, it seems that the package-list will not be updated unless M-x package-list-packages is found (?)

So let's do M-x package-list-packages and then M-x package-install RET jedi RET. Or install it directly from package-list-packages.

Post-processing

Put virtualenv in your python environment and Add the following to init.el.

(require 'jedi)
(add-hook 'python-mode-hook
          '(lambda()
             (jedi:ac-setup)
             (setq jedi:complete-on-dot t)
             (local-set-key (kbd "M-TAB") 'jedi:complete)))

When you're done so far, you should do M-x jedi: install-server at the end.

Recommended Posts

Put jedi in emacs 24
Put matplotlib in Centos7.
Put scipy in ec2
Put pip in Blender
Put MeCab in "Windows 10; Python3.5 (64bit)"
Put python, numpy, opencv3 in ubuntu14
Until you put Python in Docker
Put the module in the Pepper app
Put only kubectl in Amazon Linux 2
Put postfix 2.11 in source with ansible
Try to put data in MongoDB
I put Arch in XPS 13 (7390) (Note)
Until you put pyaudio in Mavericks
I put Python 2.7 in Sakura VPS 1GB.
Put ROS melodic in Raspberry Pi 4 / Buster
Put TensorFlow in P2 instance with pip3
Put together consecutive values in the list
[Itertools.permutations] How to put permutations in Python
PUT gzip directly to S3 in Python
Put Japanese fonts in images with Colaboratory
Automatically generate Python Docstring Comment in Emacs
(For myself) Put Flask in VS Code
I put Linux (Ubuntu) in VAIO SX14.
[V11 ~] A memorandum to put in Misskey
Put Tkinter in Macbook and check operation
(Not yet) Don't put Ubuntu 20.04 in WSL1