From unknown Sat Jun 21 10:46:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#17895 <17895@debbugs.gnu.org> To: bug#17895 <17895@debbugs.gnu.org> Subject: Status: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode Reply-To: bug#17895 <17895@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:46:46 +0000 retitle 17895 24.3.91; electric-indent-mode not quite right with comments i= n fortran-mode reassign 17895 emacs submitter 17895 "Roland Winkler" severity 17895 minor tag 17895 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 17:31:58 2014 Received: (at submit) by debbugs.gnu.org; 1 Jul 2014 21:31:58 +0000 Received: from localhost ([127.0.0.1]:39654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X25ef-0008PF-SD for submit@debbugs.gnu.org; Tue, 01 Jul 2014 17:31:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54708) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X25ed-0008P1-5G for submit@debbugs.gnu.org; Tue, 01 Jul 2014 17:31:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X25eS-0006p0-2s for submit@debbugs.gnu.org; Tue, 01 Jul 2014 17:31:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X25eS-0006ou-0w for submit@debbugs.gnu.org; Tue, 01 Jul 2014 17:31:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X25eL-0003PS-TZ for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 17:31:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X25eF-0006mv-Eg for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 17:31:37 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X25eF-0006mr-CA for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 17:31:31 -0400 Received: from [88.128.80.63] (port=48969 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1X25eE-0002Ah-Pj for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 17:31:31 -0400 Date: Tue, 01 Jul 2014 16:31:26 -0500 Message-Id: <87vbrgahqp.fsf@gnu.org> From: "Roland Winkler" To: bug-gnu-emacs@gnu.org Subject: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode 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: -5.0 (-----) X-Debbugs-Envelope-To: submit 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 (-----) emacs -Q insert a multiline comment while editing a file with fortran-mode expected behavior (= emacs 24.3): typing RET (bound to newline) inserts a newline and puts point at column 0 of the new line actual behavior: the new line is indented to column 6 A similar problem exists with multiline statements requiring fortran-continuation-string in column 5. I do not see the benefit of this new behavior in the context of fortran-mode. Maybe electric-indent-chars should be locally bound to nil in fortran-mode. PS: It seems to me that in fortran-mode the command indent-for-tab-command bound to TAB is better suited to provide the proper indentation *after* typing, say, fortran-comment-line-start or fortran-continuation-string in column 0 of a new line. In GNU Emacs 24.3.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) of 2014-05-12 on regnitz Windowing system distributor `The X.Org Foundation', version 11.0.11103000 System Description: Ubuntu 12.04.4 LTS From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 18:47:41 2014 Received: (at 17895) by debbugs.gnu.org; 1 Jul 2014 22:47:41 +0000 Received: from localhost ([127.0.0.1]:39672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X26pw-0001tO-Lz for submit@debbugs.gnu.org; Tue, 01 Jul 2014 18:47:40 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:51864) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X26pv-0001t6-Fh for 17895@debbugs.gnu.org; Tue, 01 Jul 2014 18:47:39 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqBcYFbIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="72143345" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Jul 2014 18:47:33 -0400 Received: by ceviche.home (Postfix, from userid 20848) id AE791660FA; Tue, 1 Jul 2014 18:47:33 -0400 (EDT) From: Stefan Monnier To: "Roland Winkler" Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode Message-ID: References: <87vbrgahqp.fsf@gnu.org> Date: Tue, 01 Jul 2014 18:47:33 -0400 In-Reply-To: <87vbrgahqp.fsf@gnu.org> (Roland Winkler's message of "Tue, 01 Jul 2014 16:31:26 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17895 Cc: 17895@debbugs.gnu.org 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.3 (/) [ Don't know enough about Fortran to know what is "insert a multiline comment" in this context, neither do I know what is a "multiline statement" or why it would "require fortran-continuation-string", so I'll skip this part of your bug-report. Presumably Glenn will be able to give you a more useful answer in this area. ] > PS: It seems to me that in fortran-mode the command > indent-for-tab-command bound to TAB is better suited to provide the > proper indentation *after* typing, say, fortran-comment-line-start > or fortran-continuation-string in column 0 of a new line. Maybe a way to fix this problem, then, would be to make fortran's indent-line-function indent to column 0 when called on an empty line in one of those contexts. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 19:38:45 2014 Received: (at 17895) by debbugs.gnu.org; 1 Jul 2014 23:38:45 +0000 Received: from localhost ([127.0.0.1]:39679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X27dN-00039c-0p for submit@debbugs.gnu.org; Tue, 01 Jul 2014 19:38:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:55095 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X27dJ-00039T-Ph for 17895@debbugs.gnu.org; Tue, 01 Jul 2014 19:38:42 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X27dI-00063O-OP; Tue, 01 Jul 2014 19:38:40 -0400 From: Glenn Morris To: "Roland Winkler" Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode References: <87vbrgahqp.fsf@gnu.org> X-Spook: enemy of the state Aladdin Telex NSA Guantanamo Agfa X-Ran: LC{Q;(yYm9\sY=&I:F{$%SmB3}+01H@f]n&q~*SI(V:u5_1.TIobb[8|LQ;1g$8g.ENltG X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 01 Jul 2014 19:38:40 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 17895 Cc: 17895@debbugs.gnu.org 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 (-----) "Roland Winkler" wrote: > emacs -Q > insert a multiline comment while editing a file with fortran-mode But Fortran doesn't have multi-line comments. :) I know what you mean though, you mean that the desired indentation of the new line isn't known in advance, because it depends on what you write. Other modes, such as Python, have similar issues. There, TAB cycles between possible indent positions. I don't think I see the point in adding something like that for fixed-format Fortran though. > A similar problem exists with multiline statements requiring > fortran-continuation-string in column 5. I don't see the issue here. Previously you would have to enter: RET SPC SPC SPC SPC SPC $ or: RET TAB DEL $ or: RET $ TAB The 1st is inefficient. The 2nd is replaced by: RET DEL $ (less typing) The 3rd still works. > I do not see the benefit of this new behavior in the context of > fortran-mode. Maybe electric-indent-chars should be locally bound to > nil in fortran-mode. Seems like a sledgehammer solution, just for the sake of "C" comments. Even g77 supports "!" comments. The new method is less typing on average, unless you write more "C" comments than code. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 19:49:33 2014 Received: (at 17895) by debbugs.gnu.org; 1 Jul 2014 23:49:33 +0000 Received: from localhost ([127.0.0.1]:39684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X27np-0003Q6-6S for submit@debbugs.gnu.org; Tue, 01 Jul 2014 19:49:33 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:55211 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X27nn-0003Pw-Bo for 17895@debbugs.gnu.org; Tue, 01 Jul 2014 19:49:32 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X27nm-0007aP-7n; Tue, 01 Jul 2014 19:49:30 -0400 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode References: <87vbrgahqp.fsf@gnu.org> X-Spook: domestic disruption eavesdropping CID rail gun CIDA lock X-Ran: pM3"wzBj7I`n7qu:FCn>\Kyf+\e}^%o<&o$]G`?SW6Z:%m[,gV*M (Stefan Monnier's message of "Tue, 01 Jul 2014 18:47:33 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 17895 Cc: Roland Winkler , 17895@debbugs.gnu.org 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.3 (----) Stefan Monnier wrote: > [ Don't know enough about Fortran to know what is "insert a multiline > comment" in this context AFAIK, there is no such thing as "multiline comments" in Fortran. I assume he means he has typed: C this is a comment Then he presses RET and wants to write more comments, but point gets indented to column 6 instead. It's impossible for Fortran mode to know if he was going to write code (column 6) or a comment (column 0). I could say the same thing about pressing RET after a code line. > neither do I know what is a "multiline statement" or why it would > "require fortran-continuation-string" If you want to write a continued code line, you put eg a "$" in column 5 of the new line. There's no marker in the previous line, so again it is impossible for Fortran mode to know that's what you intend when you press RET. > Maybe a way to fix this problem, then, would be to make fortran's > indent-line-function indent to column 0 when called on an empty line in > one of those contexts. It is impossible for it to know, as I hopefully explain above. I really don't think that Fortran mode can do anything here. The new behavior is different to the old one, but I think it will be a net win in terms of fewer keypresses in most situations. (Everyone should use free-format Fortran, where these problems were all solved 20+ years ago!) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 21:18:01 2014 Received: (at 17895) by debbugs.gnu.org; 2 Jul 2014 01:18:01 +0000 Received: from localhost ([127.0.0.1]:39745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X29BM-0006rc-Iv for submit@debbugs.gnu.org; Tue, 01 Jul 2014 21:18:01 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38725) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X29BJ-0006rM-KO for 17895@debbugs.gnu.org; Tue, 01 Jul 2014 21:17:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="72691684" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Jul 2014 21:17:47 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 308A7660FA; Tue, 1 Jul 2014 21:17:47 -0400 (EDT) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode Message-ID: References: <87vbrgahqp.fsf@gnu.org> Date: Tue, 01 Jul 2014 21:17:47 -0400 In-Reply-To: (Glenn Morris's message of "Tue, 01 Jul 2014 19:38:40 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17895 Cc: Roland Winkler , 17895@debbugs.gnu.org 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.3 (/) > Other modes, such as Python, have similar issues. Actually, I think it's different: the problem with Python is that even once the line is fully written, python-mode can't always decide where to indent it, because there are several valid choices (and they don't mean the same thing). Instead, the problem here seems to only affect empty lines (i.e. lines where the text hasn't been written yet), and this problem affects many/most modes. But I guess if the first non-whitespace char is a capital C, fortran-mode has a similar problem to python-mode in that it can't know for sure if the line should be assumed to be a comment (and go to column-0) or to be some instruction that happens to start with a capital C (and should go to some further column). > or: RET $ TAB And adding $ to electric-indent-chars would even save you from typing this TAB (which doesn't mean that's what fortran-mode should do, tho. I have the impression that this kind of old-style Fortran is fairly rare nowadays). Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 21:51:10 2014 Received: (at 17895) by debbugs.gnu.org; 2 Jul 2014 01:51:10 +0000 Received: from localhost ([127.0.0.1]:39755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X29hW-0007hy-8C for submit@debbugs.gnu.org; Tue, 01 Jul 2014 21:51:10 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:58126 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X29hT-0007hq-Kv for 17895@debbugs.gnu.org; Tue, 01 Jul 2014 21:51:08 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X29hS-0005A0-Pi; Tue, 01 Jul 2014 21:51:06 -0400 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode References: <87vbrgahqp.fsf@gnu.org> X-Spook: NASA Albright domestic disruption White Water UOP Medco X-Ran: v%fnK$Jq}B`@o$9g>g22,9}>oWgC]>>(qaGa*)(&(IVI3-k.%bc~AtO@YFVEV:f"88+h?s X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 01 Jul 2014 21:51:06 -0400 In-Reply-To: (Stefan Monnier's message of "Tue, 01 Jul 2014 21:17:47 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 17895 Cc: Roland Winkler , 17895@debbugs.gnu.org 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 (-----) Stefan Monnier wrote: > Instead, the problem here seems to only affect empty lines (i.e. lines > where the text hasn't been written yet) (How do you type RET and have text already written on the new line...?) > , and this problem affects many/most modes. Oh duh, of course. if foo; then ... ... when will endif appear... ... who knows... endif # oh here it is > But I guess if the first non-whitespace char is a capital C, > fortran-mode has a similar problem to python-mode in that it can't know > for sure if the line should be assumed to be a comment (and go to > column-0) or to be some instruction that happens to start with a capital > C (and should go to some further column). Yep. (CHARACTER for example.) So I don't really see that there is anything to do here. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 21:58:02 2014 Received: (at 17895) by debbugs.gnu.org; 2 Jul 2014 01:58:02 +0000 Received: from localhost ([127.0.0.1]:39760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X29oA-0007sc-3V for submit@debbugs.gnu.org; Tue, 01 Jul 2014 21:58:02 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:58195 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X29o7-0007sB-5m for 17895@debbugs.gnu.org; Tue, 01 Jul 2014 21:58:00 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X29o6-00069m-6V; Tue, 01 Jul 2014 21:57:58 -0400 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode References: <87vbrgahqp.fsf@gnu.org> X-Spook: Treasury eavesdropping NASA White Water diwn import world X-Ran: D!N]!=[&$XJ0)IMVGg$Og-V{,'Ei9yvX)5d1PpOaC2}70}aFvv?+DviOBt\X=r/isbg$h! X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 01 Jul 2014 21:57:58 -0400 In-Reply-To: (Glenn Morris's message of "Tue, 01 Jul 2014 21:51:06 -0400") Message-ID: <1xr424v7x5.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 17895 Cc: Roland Winkler , 17895@debbugs.gnu.org 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 (-----) Glenn Morris wrote: >> Instead, the problem here seems to only affect empty lines (i.e. lines >> where the text hasn't been written yet) > > (How do you type RET and have text already written on the new line...?) Wow, I am unusually slow today! :) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 22:15:05 2014 Received: (at 17895) by debbugs.gnu.org; 2 Jul 2014 02:15:05 +0000 Received: from localhost ([127.0.0.1]:39768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2A4e-0008L8-6B for submit@debbugs.gnu.org; Tue, 01 Jul 2014 22:15:04 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:4047) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2A4c-0008KK-5y for 17895@debbugs.gnu.org; Tue, 01 Jul 2014 22:15:02 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="72875047" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Jul 2014 22:14:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 4C30A660FA; Tue, 1 Jul 2014 22:14:56 -0400 (EDT) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode Message-ID: References: <87vbrgahqp.fsf@gnu.org> Date: Tue, 01 Jul 2014 22:14:56 -0400 In-Reply-To: (Glenn Morris's message of "Tue, 01 Jul 2014 21:51:06 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17895 Cc: Roland Winkler , 17895@debbugs.gnu.org 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.3 (/) >> Instead, the problem here seems to only affect empty lines (i.e. lines >> where the text hasn't been written yet) > (How do you type RET and have text already written on the new line...?) When you hit RET in the middle of a line, of course. And of course electric-indent-mode doesn't only trigger when you hit RET (and for other keys, there'll usually be text on the current line), and half the work of electric-indent-mode when triggered by RET is to reindent the line where the RET was inserted (i.e. the "previous" line), which is often/usually not empty either. > So I don't really see that there is anything to do here. Agreed, Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 16:55:26 2014 Received: (at 17895) by debbugs.gnu.org; 2 Jul 2014 20:55:27 +0000 Received: from localhost ([127.0.0.1]:40778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2RYs-0003iH-15 for submit@debbugs.gnu.org; Wed, 02 Jul 2014 16:55:26 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:51012 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2RYp-0003i4-08 for 17895@debbugs.gnu.org; Wed, 02 Jul 2014 16:55:23 -0400 Received: from p4fcbfadd.dip0.t-ipconnect.de ([79.203.250.221]:59975 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1X2RYn-0006dc-QW; Wed, 02 Jul 2014 16:55:22 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <29110.37851.774372.21428@gargle.gargle.HOWL> Date: Wed, 2 Jul 2014 15:55:18 -0500 From: "Roland Winkler" To: Glenn Morris Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode In-Reply-To: References: <87vbrgahqp.fsf@gnu.org> X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 17895 Cc: Stefan Monnier , 17895@debbugs.gnu.org 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 (-----) On Tue Jul 1 2014 Glenn Morris wrote: > Even g77 supports "!" comments. For existing code "!" is not always an adequate choice. > (Everyone should use free-format Fortran, where these problems > were all solved 20+ years ago!) All this is obviously not about new code, but it is about maintaining existing code. (Also, that's why Emacs comes with fortran-mode and f90-mode. They serve different needs!) I completely agree that in a perfect world rewriting the old code is the way to go. But that's not always possible. I am pretty sure that such code will still be around and used happily twenty years from now. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 17:03:22 2014 Received: (at 17895) by debbugs.gnu.org; 2 Jul 2014 21:03:22 +0000 Received: from localhost ([127.0.0.1]:40782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2RgX-00042M-HB for submit@debbugs.gnu.org; Wed, 02 Jul 2014 17:03:21 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:51178 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2RgT-000426-6P for 17895@debbugs.gnu.org; Wed, 02 Jul 2014 17:03:19 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X2RgS-0003rV-Bi; Wed, 02 Jul 2014 17:03:16 -0400 From: Glenn Morris To: "Roland Winkler" Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode References: <87vbrgahqp.fsf@gnu.org> <29110.37851.774372.21428@gargle.gargle.HOWL> X-Spook: CIA Rumsfeld covert video crypto anarchy Comirex AVN SAFE X-Ran: #1re`b1h6zDyblx$XZYn`K6%OSCh`(_U?cO5%$tf)8hRV$dNg}dIr%T-'*G:64u~su1Blk X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 02 Jul 2014 17:03:16 -0400 In-Reply-To: <29110.37851.774372.21428@gargle.gargle.HOWL> (Roland Winkler's message of "Wed, 2 Jul 2014 15:55:18 -0500") Message-ID: <1038ejeanf.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 17895 Cc: Stefan Monnier , 17895@debbugs.gnu.org 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.3 (----) "Roland Winkler" wrote: >> (Everyone should use free-format Fortran, where these problems >> were all solved 20+ years ago!) > > All this is obviously not about new code, but it is about > maintaining existing code. > (Also, that's why Emacs comes with fortran-mode and f90-mode. They > serve different needs!) I know, I know. I was just trying to give the bug-gnu-emacs audience who is not familiar with Fortran an impression of the language based on something that is not 25 years obsolete. Do you have any concrete suggestions for changing Emacs's fortran-mode in light of this report? I don't. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 17:50:56 2014 Received: (at 17895) by debbugs.gnu.org; 2 Jul 2014 21:50:56 +0000 Received: from localhost ([127.0.0.1]:40820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2SQZ-0005t4-ME for submit@debbugs.gnu.org; Wed, 02 Jul 2014 17:50:56 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:52044 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2SQX-0005su-6I for 17895@debbugs.gnu.org; Wed, 02 Jul 2014 17:50:53 -0400 Received: from p4fcbfadd.dip0.t-ipconnect.de ([79.203.250.221]:60180 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1X2SQU-0001Uw-Rc; Wed, 02 Jul 2014 17:50:51 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <32438.20231.979406.21428@gargle.gargle.HOWL> Date: Wed, 2 Jul 2014 16:50:46 -0500 From: "Roland Winkler" To: Glenn Morris Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode In-Reply-To: <1038ejeanf.fsf@fencepost.gnu.org> References: <87vbrgahqp.fsf@gnu.org> <29110.37851.774372.21428@gargle.gargle.HOWL> <1038ejeanf.fsf@fencepost.gnu.org> X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 17895 Cc: Stefan Monnier , 17895@debbugs.gnu.org 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 (-----) On Wed Jul 2 2014 Glenn Morris wrote: > Do you have any concrete suggestions for changing Emacs's > fortran-mode in light of this report? For me, in fortran-mode the electric-indent-mode moves point too fast too far ahead. I find this beavior distracting in fortran-mode. (Yes, the fortran codes I work with do have a good percentage of comment lines plus some continuation lines.) That's why I suggested that electric-indent-chars should be locally bound to nil in fortran-mode. If that's not acceptable to you as default behavior, I have right now nothing else to suggest. I guess I'll set up the local binding in my .emacs. Not a big deal. We'll see whether anybody else might find the current behavior an issue. Roland From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 22:01:00 2014 Received: (at 17895) by debbugs.gnu.org; 3 Jul 2014 02:01:00 +0000 Received: from localhost ([127.0.0.1]:40912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2WKZ-0007DG-5o for submit@debbugs.gnu.org; Wed, 02 Jul 2014 22:00:59 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:59928) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2WKW-0007Cq-HC for 17895@debbugs.gnu.org; Wed, 02 Jul 2014 22:00:56 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqBcYFbIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="75862807" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Jul 2014 22:00:50 -0400 Received: by pastel.home (Postfix, from userid 20848) id 8572161E04; Wed, 2 Jul 2014 22:00:50 -0400 (EDT) From: Stefan Monnier To: "Roland Winkler" Subject: Re: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode Message-ID: References: <87vbrgahqp.fsf@gnu.org> <29110.37851.774372.21428@gargle.gargle.HOWL> <1038ejeanf.fsf@fencepost.gnu.org> <32438.20231.979406.21428@gargle.gargle.HOWL> Date: Wed, 02 Jul 2014 22:00:50 -0400 In-Reply-To: <32438.20231.979406.21428@gargle.gargle.HOWL> (Roland Winkler's message of "Wed, 2 Jul 2014 16:50:46 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17895 Cc: Glenn Morris , 17895@debbugs.gnu.org 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.3 (/) > For me, in fortran-mode the electric-indent-mode moves point > too fast too far ahead. I find this beavior distracting in > fortran-mode. (Yes, the fortran codes I work with do have a good > percentage of comment lines plus some continuation lines.) That's > why I suggested that electric-indent-chars should be locally bound > to nil in fortran-mode. You can also (electric-indent-local-mode -1) from the fortran-mode-hook. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 12 01:47:41 2014 Received: (at control) by debbugs.gnu.org; 12 Aug 2014 05:47:41 +0000 Received: from localhost ([127.0.0.1]:39938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XH4vt-0007Yq-6z for submit@debbugs.gnu.org; Tue, 12 Aug 2014 01:47:41 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34117 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XH4vr-0007Yi-6M for control@debbugs.gnu.org; Tue, 12 Aug 2014 01:47:39 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XH4vq-0005li-Po for control@debbugs.gnu.org; Tue, 12 Aug 2014 01:47:38 -0400 Date: Tue, 12 Aug 2014 01:47:38 -0400 Message-Id: Subject: control message for bug 17895 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.7 (-----) 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: -5.7 (-----) tag 17895 wontfix From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 04 10:34:31 2016 Received: (at control) by debbugs.gnu.org; 4 Mar 2016 15:34:31 +0000 Received: from localhost ([127.0.0.1]:33683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abrkN-0000CJ-Mx for submit@debbugs.gnu.org; Fri, 04 Mar 2016 10:34:31 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:47291) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abrkM-0000CB-B2 for control@debbugs.gnu.org; Fri, 04 Mar 2016 10:34:30 -0500 Received: from 2.150.35.31.tmi.telenormobil.no ([2.150.35.31] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1abrjO-0004Qx-9s for control@debbugs.gnu.org; Fri, 04 Mar 2016 16:33:30 +0100 From: Lars Ingebrigtsen To: control@debbugs.gnu.org Subject: control message for bug #17895 Message-ID: <874mcml4pv.fsf@totally-fudged-out-message-id> Date: Fri, 04 Mar 2016 15:33:29 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1abrjO-0004Qx-9s X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457710411.23943@4HWNsRpggYyRpsz3LUzlRQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (/) close 17895 From unknown Sat Jun 21 10:46:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 02 Apr 2016 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator