У меня была такая же проблема, и я решил ее, заставив emacs не загружать flymake для временных буферов, передаваемых интерпретатору. I
Соответствующие биты моей настройки flymake для Python:
(when (load "flymake" t)
(defun flymake-python-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "pyflymake" (list local-file)))) ; substitute epylint for this
(push '(".+\\.py$" flymake-python-init) flymake-allowed-file-name-masks))
(add-hook 'python-mode-hook
(lambda ()
; Activate flymake unless buffer is a tmp buffer for the interpreter
(unless (eq buffer-file-name nil) (flymake-mode t)) ; this should fix your problem
;; Bind a few keys for navigating errors
(local-set-key (kbd "C-c w") 'show-fly-err-at-point) ; remove these if you want
(local-set-key (kbd "M-n") 'flymake-goto-next-error)
(local-set-key (kbd "M-p") 'flymake-goto-prev-error)))