From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#17737: 24.4.50; REGRESSION: `delete-selection-mode' broken by `electric-indent-mode' change Date: Sun, 8 Jun 2014 08:30:14 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1402241496 22285 80.91.229.3 (8 Jun 2014 15:31:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2014 15:31:36 +0000 (UTC) To: 17737@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 08 17:31:29 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Wtf4B-0006Zm-4l for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 17:31:27 +0200 Original-Received: from localhost ([::1]:56823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtf4A-00056J-KY for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 11:31:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtf3x-000559-46 for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:31:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wtf3m-0004eC-Qy for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:31:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtf3m-0004e6-NF for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wtf3m-0001ad-5c for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jun 2014 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14022414576095 (code B ref -1); Sun, 08 Jun 2014 15:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jun 2014 15:30:57 +0000 Original-Received: from localhost ([127.0.0.1]:41513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wtf3g-0001aE-6r for submit@debbugs.gnu.org; Sun, 08 Jun 2014 11:30:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58260) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wtf3d-0001Zw-Sz for submit@debbugs.gnu.org; Sun, 08 Jun 2014 11:30:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wtf3O-0004Ym-47 for submit@debbugs.gnu.org; Sun, 08 Jun 2014 11:30:48 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtf3N-0004Yf-Mx for submit@debbugs.gnu.org; Sun, 08 Jun 2014 11:30:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtf3E-00053u-P0 for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:30:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wtf32-0004Vq-Jr for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:30:28 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:48186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wtf32-0004Vj-DH for bug-gnu-emacs@gnu.org; Sun, 08 Jun 2014 11:30:16 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s58FUEhH018159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 8 Jun 2014 15:30:15 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s58FUDTD015453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 8 Jun 2014 15:30:14 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s58FUCWp025621 for ; Sun, 8 Jun 2014 15:30:12 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90181 Archived-At: emacs -Q M-x delete-selection-mode ; turn it on M-: (electric-indent-mode -1) ; turn it off I was hoping that this would just restore the behavior present in Emacs forever, prior to Emacs 24.4: C-j would insert a newline and indent, and RET would insert a newline. The regression is that C-j does not delete the active region. For example, in `emacs-lisp-mode': Select the text from the middle of a line through eol (the newline char). Ensure that point is at the start of the selection, not the end. Hit `C-j'. The rest of the line is indented on the next line, instead of being killed. If point was instead at eol then the rest of the line is intact and a newline is inserted and point indented. In sum, the selected text is not killed. A fix is to add this sexp to delsel.el: (put 'electric-newline-and-maybe-indent 'delete-selection t) I see that you have already added this sexp instead: (put 'reindent-then-newline-and-indent 'delete-selection t) I can't speak to whether that second sexp is correct or should be removed. I don't use command `reindent-then-newline-and-indent'. In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-06-01 on ODIEONE Bzr revision: 117212 michael.albinus@gmx.de-20140601104945-g88x0mwrxorz302h Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include''