From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: Questioning the new behavior of `open-line'. Date: Thu, 12 Nov 2015 08:38:42 +0100 Message-ID: <56444202.4080005@online.de> References: <87vb98csu1.fsf@red-bean.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1447313910 2121 80.91.229.3 (12 Nov 2015 07:38:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Nov 2015 07:38:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 12 08:38:21 2015 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 1ZwmSO-00072R-Lo for ged-emacs-devel@m.gmane.org; Thu, 12 Nov 2015 08:38:08 +0100 Original-Received: from localhost ([::1]:44983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwmSN-0000wN-Uf for ged-emacs-devel@m.gmane.org; Thu, 12 Nov 2015 02:38:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwmSG-0000vu-R3 for emacs-devel@gnu.org; Thu, 12 Nov 2015 02:38:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwmSB-0002nQ-Lz for emacs-devel@gnu.org; Thu, 12 Nov 2015 02:38:00 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.13]:53447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwmSB-0002nM-DG for emacs-devel@gnu.org; Thu, 12 Nov 2015 02:37:55 -0500 Original-Received: from [192.168.178.31] ([77.12.191.220]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0MMnSJ-1a38Va410x-008Xkv for ; Thu, 12 Nov 2015 08:37:54 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 In-Reply-To: <87vb98csu1.fsf@red-bean.com> X-Provags-ID: V03:K0:3qSlJ12xBfJpKwLGwenRtkmtTQt6mwrpFN98smL5OuIUf0rw0UB 7j4eTbdgqFLdPzrTAB+XRpnflg6x4dpgR2VEKzgxZSNSpYIt3Tn4Cng+AqCFcIl47w3HV0h q5l2QENOc7oE315WvpRJfRryJ0G7WLTDMiAQluKAKW7HhhgmNBh5MvLIqIQrJX7HcN2GNjS fiB3C/DeUIr0vye+cBp0A== X-UI-Out-Filterresults: notjunk:1;V01:K0:NCl/VwBYtNg=:+5voSwSHAi6AqxJc3/Lnkz ZldHxlQlX4R0ATr/wAJT9f/ZDk9zAY9F2J0GiqxAE7TQ46XNT0798iRKkPWlOkHG8HJUF9Z5y fZSOsz9C+VygeIcGEddwODVaGrl/bHfNj9+GrK/DgG9YZc+g5iwU6lQIZnp86gUG4XJpws59K a+EJtHARPucvqfPxvsjppVTTV5wjqm9X2N7MCDxCsD4iLkUtz6dk93fxmf2H8tewKzudCkDLS YrrA6WrFjJinpdIE1D9hFj7jUp3RYNwIZJFL5klX8hHGPHQvl1vjG6qKMk8ZfM5h27gtYayv/ RShv3tJkqeBdoJgCo2rccBuAZi5I7WWO6rh0mIXDPovcFSi7jpNa7XH/YRgGZ1GW8xjikl4oL BkU4PWP9Yy3H3RY61B9N/4p/T84WI2Hu8du3dQSy4O1fwIzOz1V2yeOL2o1u2AKP7FGFC5gw8 YsGcaXDi5PmxX7+bqguFiCBNHy9KIg+nLcsBJWuYeYVWgJE6jXonqmz5aQoZs/Pjj7L8JTS4O HcPowu/+s46nn5dwRoABjOJbU+AEfzbe9yNlqvJL+OH5853Q2hpsZkwcDcqmHlndftyLcWTy2 s+tfykWRbsfVe4CVurUXZnqHCsDPna4i/Bl9OPPcMP1HrffO2Y60TLjCPzg9NvonZlP21Sfae cKEiWSUnXGvv0crJIR37lEw4zwHOyfkfoVFpAbyUaB+wsgOK7kGu++fmKTiVBAlbJZMIkauLW KWscL8xJoZ3QQi+V X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.13 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:194200 Archived-At: On 11.11.2015 19:08, Karl Fogel wrote: > Recently, `open-line' has started behaving in a new way due to Arthur Malabarba's recent commits [1]. Here is how `open-line' behaves before and after the changes. > > Suppose you have this text in a buffer, in just about any mode (i.e., not necessarily a programming language mode), and it is indented by two spaces as below: > > A lovely haiku > An example for this bug > For Emacs Devel > > Now place point where the imaginary "X" is below and do C-o (`open-line'): > > X A lovely haiku > An example for this bug > For Emacs Devel > > Formerly, that would literally insert a newline, but not remove the the two spaces of indendation that come *after* the new newline (the two spaces right before "A lovely haiku"). So this would be the result: > > [...this is the new line; imagine it's blank...] > A lovely haiku > An example for this bug > For Emacs Devel > > But after the recent commits, those two spaces are removed: > > [...this is the new line; imagine it's blank...] > A lovely haiku > An example for this bug > For Emacs Devel > > So now one can no longer just put point in column 0 and type C-o to open a line right before a block of indented text while preserving the block's indentation. > > This is just a result of `electric-indent-mode' being on by default and `open-line' now being sensitive to `electric-indent-mode', I think. But one of the things I always thought was good about `open-line' was that it *wasn't* sensitive that way -- that you could just put point in a column of your choice and insert a newline, and everything to the right of that column would be preserved after the newline. > > Arthur was well aware of this change, and even asked about it in his first post in the thread "A few questions about open-line" [2]: > >> 3. I think, when electric-indent-mode is on, open-line should indent >> the line that was created below if it isn't empty. May I go ahead? > Had I seen that question at the time, I would have answered "Oh, please don't" :-). But maybe mine is a minority opinion? I encounter the new behavior several times a day, and don't like it; turning off `electric-indent-mode' seems like a drastic solution. But if people generally like this new behavior, I'll certainly live with being in the minority and figure out the appropritae local customization. > > So do we think this new behavior is the right one? > > (If it stays, then I'll add an item to NEWS about it.) > > Best regards, > -Karl > > [1] These two commits (note you have to take them together, as the earlier one accidentally leaves open-line in a syntactically invalid state, and the later one corrects that): > > commit bd4f04f86cea893e3369decdda074a4898491518 > Author: Artur Malabarba > Date: Sat Oct 24 22:26:27 2015 +0100 > > * lisp/simple.el (open-line): Integrate with electric-indent-mode > > Also run `post-self-insert-hook' when called interactively. > > M lisp/simple.el > > commit 6939896e2ffe2e742954c14bba6129af456f0857 > Author: Artur Malabarba > Date: Sat Oct 24 22:24:09 2015 +0100 > > * lisp/simple.el (open-line): Fix docstring > > Also explain apparently redundant line. > > M lisp/simple.el > > [2] https://lists.gnu.org/archive/html/emacs-devel/2015-10/threads.html#02107 > When registering with joy Emacs now takes course towards a test-backed development, may we have a change here too? I.e, establishing a policy saying core-functions shouldn't be changed without prior notice/discussion?