From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#28051: Multiline Statement Indentation Error in Inferior Python Mode Date: Mon, 21 Aug 2017 21:36:20 -0400 Message-ID: <87fuckbcyz.fsf@users.sourceforge.net> References: <56pwp6ayq3x.fsf@nn-esharapov-04.i-did-not-set--mail-host-address--so-tickle-me> <5wshgwfzfe.fsf@fencepost.gnu.org> <87y3qlzoom.fsf@users.sourceforge.net> <87shglazdm.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503365725 22721 195.159.176.226 (22 Aug 2017 01:35:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 22 Aug 2017 01:35:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: Evgeniy Sharapov , 28051@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 22 03:35:17 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 1djy66-0005NN-QM for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Aug 2017 03:35:15 +0200 Original-Received: from localhost ([::1]:49213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djy6D-0001LN-Ac for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Aug 2017 21:35:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djy67-0001Ko-3U for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2017 21:35:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djy63-00067p-VV for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2017 21:35:15 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39725) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1djy5u-00062K-Jx for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2017 21:35:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1djy5u-0002Ib-78 for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2017 21:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Aug 2017 01:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28051 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 28051-submit@debbugs.gnu.org id=B28051.15033656908816 (code B ref 28051); Tue, 22 Aug 2017 01:35:02 +0000 Original-Received: (at 28051) by debbugs.gnu.org; 22 Aug 2017 01:34:50 +0000 Original-Received: from localhost ([127.0.0.1]:48406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djy5h-0002I7-Pq for submit@debbugs.gnu.org; Mon, 21 Aug 2017 21:34:49 -0400 Original-Received: from mail-it0-f50.google.com ([209.85.214.50]:33231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djy5g-0002Hu-4P for 28051@debbugs.gnu.org; Mon, 21 Aug 2017 21:34:48 -0400 Original-Received: by mail-it0-f50.google.com with SMTP id n5so3346288itb.0 for <28051@debbugs.gnu.org>; Mon, 21 Aug 2017 18:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lfh8wpekTtkKXHAsYv5s1qa1FIW9I2JujZQG5h3O0d4=; b=qyj1pXVHhCzKVPazllI+qpZb0kMdZzIidiA93+IS8AgM0NBRygqhy8VeME1xMz9gUj mdFI0PkJm/6GU+t4z+n2WHe2fSVNcxs6OMFmcLsLYAaL7o8NeC6AizbmRFyw7jNcMKLh x3FqvVCD+n1ERplorlgjO0YAAYjHgPpcEA5oH5nwAeaqYDDkMVDSIobnEIfYspmuILM6 n3TlykAXYnd6NBJOYbk9wcvvDVezBk16WjynBVSa43imee0LcaO/UH82bQo5gdmGTjb+ 4mOP4LyGgUG8RpGSUmuyZCEron9YtPJAOVhn8Eh1JQpvZ4d6RnVTjtjtjmFGWE1u1AFY eA+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=lfh8wpekTtkKXHAsYv5s1qa1FIW9I2JujZQG5h3O0d4=; b=D5EcrV4V66FkMgCobilDzpxzdDiXlfYlDcAsj3hYuCcQpq0zrtZEQdycAHfPFSHjs6 1lZUfdb9lSaLd+vvIS5nZub+xJc6R6nJr8ocYXIqEIwHCJJBsurdsU3xxPxXmcwX5AzS tehY4hgOy1QCUm/Sbz6+o3AvXQNrHDe1Yl5Mq9OJx5IuCrwuVhElAomyPkLMyzrX5WKv AIv3jxJS/jA+yBF2bFsu8OlifWrQXnTAeH8+YHHK6TsKHIgW3vmknYreoB22pFiphdUQ QLCq0BcnagZChtc7WPIeX9O80jp2SlxFOHPP3U6cOR3ilx/JSlaQ80ub8LFOFS+PQmK9 CnnQ== X-Gm-Message-State: AHYfb5i/Ypd84d2RcW/wIraZlG22sl/6U6aR8wWiiLLtWBTGZ83ydo8o MiyJBylRzC1VEw== X-Received: by 10.36.196.67 with SMTP id v64mr8742791itf.156.1503365682642; Mon, 21 Aug 2017 18:34:42 -0700 (PDT) Original-Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id w134sm725476ita.0.2017.08.21.18.34.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Aug 2017 18:34:41 -0700 (PDT) In-Reply-To: <87shglazdm.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Mon, 21 Aug 2017 08:17:41 -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:136033 Archived-At: npostavs@users.sourceforge.net writes: >> I can reproduce this on Windows. And on GNU/Linux after doing (setq >> python-shell-completion-native-enable nil). Perhaps this is one of the >> "limitations" referred to in the comments of python.el: >> >> ;; ...the "fallback" or "legacy" mechanism works by executing Python >> ;; code in the background and enables auto-completion for shells >> ;; that do not support receiving escape sequences (with some >> ;; limitations, i.e. completion in blocks does not work). > > I think the best we can do is disable completion with an error message > when the prompt is "..." > @@ -3632,7 +3639,9 @@ python-shell-completion-at-point > ;; Also, since pdb interaction is single-line > ;; based, this is enough. > (string-match-p python-shell-prompt-pdb-regexp prompt)) > - #'python-shell-completion-get-completions) > + (if (equal python-shell--block-prompt prompt) > + (user-error "Cannot use standard completion in multiline statement") > + #'python-shell-completion-get-completions)) > (t #'python-shell-completion-native-get-completions))))) Hmm, when using company-mode the error message is sent repeatedly, which seems pretty annoying. But silently returning no matches could be confusing. Dimitri, any advice?