GNU bug report logs - #28124
24.5; fundamental-mode has electric-indent-mode on by default

Previous Next

Package: emacs;

Reported by: Matthias Meixner <Matthias.Meixner <at> VERIFONE.com>

Date: Thu, 17 Aug 2017 15:15:02 UTC

Severity: normal

Tags: notabug, wontfix

Found in version 24.5

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

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 28124 in the body.
You can then email your comments to 28124 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28124; Package emacs. (Thu, 17 Aug 2017 15:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Meixner <Matthias.Meixner <at> VERIFONE.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 17 Aug 2017 15:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matthias Meixner <Matthias.Meixner <at> VERIFONE.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 24.5; fundamental-mode has electric-indent-mode on by default
Date: Thu, 17 Aug 2017 07:56:39 +0000
[Message part 1 (text/plain, inline)]
Hello!

Fundamental-mode has electric-indent-mode on by default. As a result when pressing return leading whitespace is removed which is highly unexpected in fundamental-mode.

Example:

Buffer has:
1:                                 abc

Cursor is at start of line and pressing enter results in

1:
2:abc

Instead of

1:
2:                                 abc

This is highly unexpected and makes it hard to edit files that have some hand crafted indentation (e.g. ASCII graphics). Trying to insert empty lines destroys the hand crafted indentation. This is not expected when using fundamental-mode and I consider this as a serious bug, since it essentially renders fundamental-mode useless. Globally disabling electric-indent-mode is not an option, since that would also disable it for other modes, where it should be available (e.g. C/C++ mode).

Regards,

Matthias Meixner


In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
of 2016-04-17 on lgw01-04, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11804000
System Description:        Linux Mint 18.1 Serena

Configured using:
`configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
--build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
--libexecdir=/usr/lib --localstatedir=/var/lib
--infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
--with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  delete-selection-mode: t
  show-paren-mode: t
  global-linum-mode: t
  linum-mode: t
  global-auto-revert-mode: t
  cua-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50gtk-doc-tools.el (source)...done
Loading cua-base...done
Loading autorevert...done
Loading linum...done
Loading paren...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Making completion list...

Load-path shadows:
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-mode easymenu MeixnerDefault-theme
delsel paren linum autorevert filenotify cua-base cus-start cus-load
time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind gfilenotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 86363 6975)
(symbols 48 19014 0)
(miscs 40 141 226)
(strings 32 11863 4567)
(string-bytes 1 312461)
(vectors 16 9333)
(vector-slots 8 388005 13951)
(floats 8 75 216)
(intervals 56 303 16)
(buffers 960 13)
(heap 1024 41012 925))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28124; Package emacs. (Thu, 17 Aug 2017 15:54:02 GMT) Full text and rfc822 format available.

Message #8 received at 28124 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matthias Meixner <Matthias.Meixner <at> VERIFONE.com>
Cc: 28124 <at> debbugs.gnu.org
Subject: Re: bug#28124: 24.5;
 fundamental-mode has electric-indent-mode on by default
Date: Thu, 17 Aug 2017 18:53:29 +0300
> From: Matthias Meixner <Matthias.Meixner <at> VERIFONE.com>
> Date: Thu, 17 Aug 2017 07:56:39 +0000
> 
> Fundamental-mode has electric-indent-mode on by default. As a result when pressing return leading
> whitespace is removed which is highly unexpected in fundamental-mode.

Yes, and this is a feature.

> Globally disabling electric-indent-mode is not an option, since that would also disable it for other
> modes, where it should be available (e.g. C/C++ mode).

You can disable the mode locally in the current buffer:

  M-x electric-indent-local-mode RET

(This is mentioned in the doc string of electric-indent-mode.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28124; Package emacs. (Wed, 13 Dec 2017 12:50:02 GMT) Full text and rfc822 format available.

Message #11 received at 28124 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Matthias Meixner <Matthias.Meixner <at> VERIFONE.com>, 28124 <at> debbugs.gnu.org
Subject: Re: bug#28124: 24.5;
 fundamental-mode has electric-indent-mode on by default
Date: Wed, 13 Dec 2017 07:48:56 -0500
# intended behaviour
tags 28124 notabug wontfix
close 28124
quit

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Matthias Meixner <Matthias.Meixner <at> VERIFONE.com>
>> Date: Thu, 17 Aug 2017 07:56:39 +0000
>> 
>> Fundamental-mode has electric-indent-mode on by default. As a result when pressing return leading
>> whitespace is removed which is highly unexpected in fundamental-mode.
>
> Yes, and this is a feature.
>
>> Globally disabling electric-indent-mode is not an option, since that would also disable it for other
>> modes, where it should be available (e.g. C/C++ mode).
>
> You can disable the mode locally in the current buffer:
>
>   M-x electric-indent-local-mode RET
>
> (This is mentioned in the doc string of electric-indent-mode.)

Therefore closing as wontfix.




Added tag(s) notabug and wontfix. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Wed, 13 Dec 2017 12:50:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 28124 <at> debbugs.gnu.org and Matthias Meixner <Matthias.Meixner <at> VERIFONE.com> Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Wed, 13 Dec 2017 12:50:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 11 Jan 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.