From unknown Wed Jun 18 23:07:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#17737 <17737@debbugs.gnu.org> To: bug#17737 <17737@debbugs.gnu.org> Subject: Status: 24.4.50; REGRESSION: `delete-selection-mode' broken by `electric-indent-mode' change Reply-To: bug#17737 <17737@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:07:38 +0000 retitle 17737 24.4.50; REGRESSION: `delete-selection-mode' broken by `elect= ric-indent-mode' change reassign 17737 emacs submitter 17737 Drew Adams severity 17737 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 08 11:30:57 2014 Received: (at submit) by debbugs.gnu.org; 8 Jun 2014 15:30:57 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 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 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 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 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 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 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 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 MIME-Version: 1.0 Message-ID: Date: Sun, 8 Jun 2014 08:30:14 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 24.4.50; REGRESSION: `delete-selection-mode' broken by `electric-indent-mode' change X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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'' From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 17 09:40:57 2014 Received: (at 17737-done) by debbugs.gnu.org; 17 Jun 2014 13:40:57 +0000 Received: from localhost ([127.0.0.1]:50167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wwtd6-0000oy-J6 for submit@debbugs.gnu.org; Tue, 17 Jun 2014 09:40:57 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:14233) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wwtcz-0000og-I4 for 17737-done@debbugs.gnu.org; Tue, 17 Jun 2014 09:40:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqBcYFbIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="67097165" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 17 Jun 2014 09:40:39 -0400 Received: by pastel.home (Postfix, from userid 20848) id A9B6460D53; Tue, 17 Jun 2014 09:40:39 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#17737: 24.4.50; REGRESSION: `delete-selection-mode' broken by `electric-indent-mode' change Message-ID: References: Date: Tue, 17 Jun 2014 09:40:39 -0400 In-Reply-To: (Drew Adams's message of "Sun, 8 Jun 2014 08:30:14 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17737-done Cc: 17737-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > A fix is to add this sexp to delsel.el: > (put 'electric-newline-and-maybe-indent 'delete-selection t) Indeed, thanks, done, Stefan From unknown Wed Jun 18 23:07:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 16 Jul 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator