GNU bug report logs - #16770
Erroneous interaction between electric-indent-mode and electric-indent-local-mode

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sun, 16 Feb 2014 17:17:02 UTC

Severity: minor

Done: Stefan Kangas <stefan <at> marxist.se>

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 16770 in the body.
You can then email your comments to 16770 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#16770; Package emacs. (Sun, 16 Feb 2014 17:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Mackenzie <acm <at> muc.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 16 Feb 2014 17:17:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Erroneous interaction between electric-indent-mode and
 electric-indent-local-mode
Date: Sun, 16 Feb 2014 17:12:14 +0000
Hi, Emacs.

1. Start emacs -Q.
2. Visit, successively, two random buffers foo and bar.
3. In buffer foo, do M-x electric-indent-local-mode.
4. In buffer bar, do M-x electric-indent-mode.

Both buffers now have e-i-mode disabled.

5. Still in buffer bar, do M-x electric-indent-mode.

This, being a global mode, should enable e-i-mode in all buffers.  But
in buffer foo, electric-indent-mode remains disabled.  This is a bug.

Suggestion for a fix: make electric-indent-local-mode a self-sufficient
minor mode, and define electric-indent-mode with
define-globalized-minor-mode.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16770; Package emacs. (Tue, 18 Feb 2014 16:42:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 16770 <at> debbugs.gnu.org
Subject: Re: bug#16770: Erroneous interaction between electric-indent-mode and
 electric-indent-local-mode
Date: Tue, 18 Feb 2014 11:40:43 -0500
> Suggestion for a fix: make electric-indent-local-mode a self-sufficient
> minor mode, and define electric-indent-mode with
> define-globalized-minor-mode.

I don't think it's worth the trouble.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16770; Package emacs. (Tue, 18 Feb 2014 18:28:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 16770 <at> debbugs.gnu.org
Subject: Re: bug#16770: Erroneous interaction between electric-indent-mode and
 electric-indent-local-mode
Date: Tue, 18 Feb 2014 13:26:56 -0500
> 1. Start emacs -Q.
> 2. Visit, successively, two random buffers foo and bar.
> 3. In buffer foo, do M-x electric-indent-local-mode.
> 4. In buffer bar, do M-x electric-indent-mode.

> Both buffers now have e-i-mode disabled.

> 5. Still in buffer bar, do M-x electric-indent-mode.

> This, being a global mode, should enable e-i-mode in all buffers.  But
> in buffer foo, electric-indent-mode remains disabled.  This is a bug.

Actually, upon further consideration, I don't think this one is a bug.
The behavior you want would make sense, but the current one also
makes sense.  At step 3 the user specifically requested to disable
electric-indent in `foo' so changing the global setting should not
affect it.

So the real problem is that electric-indent-local-mode is not consistent
in this regard (it sometimes remembers a local setting even if it's
equal to the global setting, and sometimes treats a local setting equal
to the global setting as meaning "obey the global setting").

Worse:

   (electric-indent-mode -1)
   (electric-indent-local-mode 1)
   (electric-indent-mode 1)
   (electric-indent-mode -1)

leaves us with a buffer where electric-indent-mode is locally t but
there is no electric indentation.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16770; Package emacs. (Thu, 20 Mar 2014 18:10:02 GMT) Full text and rfc822 format available.

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

From: Stefan <monnier <at> iro.umontreal.ca>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 16770 <at> debbugs.gnu.org
Subject: Re: bug#16770: Erroneous interaction between electric-indent-mode and
 electric-indent-local-mode
Date: Thu, 20 Mar 2014 14:09:23 -0400
>    (electric-indent-mode -1)
>    (electric-indent-local-mode 1)
>    (electric-indent-mode 1)
>    (electric-indent-mode -1)

> leaves us with a buffer where electric-indent-mode is locally t but
> there is no electric indentation.

I think I fixed this, now, as well as the "C-j is newline even after
disabling electric-indent-local-mode".


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16770; Package emacs. (Fri, 05 Feb 2016 20:11:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 16770 <at> debbugs.gnu.org
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16770: Erroneous interaction between electric-indent-mode and
 electric-indent-local-mode
Date: Fri, 05 Feb 2016 15:10:13 -0500
It seems to me that the issues here that were going to get fixed, did,
so I suggest closing it.




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Mon, 30 Sep 2019 04:01:02 GMT) Full text and rfc822 format available.

Notification sent to Alan Mackenzie <acm <at> muc.de>:
bug acknowledged by developer. (Mon, 30 Sep 2019 04:01:03 GMT) Full text and rfc822 format available.

Message #22 received at 16770-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Alan Mackenzie <acm <at> muc.de>, 16770-done <at> debbugs.gnu.org,
 Stefan <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16770: Erroneous interaction between electric-indent-mode and
 electric-indent-local-mode
Date: Mon, 30 Sep 2019 06:00:07 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> It seems to me that the issues here that were going to get fixed, did,
> so I suggest closing it.

OK, closing this now.

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 28 Oct 2019 11:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 182 days ago.

Previous Next


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