From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#18228: 24.4.50; electrict-indent-mode bad indentation in python-mode Date: Tue, 12 Aug 2014 09:05:47 +0200 Message-ID: <53E9BCCB.5020304@easy-emacs.de> References: <87egwqgezc.fsf@loki.jorgenschaefer.de> <53E86C87.4080007@easy-emacs.de> <53E8FAFA.9060902@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1407827253 12372 80.91.229.3 (12 Aug 2014 07:07:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2014 07:07:33 +0000 (UTC) Cc: "=?UTF-8?Q?Fabi=C3=A1n?= E. Gallina" , 18228@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 12 09:07:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XH6Az-00066n-8B for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Aug 2014 09:07:21 +0200 Original-Received: from localhost ([::1]:39715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH6Ay-0002r2-CB for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Aug 2014 03:07:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH6Ao-0002q0-1Y for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 03:07:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XH6Ag-0001nm-I0 for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 03:07:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH6Ag-0001nf-F7 for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 03:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XH6Af-0004wz-Or for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 03:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Aug 2014 07:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18228 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18228-submit@debbugs.gnu.org id=B18228.140782718818989 (code B ref 18228); Tue, 12 Aug 2014 07:07:01 +0000 Original-Received: (at 18228) by debbugs.gnu.org; 12 Aug 2014 07:06:28 +0000 Original-Received: from localhost ([127.0.0.1]:40027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XH6A7-0004wD-Dn for submit@debbugs.gnu.org; Tue, 12 Aug 2014 03:06:27 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:63366) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XH6A4-0004vz-Tm for 18228@debbugs.gnu.org; Tue, 12 Aug 2014 03:06:25 -0400 Original-Received: from [192.168.178.32] (brln-4d0c7ed9.pool.mediaWays.net [77.12.126.217]) by mrelayeu.kundenserver.de (node=mreue102) with ESMTP (Nemesis) id 0ML81x-1XGpB23uoT-000OyV; Tue, 12 Aug 2014 09:06:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.7.0 In-Reply-To: X-Provags-ID: V02:K0:Gm0pZMqXXeL9su8ZkT+eCOMuKSamTAwM+FZO7PPhmcq aQKwnQeZezB88BB6liiZEpqJ1o/tv12LSWU0QFM4o8cjbA49Wr NvZdxHRwV2jV6Sjhp7dEtPjby/pGUNIWT8tGP60Jvq7fKxsVEG FYLfpTQ+V8Db0rJZNCEQkIbR4FKi8onfv46/HqTYtIGl3tiiOp WNRCwdXLgNZ+5oj9Eb/ClktNOd+BQgro3VFidfHLmUP05+Lphl 9KIvoGzDzaUykRvMyajE1eAu2mZBi91bIBIKvOKh3qoZdRWeot 8bv0qpYk8YaIGYqNKCx4XJa85Qb4Qi8HvF5QGt4JiyIjofdDTM rhGixG0VQoxKYN7fKLMYy3kCfwFCUerobq89/Za9z X-UI-Out-Filterresults: notjunk:1; X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92435 Archived-At: On 12.08.2014 04:40, Stefan Monnier wrote: >>>> But what should electric-indent do than? >>> No re-indent upon : when it's not 100% sure of the result. >> Which sums up to switch it off. > > Not to switch off electric-indent, no (it's enabled globally). Python modes should switch it off by default. Using electric features with Python effectively requires a certain level of experience with Emacs and Python alike. Nonetheless - nice play. > > And presumably the : was made to re-indent because in some/many cases > there is only 1 correct indentation (and the code is able to find it). > I don't know if the code is also able to detect when it's correct and > when it's not, In Python indent is meaning - at least sometimes. A reliable electric-indent must know what the programmer wants to write, predict his decision. There are some special cases, where its possible. In a lot of other cases not. Alltogether, when digging in here, you run in a complex matter where artificial intelligence might deliver some progress indeed - which seems fairly out of scope giving the resources when maintaining/developing Emacs' python-modes. IMO it would be a waste of time investing here. but if it is, then we don't need to disable the "reindent > on :" in all cases. > > > Stefan >