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#24809: 25.1; Python.el improper indention after backslash-assignment-continuation Date: Mon, 22 May 2017 20:26:29 -0400 Message-ID: <8760gsfmfe.fsf@users.sourceforge.net> References: <871sz1ih58.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1495499174 14792 195.159.176.226 (23 May 2017 00:26:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 May 2017 00:26:14 +0000 (UTC) Cc: Jules Tamagnan To: 24809@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 23 02:26:10 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 1dCxeK-0003ge-2h for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 May 2017 02:26:08 +0200 Original-Received: from localhost ([::1]:45434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCxeO-0005by-0c for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 May 2017 20:26:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCxeI-0005bs-Ah for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 20:26:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCxeF-0005gF-3c for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 20:26:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59053) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCxeE-0005g6-HI for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 20:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dCxeE-0006bn-2V for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 20:26:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <871sz1ih58.fsf@gmail.com> Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 May 2017 00:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24809 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24809-submit@debbugs.gnu.org id=B24809.149549910225335 (code B ref 24809); Tue, 23 May 2017 00:26:02 +0000 Original-Received: (at 24809) by debbugs.gnu.org; 23 May 2017 00:25:02 +0000 Original-Received: from localhost ([127.0.0.1]:33497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCxdG-0006aZ-8h for submit@debbugs.gnu.org; Mon, 22 May 2017 20:25:02 -0400 Original-Received: from mail-it0-f44.google.com ([209.85.214.44]:35613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCxdC-0006a1-Dj for 24809@debbugs.gnu.org; Mon, 22 May 2017 20:24:58 -0400 Original-Received: by mail-it0-f44.google.com with SMTP id c15so9603053ith.0 for <24809@debbugs.gnu.org>; Mon, 22 May 2017 17:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version; bh=M7hVVmmARL0zN8CLpr/BtlzdwG4WxSK0SHHr1CvEsN0=; b=eWMoAj1A7gSfsAE11AQJMqZH8Ldd2YMkxCRh5uvRksPPvvnRFaJFSZBpb+8BsisuZc rSoA+OhRTeLvD1lRVL5YWwnyt8eqWxYohQS166FKkEzMlkqJDPGonmW8FQSZdU5x9HOm wudyPRZIdwhYOevfeLQan5uDWvJBQtmMafncA74eg5IKNZgXjculhOKPfUCoqsz91XG7 zzA1v32+xXH6nL7TDsfOUuP8UnUNhmE0V1SerXf96TXbDf2aI+5SM6Hv4fACO14knrwH PbqIlwciIvwLjA+g/Kn50xcnmO3vMtXP3RmYSq971BSC7y26cPMOA/z/IIpfAZ+/t8+I +9Sw== 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:date:message-id :mime-version; bh=M7hVVmmARL0zN8CLpr/BtlzdwG4WxSK0SHHr1CvEsN0=; b=lgEgRDY/PkaxvTXLl/qjqU030eQUvbn14pMZATz7dCKGMEOxC4gnWSUHkwfff074QR ZKyXHUNend6aSEUyYOne5F0XXoYp2OiLke7RTdR3HEKWz3eoutjuI63smiLX+ejcri/a TaECloQnZDh1OckuPhB4F3IsOYbS405xZFpTHNitetU1J0+I9/1b3S1aRsml+ZkuIDs9 MaApVVgc78zg3moVOcYgRmDv51UCSKA2bc9Veb9VENuyoo3ORl2m0PK1dlriIov7Ud7d fRi0epJ450gRcBq9sgOsfvMUXWnu5/Mfgx1Uj02/utUnxtJERluRJNNsNwEywC0InX9X DiDQ== X-Gm-Message-State: AODbwcBBvE67BUPgVctXw324c6pfY6UDQd1c5jEPljlT8tIOBwHJHZQu y5+fhd5zLT5LJA== X-Received: by 10.107.197.4 with SMTP id v4mr23842004iof.46.1495499092877; Mon, 22 May 2017 17:24:52 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id h76sm134530ith.24.2017.05.22.17.24.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2017 17:24:51 -0700 (PDT) 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:132753 Archived-At: --=-=-= Content-Type: text/plain [Please use "Reply All" to keep 24809@debbugs.gnu.org on Cc] --=-=-= Content-Type: message/rfc822 Content-Disposition: inline From: Jules Tamagnan To: npostavs@users.sourceforge.net Subject: Re: bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation References: <871sz1ih58.fsf@gmail.com> <87h90cgb6r.fsf@users.sourceforge.net> Date: Mon, 22 May 2017 11:46:32 -0700 In-Reply-To: <87h90cgb6r.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Mon, 22 May 2017 11:31:40 -0400") Message-ID: <87tw4cbugn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) X-Headers-End: 1dCsLo-0003AP-HR MIME-Version: 1.0 Content-Type: text/plain npostavs@users.sourceforge.net writes: > Jules Tamagnan writes: > >> The bug is quite simple. >> - Open a python file. >> - Type: >> hello = \ >> - C-m ; newline >> >> The point will now be directly under the backslash character. This is >> indented incorrectly according to the pep8 style guide and the >> pycodestyle checker, it should instead be indented >> `python-indent-offset` further than the previous line. > > So the patch works (additionally the python-indent-after-backslash-4 > test would need to be updated) but I'm not sure if it's correct. > Currently, the pep8 style guide doesn't really say anything about > indentation following backslash, it just recommends using parens > instead. I can update the test. Yeah it is a sort of gray zone because the style guide isn't explicit. I think that the goal of putting a backslash after the equal sign would be to split a line that was too long. The current way that emacs chooses to split a line is not really consistent that goal or with the outcome of using an open paren. I think that the following long line: an_overly_long_variable_name = some_object.some_method(some_argument_to_some_method) could be split like this: an_overly_long_variable_name = ( some_object.some_method(some_argument_to_some_method)) or if someone wanted to use a backslash like this: an_overly_long_variable_name = \ some_object.some_method(some_argument_to_some_method) instead of like: an_overly_long_variable_name = \ some_object.some_method(some_argument_to_some_method) --=-=-=--