GNU bug report logs -
#17737
24.4.50; REGRESSION: `delete-selection-mode' broken by `electric-indent-mode' change
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sun, 8 Jun 2014 15:31:02 UTC
Severity: normal
Found in version 24.4.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17737 in the body.
You can then email your comments to 17737 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17737
; Package
emacs
.
(Sun, 08 Jun 2014 15:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 08 Jun 2014 15:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> gmx.de-20140601104945-g88x0mwrxorz302h
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/snapshot/trunk
--enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
-Ic:/Devel/emacs/include''
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Tue, 17 Jun 2014 13:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Drew Adams <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Tue, 17 Jun 2014 13:41:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 17737-done <at> debbugs.gnu.org (full text, mbox):
> A fix is to add this sexp to delsel.el:
> (put 'electric-newline-and-maybe-indent 'delete-selection t)
Indeed, thanks, done,
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 16 Jul 2014 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 337 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.