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 17:03:20 +0000 Message-ID: <20131018170320.GC2569@acm.acm> References: <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 1382115945 24988 80.91.229.3 (18 Oct 2013 17:05:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2013 17:05:45 +0000 (UTC) Cc: martin rudalics , "Stephen J. Turnbull" , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 18 19:05:49 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 1VXDUa-0002lc-Vs for ged-emacs-devel@m.gmane.org; Fri, 18 Oct 2013 19:05:41 +0200 Original-Received: from localhost ([::1]:58808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDUa-0007xA-Hg for ged-emacs-devel@m.gmane.org; Fri, 18 Oct 2013 13:05:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDUM-0007w7-CD for emacs-devel@gnu.org; Fri, 18 Oct 2013 13:05:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXDUF-0007vj-26 for emacs-devel@gnu.org; Fri, 18 Oct 2013 13:05:26 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:32610 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDUE-0007ve-OW for emacs-devel@gnu.org; Fri, 18 Oct 2013 13:05:18 -0400 Original-Received: (qmail 15321 invoked by uid 3782); 18 Oct 2013 17:05:17 -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 19:05:16 +0200 Original-Received: (qmail 3003 invoked by uid 1000); 18 Oct 2013 17:03:20 -0000 Content-Disposition: inline In-Reply-To: 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:164315 Archived-At: Hello, Stefan. On Wed, Oct 16, 2013 at 08:47:04PM -0400, Stefan Monnier wrote: > > 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). > I can't remember ever seeing a piece of code which wants "the Emacs-23 > newline behavior". Usually it either wants to (insert "\n") or it wants > to simulate hitting RET. I gave an example of such code in the post which opened this thread. To recap: (newline) (insert "(vi)") (fill-paragraph) The `-and-indent' behaviour messes up the indentation of "(vi)" and causes it to get re-attached to the previous paragraph. > This discussion would benefit from actual examples of code that > fall into neither "do whatever RET does" nor "insert \n". See above. Any code which is interested in filling (or, possibly, even margins, if anything actually uses these) will get broken by the `-and-indent'. > Stefan -- Alan Mackenzie (Nuremberg, Germany).