GNU bug report logs - #49971
28.0.50; indent-tabs-mode not working globally

Previous Next

Package: emacs;

Reported by: Gabriel <gabriel376 <at> hotmail.com>

Date: Mon, 9 Aug 2021 21:21:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 49971 in the body.
You can then email your comments to 49971 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#49971; Package emacs. (Mon, 09 Aug 2021 21:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel <gabriel376 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 09 Aug 2021 21:21:02 GMT) Full text and rfc822 format available.

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

From: Gabriel <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; indent-tabs-mode not working globally
Date: Mon, 09 Aug 2021 18:15:46 -0300
It seems that the new 'indent-tabs-mode' minor-mode, although defined as
global, it's working as a buffer-local minor-mode. Using emacs from
master branch built today:

1. emacs -Q
2. C-h v 'indent-tabs-mode' (value is t)
3. eval '(indent-tabs-mode -1)'
4. C-h v 'indent-tabs-mode' (local value is nil; global value is t)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49971; Package emacs. (Tue, 10 Aug 2021 02:27:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gabriel <gabriel376 <at> hotmail.com>
Cc: 49971 <at> debbugs.gnu.org
Subject: Re: bug#49971: 28.0.50; indent-tabs-mode not working globally
Date: Tue, 10 Aug 2021 05:26:31 +0300
> From: Gabriel <gabriel376 <at> hotmail.com>
> Date: Mon, 09 Aug 2021 18:15:46 -0300
> 
> It seems that the new 'indent-tabs-mode' minor-mode, although defined as
> global, it's working as a buffer-local minor-mode. Using emacs from
> master branch built today:
> 
> 1. emacs -Q
> 2. C-h v 'indent-tabs-mode' (value is t)
> 3. eval '(indent-tabs-mode -1)'
> 4. C-h v 'indent-tabs-mode' (local value is nil; global value is t)

Where did you see that it's "defined as global"?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49971; Package emacs. (Tue, 10 Aug 2021 02:34:01 GMT) Full text and rfc822 format available.

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

From: Gabriel <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#49971: 28.0.50; indent-tabs-mode not working globally
Date: Mon, 09 Aug 2021 23:33:37 -0300
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Gabriel <gabriel376 <at> hotmail.com>
>> Date: Mon, 09 Aug 2021 18:15:46 -0300
>> 
>> It seems that the new 'indent-tabs-mode' minor-mode, although defined as
>> global, it's working as a buffer-local minor-mode. Using emacs from
>> master branch built today:
>> 
>> 1. emacs -Q
>> 2. C-h v 'indent-tabs-mode' (value is t)
>> 3. eval '(indent-tabs-mode -1)'
>> 4. C-h v 'indent-tabs-mode' (local value is nil; global value is t)
>
> Where did you see that it's "defined as global"?

On simple.el:

(define-minor-mode indent-tabs-mode
  "Toggle whether indentation can insert TAB characters."
  :global t :group 'indent :variable indent-tabs-mode)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49971; Package emacs. (Tue, 10 Aug 2021 11:58:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gabriel <gabriel376 <at> hotmail.com>
Cc: 49971 <at> debbugs.gnu.org
Subject: Re: bug#49971: 28.0.50; indent-tabs-mode not working globally
Date: Tue, 10 Aug 2021 14:57:18 +0300
> From: Gabriel <gabriel376 <at> hotmail.com>
> Date: Mon, 09 Aug 2021 23:33:37 -0300
> 
> >> 1. emacs -Q
> >> 2. C-h v 'indent-tabs-mode' (value is t)
> >> 3. eval '(indent-tabs-mode -1)'
> >> 4. C-h v 'indent-tabs-mode' (local value is nil; global value is t)
> >
> > Where did you see that it's "defined as global"?
> 
> On simple.el:
> 
> (define-minor-mode indent-tabs-mode
>   "Toggle whether indentation can insert TAB characters."
>   :global t :group 'indent :variable indent-tabs-mode)

That's the mode, but in your recipe you are looking at the variable,
not the mode.  And the documentation of the variable clearly says:

  Automatically becomes buffer-local when set.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49971; Package emacs. (Tue, 10 Aug 2021 12:09:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Gabriel <gabriel376 <at> hotmail.com>, 49971 <at> debbugs.gnu.org
Subject: Re: bug#49971: 28.0.50; indent-tabs-mode not working globally
Date: Tue, 10 Aug 2021 14:08:19 +0200
On Aug 10 2021, Eli Zaretskii wrote:

>> From: Gabriel <gabriel376 <at> hotmail.com>
>> Date: Mon, 09 Aug 2021 23:33:37 -0300
>> 
>> >> 1. emacs -Q
>> >> 2. C-h v 'indent-tabs-mode' (value is t)
>> >> 3. eval '(indent-tabs-mode -1)'
>> >> 4. C-h v 'indent-tabs-mode' (local value is nil; global value is t)
>> >
>> > Where did you see that it's "defined as global"?
>> 
>> On simple.el:
>> 
>> (define-minor-mode indent-tabs-mode
>>   "Toggle whether indentation can insert TAB characters."
>>   :global t :group 'indent :variable indent-tabs-mode)
>
> That's the mode, but in your recipe you are looking at the variable,
> not the mode.  And the documentation of the variable clearly says:
>
>   Automatically becomes buffer-local when set.

That's because it's explicitly made that way (bindings.el:799) despite
the :global declaration (which is about the _variable_ not the mode).

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49971; Package emacs. (Tue, 10 Aug 2021 13:31:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: gabriel376 <at> hotmail.com, 49971 <at> debbugs.gnu.org
Subject: Re: bug#49971: 28.0.50; indent-tabs-mode not working globally
Date: Tue, 10 Aug 2021 16:30:34 +0300
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: Gabriel <gabriel376 <at> hotmail.com>,  49971 <at> debbugs.gnu.org
> Date: Tue, 10 Aug 2021 14:08:19 +0200
> 
> On Aug 10 2021, Eli Zaretskii wrote:
> 
> >> (define-minor-mode indent-tabs-mode
> >>   "Toggle whether indentation can insert TAB characters."
> >>   :global t :group 'indent :variable indent-tabs-mode)
> >
> > That's the mode, but in your recipe you are looking at the variable,
> > not the mode.  And the documentation of the variable clearly says:
> >
> >   Automatically becomes buffer-local when set.
> 
> That's because it's explicitly made that way (bindings.el:799) despite
> the :global declaration (which is about the _variable_ not the mode).

Apologies.  But then I don't understand why we'd want this to be a
global minor mode.  Lars?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49971; Package emacs. (Tue, 10 Aug 2021 13:41:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: gabriel376 <at> hotmail.com, Andreas Schwab <schwab <at> linux-m68k.org>,
 49971 <at> debbugs.gnu.org
Subject: Re: bug#49971: 28.0.50; indent-tabs-mode not working globally
Date: Tue, 10 Aug 2021 15:40:27 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> That's because it's explicitly made that way (bindings.el:799) despite
>> the :global declaration (which is about the _variable_ not the mode).
>
> Apologies.  But then I don't understand why we'd want this to be a
> global minor mode.  Lars?

Uhm...  I think the :global t may be a mistake here -- I was just
following the suggestion in bug#6276 without thinking much about it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49971; Package emacs. (Mon, 22 Aug 2022 12:03:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: gabriel376 <at> hotmail.com, Andreas Schwab <schwab <at> linux-m68k.org>,
 49971 <at> debbugs.gnu.org
Subject: Re: bug#49971: 28.0.50; indent-tabs-mode not working globally
Date: Mon, 22 Aug 2022 14:02:44 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Uhm...  I think the :global t may be a mistake here -- I was just
> following the suggestion in bug#6276 without thinking much about it.

I've now fixed this in Emacs 29.




bug marked as fixed in version 29.1, send any further explanations to 49971 <at> debbugs.gnu.org and Gabriel <gabriel376 <at> hotmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 22 Aug 2022 12:03:02 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. (Tue, 20 Sep 2022 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 210 days ago.

Previous Next


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