после установки пакетов открываю test.py. Далее company-jedi предлагает поставить jedi:install-server. Я его ставлю. Открываю test.py и ввожу import math; math. и emacs виснет намертво
конфиг:
(message "* --[ Loading my Emacs init file ]--")
;; turn on Common Lisp support
(require 'cl) ; provides useful things like `loop' and `setf'
;; load colorscheme
; (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(load-theme 'wombat t)
;; scroll one line at a time (less "jumpy" than defaults)
(setq redisplay-dont-pause t
scroll-margin 1
scroll-step 1
scroll-conservatively 10000
scroll-preserve-screen-position 1
mouse-wheel-progressive-speed nil
mouse-wheel-follow-mouse 't
scroll-margin 7)
;------------------------------------------------------------------------------
; OPTION SECTION
;------------------------------------------------------------------------------
(set-frame-font "Terminus-12") ; DejaVu Sans Mono-12
(set-frame-font "Terminus-12" nil t) ; DejaVu Sans Mono-12
(tool-bar-mode -1) ; disable toolbar
(scroll-bar-mode -1) ; disable scroll bar
; (menu-bar-mode -1) ; disable menu bar
(global-linum-mode t) ;; visible line number
(setq-default truncate-lines t) ;; disable line wrap
(setq inhibit-startup-message t) ; disable startup emacs page
(setq auto-save-interval 500) ; Autosave every 500 typed characters
(setq linum-format "%4d\u2502 ") ; accurate line number
(setq default-tab-width 4) ; default tab weigth
(setq make-backup-files nil) ; stop creating backup~ files
(setq auto-save-default nil) ; stop creating #autosave# files
(blink-cursor-mode 0) ; disable blink cursor
(setq initial-scratch-message "") ; disable default message
(setq file-name-coding-system 'utf-8)
; emacs performance
(setq redisplay-dont-pause t) ; don't pause redraw
(setq line-number-display-limit-width 200) ;open large file
(add-hook 'post-command-hook
(lambda ()
(recenter '("don't redraw"))))
(windmove-default-keybindings 'meta)
(fset 'yes-or-no-p 'y-or-n-p)
(iswitchb-mode 1)
;------------------------------------------------------------------------------
; REPO SECTION
;------------------------------------------------------------------------------
; list the packages you want
; (setq package-list '(fill-column-indicator jedi yasnippet jabber dired+ fiplr indent-guide mingus bookmark+))
; (setq package-list '(fill-column-indicator yasnippet dired+ fiplr indent-guide mingus bookmark+ auto-complete py-autopep8 elpy jedi))
(setq package-list '(fill-column-indicator company-jedi))
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/") t)
; (add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/") t)
(package-initialize)
; fetch the list of packages available
(unless package-archive-contents
(package-refresh-contents))
; install the missing packages
(dolist (package package-list)
(unless (package-installed-p package)
(package-install package)))
(put 'downcase-region 'disabled nil)
;------------------------------------------------------------------------------
; PLUGIN SECTION
;------------------------------------------------------------------------------
; enable package
(package-initialize)
(setq package-enable-at-startup nil)
; Edge line
(require 'fill-column-indicator)
(setq-default fci-rule-column 80)
(setq fci-handle-truncate-lines nil)
(define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1)))
(global-fci-mode 1)
(defun auto-fci-mode (&optional unused)
(if (> (window-width) fci-rule-column)
(fci-mode 1)
(fci-mode 0))
)
(add-hook 'after-change-major-mode-hook 'auto-fci-mode)
(add-hook 'window-configuration-change-hook 'auto-fci-mode)
; Save position in file
(require 'saveplace)
(setq-default save-place t)
(setq save-place-file "~/.emacs.d/saved-places")
(setq save-place-forget-unreadable-files nil)
; company
; (add-hook 'after-init-hook 'global-company-mode)
; (defun my/python-mode-hook ()
; (add-to-list 'company-backends 'company-jedi))
; (add-hook 'python-mode-hook 'my/python-mode-hook)
; (require 'jedi-core)
; (setq jedi:complete-on-dot t)
; (setq jedi:use-shortcuts t)
; (add-hook 'python-mode-hook 'jedi:setup)
; (add-to-list 'company-backends 'company-jedi) ; backend
(add-hook 'after-init-hook 'global-company-mode)
(defun my/python-mode-hook ()
(add-to-list 'company-backends 'company-jedi))
(add-hook 'python-mode-hook 'my/python-mode-hook)
; (add-hook 'python-mode-hook 'run-python-internal)