From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Default behaviour of RET. Date: Fri, 18 Oct 2013 16:57:51 +0000 Message-ID: <20131018165751.GB2569@acm.acm> 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> <87mwm8g61e.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1382115610 21102 80.91.229.3 (18 Oct 2013 17:00:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2013 17:00:10 +0000 (UTC) Cc: martin rudalics , emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 18 19:00:13 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 1VXDPH-0007Xb-7l for ged-emacs-devel@m.gmane.org; Fri, 18 Oct 2013 19:00:11 +0200 Original-Received: from localhost ([::1]:58789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDPG-00068a-UI for ged-emacs-devel@m.gmane.org; Fri, 18 Oct 2013 13:00:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDP7-00063J-6u for emacs-devel@gnu.org; Fri, 18 Oct 2013 13:00:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXDOx-0005sV-I8 for emacs-devel@gnu.org; Fri, 18 Oct 2013 13:00:01 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:59762 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDOx-0005sB-BR for emacs-devel@gnu.org; Fri, 18 Oct 2013 12:59:51 -0400 Original-Received: (qmail 14811 invoked by uid 3782); 18 Oct 2013 16:59:49 -0000 Original-Received: from acm.muc.de (pD9518115.dip0.t-ipconnect.de [217.81.129.21]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 18 Oct 2013 18:59:48 +0200 Original-Received: (qmail 2947 invoked by uid 1000); 18 Oct 2013 16:57:51 -0000 Content-Disposition: inline In-Reply-To: <87mwm8g61e.fsf@uwakimon.sk.tsukuba.ac.jp> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 193.149.48.1 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:164314 Archived-At: Hi, Stephen. On Thu, Oct 17, 2013 at 08:17:01AM +0900, Stephen J. Turnbull wrote: > 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?" Indeed, that was in the title of the original post in the thread. But you seem to have misunderstood the situation: the current electric-indent-mode effectively transforms `newline' into `newline-and-indent', leaving no command for the user who doesn't like this to bind RET to. > 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). Yes. -- Alan Mackenzie (Nuremberg, Germany).