From unknown Sun Jun 22 11:47:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19691: 24.4; python.el: indentation RFE Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Jan 2015 14:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19691@debbugs.gnu.org Cc: galli.87@gmail.com X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.142228234318373 (code B ref -1); Mon, 26 Jan 2015 14:26:03 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jan 2015 14:25:43 +0000 Received: from localhost ([127.0.0.1]:56694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YFkbm-0004mH-NT for submit@debbugs.gnu.org; Mon, 26 Jan 2015 09:25:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50192) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YFkbh-0004lw-89 for submit@debbugs.gnu.org; Mon, 26 Jan 2015 09:25:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFkba-0004JQ-VR for submit@debbugs.gnu.org; Mon, 26 Jan 2015 09:25:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFkba-0004JM-SM for submit@debbugs.gnu.org; Mon, 26 Jan 2015 09:25:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFkbZ-00006R-Lu for bug-gnu-emacs@gnu.org; Mon, 26 Jan 2015 09:25:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFkbU-0004Ip-7W for bug-gnu-emacs@gnu.org; Mon, 26 Jan 2015 09:25:29 -0500 Received: from mail-qa0-x229.google.com ([2607:f8b0:400d:c00::229]:39633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFkbU-0004Ii-3M for bug-gnu-emacs@gnu.org; Mon, 26 Jan 2015 09:25:24 -0500 Received: by mail-qa0-f41.google.com with SMTP id bm13so6877119qab.0 for ; Mon, 26 Jan 2015 06:25:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type; bh=aZlREg+LLiU0RXwXwWKFj/tbmXs22gVlgxEjh7wM1Nc=; b=F+7PNgFY2H6p57UvZRgw6MEXQbf44r+42nN+SqR8GZZZQlr7cAVDp4alSKRlQEczBG axrRs2IORs8ECu1haaTfwVXz+6hhpLqwmXK2pdy8dBheVRf0rN+FCA/o2i20IxdnRlxF wZS8Yf699KN+mLZXmO9WwO6Oc2xs3ST0aF/zXcSglu63RM4BVTWjDACzxxMGtfYRIRGX mw1g/FEzTahL6Id6OkqPpLMerJyVlJKcSSyZCq6hnIVX4Q93/QhiuqFecgbhA+lYTF44 7HCVuhZS/BUztRfuXHTnAyJwVa9Xx7x6jPWuBFEpI32qkvjK8xorNwMOURl+t59IqPff u7Bg== X-Received: by 10.224.11.5 with SMTP id r5mr7277704qar.67.1422282323029; Mon, 26 Jan 2015 06:25:23 -0800 (PST) Received: from carlos-jampp ([190.18.155.203]) by mx.google.com with ESMTPSA id p38sm10039017qgd.31.2015.01.26.06.25.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 06:25:22 -0800 (PST) From: Carlos Pita Date: Mon, 26 Jan 2015 11:25:18 -0300 Message-ID: <87vbjt4o1d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) When you're in a blank line and press Enter, IMHO it would be better if python.el kept the cursor column position, instead of restoring the last non-blank line indentation level. For example, say the cursor is X: def f(): pass X When I press Enter most often I don't want to get: def f(): pass X Instead, I think a more sensible default behaviour would be: def f(): pass X That is, to keep the cursor vertical position. This is consistent with the criterion of auto-indenting up to the indentation of last (both blank or non-blank) line, except for the technicality that a blank last line is not really indented... although you still have a point position there to infer desired indentation for the new line. Maybe this should be made a customizable option. What do you think? I'll try to submit a patch later today. From unknown Sun Jun 22 11:47:30 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Carlos Pita Subject: bug#19691: closed (24.4; python.el: indentation RFE) Message-ID: References: <87zj90aprz.fsf@gnu.org> <87vbjt4o1d.fsf@gmail.com> X-Gnu-PR-Message: they-closed 19691 X-Gnu-PR-Package: emacs Reply-To: 19691@debbugs.gnu.org Date: Fri, 30 Jan 2015 03:53:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1422589982-2440-1" This is a multi-part message in MIME format... ------------=_1422589982-2440-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #19691: 24.4; python.el: indentation RFE which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 19691@debbugs.gnu.org. --=20 19691: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19691 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1422589982-2440-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 19691-done) by debbugs.gnu.org; 30 Jan 2015 03:52:37 +0000 Received: from localhost ([127.0.0.1]:57652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YH2dJ-0000ce-0l for submit@debbugs.gnu.org; Thu, 29 Jan 2015 22:52:37 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:44730 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YH2dH-0000cW-Eh for 19691-done@debbugs.gnu.org; Thu, 29 Jan 2015 22:52:36 -0500 Received: from [190.246.172.180] (port=48657 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YH2dG-00036e-JL for 19691-done@debbugs.gnu.org; Thu, 29 Jan 2015 22:52:35 -0500 From: fgallina@gnu.org (=?utf-8?Q?Fabi=C3=A1n?= Ezequiel Gallina) To: 19691-done@debbugs.gnu.org Subject: 24.4; python.el: indentation RFE Date: Fri, 30 Jan 2015 00:52:32 -0300 Message-ID: <87zj90aprz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19691-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) tags 19691 + notabug quit Hi Carlos, The functionality already exists, it's a matter of toggling `electric-indent-mode` OR alternate between using RET and `C-j` for creating a newline (depending the case). When `electric-indent-mode` is enabled, you can achieve what you want by using `C-j`, while RET would indent just like you see right now. When `electric-indent-mode` is disabled, you can achieve what you want by using RET, and `C-j` would indent. If what you want is to keep the current column in places where there are several indentation levels involved, then `C-a C-j` or `C-a RET` (depending on the status `electric-indent-mode`) will help. Cheers, Fabi=C3=A1n ------------=_1422589982-2440-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Jan 2015 14:25:43 +0000 Received: from localhost ([127.0.0.1]:56694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YFkbm-0004mH-NT for submit@debbugs.gnu.org; Mon, 26 Jan 2015 09:25:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50192) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YFkbh-0004lw-89 for submit@debbugs.gnu.org; Mon, 26 Jan 2015 09:25:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFkba-0004JQ-VR for submit@debbugs.gnu.org; Mon, 26 Jan 2015 09:25:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFkba-0004JM-SM for submit@debbugs.gnu.org; Mon, 26 Jan 2015 09:25:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFkbZ-00006R-Lu for bug-gnu-emacs@gnu.org; Mon, 26 Jan 2015 09:25:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFkbU-0004Ip-7W for bug-gnu-emacs@gnu.org; Mon, 26 Jan 2015 09:25:29 -0500 Received: from mail-qa0-x229.google.com ([2607:f8b0:400d:c00::229]:39633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFkbU-0004Ii-3M for bug-gnu-emacs@gnu.org; Mon, 26 Jan 2015 09:25:24 -0500 Received: by mail-qa0-f41.google.com with SMTP id bm13so6877119qab.0 for ; Mon, 26 Jan 2015 06:25:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type; bh=aZlREg+LLiU0RXwXwWKFj/tbmXs22gVlgxEjh7wM1Nc=; b=F+7PNgFY2H6p57UvZRgw6MEXQbf44r+42nN+SqR8GZZZQlr7cAVDp4alSKRlQEczBG axrRs2IORs8ECu1haaTfwVXz+6hhpLqwmXK2pdy8dBheVRf0rN+FCA/o2i20IxdnRlxF wZS8Yf699KN+mLZXmO9WwO6Oc2xs3ST0aF/zXcSglu63RM4BVTWjDACzxxMGtfYRIRGX mw1g/FEzTahL6Id6OkqPpLMerJyVlJKcSSyZCq6hnIVX4Q93/QhiuqFecgbhA+lYTF44 7HCVuhZS/BUztRfuXHTnAyJwVa9Xx7x6jPWuBFEpI32qkvjK8xorNwMOURl+t59IqPff u7Bg== X-Received: by 10.224.11.5 with SMTP id r5mr7277704qar.67.1422282323029; Mon, 26 Jan 2015 06:25:23 -0800 (PST) Received: from carlos-jampp ([190.18.155.203]) by mx.google.com with ESMTPSA id p38sm10039017qgd.31.2015.01.26.06.25.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 06:25:22 -0800 (PST) From: Carlos Pita To: bug-gnu-emacs@gnu.org Subject: 24.4; python.el: indentation RFE Date: Mon, 26 Jan 2015 11:25:18 -0300 Message-ID: <87vbjt4o1d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: galli.87@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) When you're in a blank line and press Enter, IMHO it would be better if python.el kept the cursor column position, instead of restoring the last non-blank line indentation level. For example, say the cursor is X: def f(): pass X When I press Enter most often I don't want to get: def f(): pass X Instead, I think a more sensible default behaviour would be: def f(): pass X That is, to keep the cursor vertical position. This is consistent with the criterion of auto-indenting up to the indentation of last (both blank or non-blank) line, except for the technicality that a blank last line is not really indented... although you still have a point position there to infer desired indentation for the new line. Maybe this should be made a customizable option. What do you think? I'll try to submit a patch later today. ------------=_1422589982-2440-1-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 29 22:54:35 2015 Received: (at control) by debbugs.gnu.org; 30 Jan 2015 03:54:35 +0000 Received: from localhost ([127.0.0.1]:57658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YH2fC-0000gE-IO for submit@debbugs.gnu.org; Thu, 29 Jan 2015 22:54:34 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:44756 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YH2f7-0000g4-R4 for control@debbugs.gnu.org; Thu, 29 Jan 2015 22:54:33 -0500 Received: from [190.246.172.180] (port=48768 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YH2f6-0003W2-WA for control@debbugs.gnu.org; Thu, 29 Jan 2015 22:54:29 -0500 From: fgallina@gnu.org (=?utf-8?Q?Fabi=C3=A1n?= Ezequiel Gallina) To: GNU bug tracker automated control server Subject: Date: Fri, 30 Jan 2015 00:54:26 -0300 Message-ID: <87twz8apot.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) tags 19691 + notabug quit From unknown Sun Jun 22 11:47:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19691: closed (24.4; python.el: indentation RFE) Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jan 2015 10:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: 19691@debbugs.gnu.org Cc: Fabian Ezequiel Gallina Received: via spool by 19691-submit@debbugs.gnu.org id=B19691.142261312218752 (code B ref 19691); Fri, 30 Jan 2015 10:19:01 +0000 Received: (at 19691) by debbugs.gnu.org; 30 Jan 2015 10:18:42 +0000 Received: from localhost ([127.0.0.1]:57765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YH8ev-0004sO-TE for submit@debbugs.gnu.org; Fri, 30 Jan 2015 05:18:42 -0500 Received: from mail-lb0-f180.google.com ([209.85.217.180]:33686) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YH8et-0004s6-Qy for 19691@debbugs.gnu.org; Fri, 30 Jan 2015 05:18:40 -0500 Received: by mail-lb0-f180.google.com with SMTP id b6so35542886lbj.11 for <19691@debbugs.gnu.org>; Fri, 30 Jan 2015 02:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=nsNtFQfc8ob3zq5QlCSziH05RskFyWnh2dGRljSTPnM=; b=EPfbWn1AzX9sI0OfQyj7MTvtoNULfUm77ua+r6wO7NjNOGowSnitmriHeiLmPuoqWe RH5Ratf6DkI5Fpmcxtidv9wx6lPWLB9nnx+qw2fzIELOjrC1+N6HyTsOxI26JAjZZGGW GY77HdgrsdpTSiZnjj3WCNeFr18NoetNgv6ilTs7lHrXq4vd8Uuk4jYbobU5LEGMWDLs MUJoNfQ7iE+5TVHUysDEgVE/rTtQ95Li2BH+NityBtWeR33/lbp2sY8X4Bq7PRhKbqHz d2Ma0bzUyC7dPGwmqS1wbwwHpRl5mKm9e+LfKhcSgg4DP55L6uiJZvDZ10+NtY6lyggZ imjw== X-Received: by 10.112.83.104 with SMTP id p8mr5723416lby.70.1422613113985; Fri, 30 Jan 2015 02:18:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.124.193 with HTTP; Fri, 30 Jan 2015 02:18:13 -0800 (PST) In-Reply-To: References: <87zj90aprz.fsf@gnu.org> <87vbjt4o1d.fsf@gmail.com> From: Carlos Pita Date: Fri, 30 Jan 2015 07:18:13 -0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Fabian, I was thinking a bit more about this after my report and I concluded that a simpler approach based on the recommendations of pep8 could fit the bill: two consecutive blank lines can be considered as an "indentation context" that finishes a top level definition, so the next line will have no indentation at all. I've already implemented this and could post a patch later if you want, but it's a pretty trivial one and I'm sure you would do it better than me. Cheers -- Carlos On Fri, Jan 30, 2015 at 12:53 AM, GNU bug Tracking System wrote: > Your bug report > > #19691: 24.4; python.el: indentation RFE > > which was filed against the emacs package, has been closed. > > The explanation is attached below, along with your original report. > If you require more details, please reply to 19691@debbugs.gnu.org. > > -- > 19691: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19691 > GNU Bug Tracking System > Contact help-debbugs@gnu.org with problems > > > ---------- Forwarded message ---------- > From: "Fabi=C3=A1n Ezequiel Gallina" > To: 19691-done@debbugs.gnu.org > Cc: > Date: Fri, 30 Jan 2015 00:52:32 -0300 > Subject: 24.4; python.el: indentation RFE > tags 19691 + notabug > quit > > > Hi Carlos, > > The functionality already exists, it's a matter of toggling > `electric-indent-mode` OR alternate between using RET and `C-j` for > creating a newline (depending the case). > > When `electric-indent-mode` is enabled, you can achieve what you want by > using `C-j`, while RET would indent just like you see right now. > > When `electric-indent-mode` is disabled, you can achieve what you want > by using RET, and `C-j` would indent. > > If what you want is to keep the current column in places where there are > several indentation levels involved, then `C-a C-j` or `C-a RET` > (depending on the status `electric-indent-mode`) will help. > > > > Cheers, > Fabi=C3=A1n > > > > ---------- Forwarded message ---------- > From: Carlos Pita > To: bug-gnu-emacs@gnu.org > Cc: galli.87@gmail.com > Date: Mon, 26 Jan 2015 11:25:18 -0300 > Subject: 24.4; python.el: indentation RFE > When you're in a blank line and press Enter, IMHO it would be better if > python.el kept the cursor column position, instead of restoring the last > non-blank line indentation level. > > For example, say the cursor is X: > > def f(): > pass > X > > When I press Enter most often I don't want to get: > > def f(): > pass > > X > > Instead, I think a more sensible default behaviour would be: > > def f(): > pass > > X > > That is, to keep the cursor vertical position. This is consistent with > the criterion of auto-indenting up to the indentation of last (both > blank or non-blank) line, except for the technicality that a blank last > line is not really indented... although you still have a point position > there to infer desired indentation for the new line. > > Maybe this should be made a customizable option. > > What do you think? I'll try to submit a patch later today. > > > From unknown Sun Jun 22 11:47:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19691: References: <87vbjt4o1d.fsf@gmail.com> In-Reply-To: <87vbjt4o1d.fsf@gmail.com> Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Feb 2015 20:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: 19691@debbugs.gnu.org Cc: Fabian Ezequiel Gallina Received: via spool by 19691-submit@debbugs.gnu.org id=B19691.14229089239608 (code B ref 19691); Mon, 02 Feb 2015 20:29:01 +0000 Received: (at 19691) by debbugs.gnu.org; 2 Feb 2015 20:28:43 +0000 Received: from localhost ([127.0.0.1]:60716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YINbv-0002Ut-1j for submit@debbugs.gnu.org; Mon, 02 Feb 2015 15:28:43 -0500 Received: from mail-la0-f52.google.com ([209.85.215.52]:35181) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YINbs-0002Uf-1m for 19691@debbugs.gnu.org; Mon, 02 Feb 2015 15:28:40 -0500 Received: by mail-la0-f52.google.com with SMTP id ge10so44976723lab.11 for <19691@debbugs.gnu.org>; Mon, 02 Feb 2015 12:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=BD4Nxb6KLYNshEA7HMSy3b9m4v6amcsEsW3OKucN1R8=; b=UV+iOsOTR9uNPD4VeOd8AJ2mwlYV9maqxvKM3olBmKtB1IFJQQfGqWhb1FTPAatkvu ZyITGDIM8Fwnb8pzT+7hAO6GZ1EdVU9FXFxS9wR9ycj8B8dPbTqx7awaI7lz8PVrIuwM kdNkaN7ntRvWlX+5lvL2a7xRUXnWnDMLiRN807Z3Kjb4ur9KCVIMQYUQ+llyKt8WN3DS y2fm/eMR3Y7QC6NsVrKzI6Z3rbTqYh4b8WVy7lh6v11HT6Cq6HlxG56yuDjuGz8U1mhn DpPpKoHdACaa8Bd+auBTwlfTe1CdH/P6viKRbUNHOD1IUCnbTzBFVJyrydiW1N61GSo0 JfXQ== X-Received: by 10.112.160.193 with SMTP id xm1mr21422196lbb.5.1422908914148; Mon, 02 Feb 2015 12:28:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.124.202 with HTTP; Mon, 2 Feb 2015 12:28:12 -0800 (PST) From: Carlos Pita Date: Mon, 2 Feb 2015 17:28:12 -0300 Message-ID: Content-Type: multipart/mixed; boundary=001a11c33818604798050e20cc88 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Here is a patch updated against current master. I know you have closed this issue, but please reconsider it in the light of my new proposal: it's very simple and PEP 8 friendly. The implementation just set a :no-indent context after two or more consecutive blank lines. That's it. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (carlosjosepita[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.52 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Here is a patch updated against current master. I know you have closed this issue, but please reconsider it in the light of my new proposal: it's very simple and PEP 8 friendly. The implementation just set a :no-indent context after two or more consecutive blank lines. That's it. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.52 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (carlosjosepita[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid --001a11c33818604798050e20cc88 Content-Type: text/plain; charset=UTF-8 Here is a patch updated against current master. I know you have closed this issue, but please reconsider it in the light of my new proposal: it's very simple and PEP 8 friendly. The implementation just set a :no-indent context after two or more consecutive blank lines. That's it. PEP 8 states: Separate top-level function and class definitions with two blank lines. This is not mandatory, of course, but it's often the real intention of the coder and, in any case, it promotes honoring basic conventions. Cheers -- Carlos --001a11c33818604798050e20cc88 Content-Type: text/x-patch; charset=US-ASCII; name="top-level.patch" Content-Disposition: attachment; filename="top-level.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i5ob4vxg0 ZGlmZiAtLWdpdCBhLy5lbWFjcy5kL2xpc3AvcHl0aG9uLmVsIGIvLmVtYWNzLmQvbGlzcC9weXRo b24uZWwKaW5kZXggYmFkZTlkOS4uNzg4ZDA5ZiAxMDA2NDQKLS0tIGEvLmVtYWNzLmQvbGlzcC9w eXRob24uZWwKKysrIGIvLmVtYWNzLmQvbGlzcC9weXRob24uZWwKQEAgLTk2Myw2ICs5NjMsMTUg QEAga2V5d29yZAogICAgICAgICgobGV0ICgoc3RhcnQgKHB5dGhvbi1pbmZvLWRlZGVudGVyLXN0 YXRlbWVudC1wKSkpCiAgICAgICAgICAgKHdoZW4gc3RhcnQKICAgICAgICAgICAgIChjb25zIDph dC1kZWRlbnRlci1ibG9jay1zdGFydCBzdGFydCkpKSkKKyAgICAgICA7OyBBZnRlciB0d28gb3Ig bW9yZSBibGFuayBsaW5lcy4KKyAgICAgICAoKHNhdmUtZXhjdXJzaW9uCisgICAgICAgICAgKHdo ZW4gKGFuZCAocHJvZ24KKyAgICAgICAgICAgICAgICAgICAgICAgKGZvcndhcmQtbGluZSAtMSkK KyAgICAgICAgICAgICAgICAgICAgICAgKHB5dGhvbi1pbmZvLWN1cnJlbnQtbGluZS1lbXB0eS1w KSkKKyAgICAgICAgICAgICAgICAgICAgIChwcm9nbgorICAgICAgICAgICAgICAgICAgICAgICAo Zm9yd2FyZC1saW5lIC0xKQorICAgICAgICAgICAgICAgICAgICAgICAocHl0aG9uLWluZm8tY3Vy cmVudC1saW5lLWVtcHR5LXApKSkKKyAgICAgICAgICAgIChjb25zIDpuby1pbmRlbnQgMCkpKSkK ICAgICAgICA7OyBBZnRlciBub3JtYWwgbGluZS4KICAgICAgICAoKGxldCAoKHN0YXJ0IChzYXZl LWV4Y3Vyc2lvbgogICAgICAgICAgICAgICAgICAgICAgICAoYmFjay10by1pbmRlbnRhdGlvbikK --001a11c33818604798050e20cc88-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 02 15:29:35 2015 Received: (at control) by debbugs.gnu.org; 2 Feb 2015 20:29:35 +0000 Received: from localhost ([127.0.0.1]:60720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YINck-0002Xs-IJ for submit@debbugs.gnu.org; Mon, 02 Feb 2015 15:29:34 -0500 Received: from mail-la0-f50.google.com ([209.85.215.50]:55132) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YINci-0002XY-Aj for control@debbugs.gnu.org; Mon, 02 Feb 2015 15:29:32 -0500 Received: by mail-la0-f50.google.com with SMTP id hs14so44825339lab.9 for ; Mon, 02 Feb 2015 12:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=UC+tR1sq0PtiEd9jkQYLORbxMzvZiCbLtbYndqfwIQo=; b=nAmbErnu3fyEwhbcW6NEF2sg7SY2awfyJSnXRe/kTYfZef+JVHkaoNLio9jkLeHLco ahRNoQtoAMPjlvO4bf6XYFgl1NqQ+TdANAJ69fOUose2+vaf/S7D4QVsxJmhOQ9zuLhK YqQ10MRygkO2x/8rlWeNntKZN/Uue/rEwz0utUbJ8o5CZtOEtlO7N+dD6JGVX2dHAyAG QrZwytBe030kwlHvYCbw8ndD9OictiCgXytrEK8CFqCdXPgAiabfnBpWFm4ndbSJR0Qp xfd3Co6yB26LoAMQV6q4XhR0ELlog+1SN0wwywiWH++wolkBYWv7uAttc/ohev96Jv0M mfTg== X-Received: by 10.152.37.106 with SMTP id x10mr21799794laj.52.1422908966578; Mon, 02 Feb 2015 12:29:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.124.202 with HTTP; Mon, 2 Feb 2015 12:29:06 -0800 (PST) From: Carlos Pita Date: Mon, 2 Feb 2015 17:29:06 -0300 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 19691 patch [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (carlosjosepita[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.50 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 19691 patch [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.50 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (carlosjosepita[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid tags 19691 patch From unknown Sun Jun 22 11:47:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19691: Resent-From: fgallina@gnu.org (=?UTF-8?Q?Fabi=C3=A1n?= Ezequiel Gallina) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Feb 2015 22:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug patch To: Carlos Pita Cc: 19691@debbugs.gnu.org, Fabian Ezequiel Gallina Received: via spool by 19691-submit@debbugs.gnu.org id=B19691.142309059630601 (code B ref 19691); Wed, 04 Feb 2015 22:57:01 +0000 Received: (at 19691) by debbugs.gnu.org; 4 Feb 2015 22:56:36 +0000 Received: from localhost ([127.0.0.1]:34370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YJ8s7-0007xV-SP for submit@debbugs.gnu.org; Wed, 04 Feb 2015 17:56:36 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:59310 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YJ8s6-0007xN-2q for 19691@debbugs.gnu.org; Wed, 04 Feb 2015 17:56:34 -0500 Received: from [190.246.172.180] (port=52812 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YJ8s4-0006Tk-Uw; Wed, 04 Feb 2015 17:56:33 -0500 From: fgallina@gnu.org (=?UTF-8?Q?Fabi=C3=A1n?= Ezequiel Gallina) References: <87vbjt4o1d.fsf@gmail.com> Date: Wed, 04 Feb 2015 19:56:29 -0300 In-Reply-To: (Carlos Pita's message of "Mon, 2 Feb 2015 17:28:12 -0300") Message-ID: <87oap9nv4y.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Carlos Pita writes: > Here is a patch updated against current master. > > I know you have closed this issue, but please reconsider it in the > light of my new proposal: it's very simple and PEP 8 friendly. > > The implementation just set a :no-indent context after two or more > consecutive blank lines. That's it. > > PEP 8 states: Separate top-level function and class definitions with > two blank lines. > > This is not mandatory, of course, but it's often the real intention of > the coder and, in any case, it promotes honoring basic conventions. Hi Carlos, I do like this idea. I'd accept your patch right away but I'd like to differentiate the case with a special keyword (e.g. :after-blank-lines). Also I want some tests. BTW, I'm quite happy you are getting into the internals and started submitting patches. If you plan to work on python.el (or any other part of Emacs) you'll need to sign the copyright assignment (if you haven't) for non trivial changes. I would recommend you to start the process to do so, not because this patch is not trivial enough, but because you have few other patches in the queue that may be useful. PS: I haven't forgot about your other reports but I'm not finding time to work on python.el yet, but know they are under my radar. Regards, Fabi=C3=A1n.