From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Default behaviour of RET. Date: Thu, 24 Oct 2013 08:43:50 +0900 Message-ID: <87hac7eeo9.fsf@uwakimon.sk.tsukuba.ac.jp> References: <8361sqli02.fsf@gnu.org> <1730ebf3-db44-498c-b2a9-4d288d83a946@default> <87k3h6xuen.fsf@yandex.ru> <20131023201809.GA4175@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1382571856 3093 80.91.229.3 (23 Oct 2013 23:44:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2013 23:44:16 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org, rudalics@gmx.at, monnier@iro.umontreal.ca, Dmitry Gutov , Eli Zaretskii , Drew Adams To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 24 01:44:19 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VZ865-0003vP-QA for ged-emacs-devel@m.gmane.org; Thu, 24 Oct 2013 01:44:17 +0200 Original-Received: from localhost ([::1]:51867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZ865-0000ta-G3 for ged-emacs-devel@m.gmane.org; Wed, 23 Oct 2013 19:44:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZ85w-0000tE-4o for emacs-devel@gnu.org; Wed, 23 Oct 2013 19:44:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZ85o-00065U-PN for emacs-devel@gnu.org; Wed, 23 Oct 2013 19:44:08 -0400 Original-Received: from mgmt1.sk.tsukuba.ac.jp ([130.158.97.223]:45035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZ85g-00060V-JR; Wed, 23 Oct 2013 19:43:53 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id 6EEC53FA0A14; Thu, 24 Oct 2013 08:43:50 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 51E471A3D0F; Thu, 24 Oct 2013 08:43:50 +0900 (JST) In-Reply-To: <20131023201809.GA4175@acm.acm> X-Mailer: VM undefined under 21.5 (beta34) "kale" 182d01410b8d XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 130.158.97.223 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164494 Archived-At: Alan Mackenzie writes: > On Tue, Oct 22, 2013 at 12:04:32AM +0400, Dmitry Gutov wrote: >> I really have to wonder when anyone would wish to use RET bound to >> newline. Because it doesn't autosense style, it is especially useful where style is inconsistent. For example, I sometimes write patches in sequences where the last patch just fixes up the whitespace, and previous patches do the actual work but avoid whitespace changes for ease of review. (Sure the reviewer can use --ignore-space-change, but it's an annoyance. And review tools should know how to ignore ws changes, but not everybody uses them.) >> Why? Does some popular major mode provide inadequate indentation >> function, so that you have to pick whether to indent the next line >> automatically or not? In the above use case, they all do. > `newline' is the Right Thing to do in non-programming modes like Text > Mode, at least a lot of the time. > > For example, it is if you have paragraphs indented like this one, where > you use auto-fill-mode to calculate a non-null fill prefix to indent > subsequent lines of the paragraph and RET to start a new paragraph at > column zero. To be accurate, at the current left margin, which is usually zero. > Even in programming modes, you might want to start a whole-line comment > at column zero, even where (or especially where) the code is deeply > indented. Sure, but all of these use cases are relatively infrequent (though not rare). I think you should concentrate on the consistency of semantics: > I would be most unhappy if the `newline' functionality were to be > obliterated, even in restricted circumstances like > `electric-indent-mode' being enabled and \n being in > `electric-indent-chars'. Indeed, that change is horrible. `newline' has well-defined semantics, which do not include indentation. Programs should be able to rely on them, given that it's trivial to define a minor mode which does nothing but install a space keymap that swaps the command bindings of C-j and RET. It might even be reasonable to make { RET: newline-and-indent, C-j: newline } the default for the sake of the youngsters.