From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: evgeniy.sharapov@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#28051: 25.2; Multiline Statement Indentation Error in Inferior Python Mode Date: Fri, 11 Aug 2017 13:24:34 -0400 Message-ID: <56pwp6ayq3x.fsf@nn-esharapov-04.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1502474128 8723 195.159.176.226 (11 Aug 2017 17:55:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2017 17:55:28 +0000 (UTC) To: 28051@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 11 19:55:20 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgE9O-00018n-TB for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Aug 2017 19:55:11 +0200 Original-Received: from localhost ([::1]:33145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgE9T-0004gB-Nv for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Aug 2017 13:55:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgE9L-0004av-7U for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 13:55:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgE9H-0000yk-8L for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 13:55:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47284) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgE9H-0000yg-5D for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 13:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dgE9G-00063Q-7x for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 13:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: evgeniy.sharapov@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Aug 2017 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28051 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150247407423230 (code B ref -1); Fri, 11 Aug 2017 17:55:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Aug 2017 17:54:34 +0000 Original-Received: from localhost ([127.0.0.1]:55965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgE8n-00062a-HT for submit@debbugs.gnu.org; Fri, 11 Aug 2017 13:54:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgDgG-0005Nd-Dn for submit@debbugs.gnu.org; Fri, 11 Aug 2017 13:25:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgDg9-0002OK-8D for submit@debbugs.gnu.org; Fri, 11 Aug 2017 13:24:59 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47821) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dgDg9-0002OE-4V for submit@debbugs.gnu.org; Fri, 11 Aug 2017 13:24:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgDg6-0006e2-QW for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 13:24:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgDg3-0002L5-HK for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 13:24:54 -0400 Original-Received: from mail-qt0-x232.google.com ([2607:f8b0:400d:c0d::232]:32942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgDg3-0002KX-Bk for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 13:24:51 -0400 Original-Received: by mail-qt0-x232.google.com with SMTP id a18so24863163qta.0 for ; Fri, 11 Aug 2017 10:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=7lSjTKKF03Xi+TXVrQx3MsD7d3yQQDeclb8VxvFGhQQ=; b=nq8FGhBlQkNk6+eFPi78wIP1/qXyVqgl025vsWxNfcxPkBJsbYkuZuVVwKodmS8dAs rXwEpV0X7vleFReEkLPkScHjHGUlyR5OU6uPKFFKUAQ/jkqxV/+tPRFQivpAUhnaz2yC OfCpeQQ7kuvGzsSQ1vPTEp3S8oG9uIOoFSv7uYKHYcc80MCeFh5POLosP8KBs4vcz9wJ bvIW1NhqFcwQ7rgRjEKjTI7kXOG9SyCdTiJWHQb7Xpg6CJC1f5gpzf0DmODpoE07ZlPw kRzZEo/KpxcgWBj3mj73bLbqdiNKPU/p5Hcy3eST7RE8FGATCHYsBnN1eBHNTzIhgvmJ eaCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=7lSjTKKF03Xi+TXVrQx3MsD7d3yQQDeclb8VxvFGhQQ=; b=dLvDmGQOl3MpXfNdC5iTqSU+NcZ62OTGRQXqCWpA8U+r146OA6mGTzIt3RzrDbkmjS BqbiBbiV6YExWkwEs/NRF8vgel4kiIS2bbNeks0YV5a5iealIhADIjXZ1os/6tgh7d7v MzMyCu0TWDLVuQ/I4UNlua1uNEyifomGlYqLswWsi6sMZChu7kKBiyBRNzRBiCO2Ir9h jcPYYEA+LjwlesJkWIP1i4ZyCLR8VjmwttSSZ8sKWhymiP2vIIe7CczpxxvhvlVf+Qk/ KksooUTrMQgwEA0eD39N7fe3HEkON9Fv7AgpOTP75EfqXTBH0Iga6ubOIaWqg0ONvv8A paWw== X-Gm-Message-State: AHYfb5it7lcjBFKpQpFB5ctDUXu3NZRTN1CDGvNsFqrP7gvU3mrs4l0B KjIqOC5ER6WB1zYedkI= X-Received: by 10.237.41.65 with SMTP id s59mr20722337qtd.223.1502472289040; Fri, 11 Aug 2017 10:24:49 -0700 (PDT) Original-Received: from nn-esharapov-04 ([38.122.176.18]) by smtp.gmail.com with ESMTPSA id 26sm900573qtp.60.2017.08.11.10.24.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Aug 2017 10:24:48 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Fri, 11 Aug 2017 13:54:32 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135662 Archived-At: Having simple init.el file like this (require 'package) (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) (not (gnutls-available-p)))) (url (concat (if no-ssl "http" "https") "://melpa.org/packages/"))) (add-to-list 'package-archives (cons "melpa" url) t)) (package-initialize) (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (eval-when-compile (require 'use-package)) (use-package company :ensure t :init (setq company-idle-delay 0.1 company-tooltip-limit 20 company-show-numbers t company-selection-wrap-around t company-minimum-prefix-length 2 company-tooltip-align-annotations t company-echo-delay 0) :config ;; default `company-backends' (setq company-backends '(company-capf (company-dabbrev-code company-gtags company-etags company-keywords) company-files company-dabbrev)) (defun ffe-add-company-backends (&rest backends) "Adds BACKENDS to the beginning of the buffer-local version of `company= -backends' list" (set (make-local-variable 'company-backends) (append backends company-backends))) (global-company-mode 1)) (use-package python :defer t :commands python-mode :config (add-hook 'python-mode-hook #'eldoc-mode)) (use-package anaconda-mode :ensure t :init (progn (add-hook 'python-mode-hook #'anaconda-mode) (add-hook 'python-mode-hook #'anaconda-eldoc-mode))) (use-package company-anaconda :defer t :ensure t :init (with-eval-after-load 'company (add-hook 'python-mode-hook (lambda () (ffe-add-company-backends = 'company-anaconda))))) leads to IndentationError once I try to enter multi-line statements in the Inferior python mode.=20 Steps: 1. Start Emacs 2. M-x run-python 3. try to enter something simple like for x in range(10): print x 4. The following error occurs: File "", line 1 print x ^ IndentationError: unexpected indent If `company-mode' is disabled in the Inferior Python Mode via M-x company-m= ode then entering multi-line statements work as expected. Using C-M-i or `complete-symbol' works.=20 Also at the start of the Inferior Pyhon Mode following Warnings have been shown Warning (python): Python shell prompts cannot be detected. If your emacs session hangs when starting python shells recover with =A1=AEkeyboard-quit=A1=AF and then try fixing the interactive flag for your interpreter by adjusting the =A1=AEpython-shell-interpreter-interactive-arg=A1=AF or add regexps matching shell prompts in the directory-local friendly vars: + =A1=AEpython-shell-prompt-regexp=A1=AF + =A1=AEpython-shell-prompt-block-regexp=A1=AF + =A1=AEpython-shell-prompt-output-regexp=A1=AF Or alternatively in: + =A1=AEpython-shell-prompt-input-regexps=A1=AF + =A1=AEpython-shell-prompt-output-regexps=A1=AF Warning (python): Your =A1=AEpython-shell-interpreter=A1=AF doesn=A1=AFt se= em to support readline, yet =A1=AEpython-shell-completion-native-enable=A1= =AF was t and "python" is not part of the =A1=AEpython-shell-completion-nat= ive-disabled-interpreters=A1=AF list. Native completions have been disable= d locally.=20 Howver at the start it said: Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 = bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> python.el: native completion setup loaded Corresponding issue for the `company-mode' on github.com=20 https://github.com/company-mode/company-mode/issues/603 In GNU Emacs 25.2.1 (x86_64-w64-mingw32) of 2017-04-24 built on LAPHROAIG Windowing system distributor 'Microsoft Corp.', version 10.0.14393 Configured using: 'configure --without-dbus --without-compress-install 'CFLAGS=3D-O2 -static -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS Important settings: value of $LANG: ENU locale-coding-system: cp1252 Major mode: Inferior Python Minor modes in effect: shell-dirtrack-mode: t global-company-mode: t override-global-mode: t compilation-shell-minor-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Saving file c:/Users/esharapov/.emacs.d/init.el... Wrote c:/Users/esharapov/.emacs.d/init.el [2 times] For information about GNU Emacs and the GNU system, type C-h C-a. (New file) Can=A1=AFt guess python-indent-offset, using defaults: 4 Shell native completion is disabled, using fallback Company mode disabled in current buffer Mark set Making completion list... Type "q" in help window to restore previous buffer. Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail eieio-opt speedbar sb-image ezimage dframe tramp-cache company-anaconda pp cus-edit cus-start cus-load wid-edit anaconda-mode derived pythonic f python tramp-sh tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete advice json map dash s company-files company-keywords company-etags company-gtags company-dabbrev-code company-capf tempo warnings ispell etags xref project find-func company-dabbrev company-template company edmacro kmacro tar-mode use-package diminish bind-key easy-mmode cl compile comint ansi-color ring autoload lisp-mnt mm-archive message dired format-spec rfc822 mml mml-sec mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils network-stream nsm starttls url-http tls gnutls mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs gnus-util mm-util help-fns mail-prsvr password-cache url-vars epg finder-inf package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify w32 multi-tty make-network-process emacs) Memory information: ((conses 16 353292 42268) (symbols 56 34067 0) (miscs 48 165 297) (strings 32 68207 11339) (string-bytes 1 1877375) (vectors 16 55331) (vector-slots 8 1659539 79071) (floats 8 320 326) (intervals 56 1115 2875) (buffers 976 70))