From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#35254: 27.0.50; cc-mode/electric-pair-mode/electric-layout-mode: bad trailing whitespace behavior in cc-mode Date: Wed, 15 May 2019 10:03:39 +0000 Message-ID: <20190515100339.GB15042@ACM> References: <87ftqms9db.fsf@secretsauce.net> <871s15k7ll.fsf@gmail.com> <20190513195323.GB5525@ACM> <20190514092735.GB4231@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="253347"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Noam Postavsky , Dima Kogan , 35254@debbugs.gnu.org, Stefan Monnier To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 15 12:04:25 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQqlr-0013jy-Ml for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2019 12:04:23 +0200 Original-Received: from localhost ([127.0.0.1]:34505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQqln-0005Ds-NQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2019 06:04:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQqld-0005Dd-Uo for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 06:04:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQqlc-0003W2-Qi for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 06:04:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37513) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQqlW-0003HC-K1; Wed, 15 May 2019 06:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hQqlW-0005sT-D8; Wed, 15 May 2019 06:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 15 May 2019 10:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35254 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 35254-submit@debbugs.gnu.org id=B35254.155791462522565 (code B ref 35254); Wed, 15 May 2019 10:04:02 +0000 Original-Received: (at 35254) by debbugs.gnu.org; 15 May 2019 10:03:45 +0000 Original-Received: from localhost ([127.0.0.1]:51055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQqlF-0005rs-37 for submit@debbugs.gnu.org; Wed, 15 May 2019 06:03:45 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:43233 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hQqlC-0005ri-8j for 35254@debbugs.gnu.org; Wed, 15 May 2019 06:03:43 -0400 Original-Received: (qmail 73763 invoked by uid 3782); 15 May 2019 10:03:40 -0000 Original-Received: from acm.muc.de (p4FE15DB3.dip0.t-ipconnect.de [79.225.93.179]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 15 May 2019 12:03:39 +0200 Original-Received: (qmail 15284 invoked by uid 1000); 15 May 2019 10:03:39 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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: 209.51.188.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:159332 Archived-At: Hello, Joćo. On Tue, May 14, 2019 at 11:34:24 +0100, Joćo Tįvora wrote: > On Tue, May 14, 2019 at 10:27 AM Alan Mackenzie wrote: > > The bug is, type lots of s in a row; the indentation WS isn't > > getting removed from the blank lines. Currently electric-indent-inhibit > > is inhibiting this removal. > Do you mean the "removal of the WS in the lines preceding the current". > In other words, do you mean "removal of the trailing WS that was once > proper indentation"? Yes. To be absolutely clear, supposing we have point at the end of a line containing nothing but indentation space (e.g., we've just typed ): ! ^ point Type again. What we are currently seeing is: ! . What we want to see is ! . > Or do you think that the current line, the one where point stands, should > not be indented at all in certain electric-* variable combinations and or > c-electric-* variable? Which of those combinations? When electric-indent-inhibit is set, the (electric) indentation of the current line should not be done by electric-indent-mode. For the moment, in CC Mode it should be done by c-electric-brace, and friends, if so configured in CC Mode (the default being enabled). > > Probably. Maybe Joćo should check this, once he's fully back with us. > I'm afraid I can't put a date on that. There's a bun in the oven... Well, congratulations! I hope everything goes well. > An important development towards figuring out this issue is that a > significant fraction of us agrees on what the behavior should be > in what cases. Then we should code tests that assert that behavior > possibly reusing the fixtures in electric-tests.el. Yes. > > The same bug occurs in Python Mode. > > Succinctly, the bug is that on pressing lots of times in a row, the > > indentation WS is being left on the blank lines rather than being > > removed. > I see. That does make sense. But, to be sure, we _dont_ what to > remove the indentation WS on the "current" line, right? Right. Unless, and until, the current line becomes the "previous" line, still otherwise being blank. I think we're agreed on everything. :-) > Joćo -- Alan Mackenzie (Nuremberg, Germany).