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: Default behaviour of RET. Date: Thu, 17 Oct 2013 08:17:01 +0900 Message-ID: <87mwm8g61e.fsf@uwakimon.sk.tsukuba.ac.jp> References: <20131013101325.GA2621@acm.acm> <20131013140931.GC2621@acm.acm> <20131013172841.GA2498@acm.acm> <525D8946.4070406@gmx.at> <20131016171240.GA3125@acm.acm> <525EDC50.8010401@gmx.at> <20131016192642.GD3125@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1381965454 8003 80.91.229.3 (16 Oct 2013 23:17:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Oct 2013 23:17:34 +0000 (UTC) Cc: martin rudalics , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 17 01:17:33 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 1VWaLH-0003ZO-Rh for ged-emacs-devel@m.gmane.org; Thu, 17 Oct 2013 01:17:27 +0200 Original-Received: from localhost ([::1]:49681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWaLH-0000q0-Dc for ged-emacs-devel@m.gmane.org; Wed, 16 Oct 2013 19:17:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWaL7-0000pY-AK for emacs-devel@gnu.org; Wed, 16 Oct 2013 19:17:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWaL0-00064b-0m for emacs-devel@gnu.org; Wed, 16 Oct 2013 19:17:17 -0400 Original-Received: from mgmt1.sk.tsukuba.ac.jp ([130.158.97.223]:45553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWaKz-000637-MP for emacs-devel@gnu.org; Wed, 16 Oct 2013 19:17:09 -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 09F463FA0A1B; Thu, 17 Oct 2013 08:17:02 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id E7E5B129E2C; Thu, 17 Oct 2013 08:17:01 +0900 (JST) In-Reply-To: <20131016192642.GD3125@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:164257 Archived-At: Alan Mackenzie writes: > On Wed, Oct 16, 2013 at 08:34:56PM +0200, martin rudalics wrote: > > I've been talking about the command run by RET Which is easy enough to change. > I might agree with you, at least for programming modes. I'm not so sure > about things like Text Mode. I suspect I would find it really annoying, by analogy with the overly aggressive quote-prefixing that is done by `filladapt'. > But there must also be a ready way of doing what RET currently > does, inserting a new line without indenting it. You're enabling the confusaholics. If the user doesn't like what RET does, the the user can bind it to a different function (or, more likely, invoke a mode that does that for her and perhaps customize the mode). Despite the subject, the interesting issue is "what should `newline' do when invoked from code?" The traditional docstring says that it moves to the left margin and handles auto-filling. Eli's suggestion of `(insert "\n")' doesn't do that, and it's not what `newline' does when corrupted by `electric-shock-mode'. But I think it's useful behavior, and I think programs should be able to rely on it (as opposed to users who can modify the behavior of `One-Flew-Over-the-Cuckoos-Nest-mode' by removing ?\n, or not invoke the mode in the first place). Of course Stefan is correct that in Emacs, nothing is reliable. I don't understand why he thinks it's a virtue, though.