GNU bug report logs - #12199
c-guess doesn't guess indent-tabs-mode

Previous Next

Packages: emacs, cc-mode;

Reported by: Johan Walles <johan.walles <at> gmail.com>

Date: Tue, 14 Aug 2012 15:58:01 UTC

Severity: normal

Found in versions 26.1, 24.1.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 12199 in the body.
You can then email your comments to 12199 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#12199; Package emacs. (Tue, 14 Aug 2012 15:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johan Walles <johan.walles <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 14 Aug 2012 15:58:01 GMT) Full text and rfc822 format available.

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

From: Johan Walles <johan.walles <at> gmail.com>
To: submit <at> debbugs.gnu.org
Subject: c-guess doesn't guess indent-tabs-mode
Date: Tue, 14 Aug 2012 09:20:37 +0200
Package: emacs
Version: 24.1.1

Hi Emacsers!

c-guess seems not to guess the correct value for indent-tabs-mode.

Try this:
1. Set indent-tabs-mode to nil.
2. Load a C file indented with tabs.
3. c-guess
4. Do describe-variable on indent-tabs-mode

Current result:
"Its value is nil"

Expected result:
"Its value is t" (since c-guess should have noticed that tabs are used
for indentation)

Note:
In my case this makes c-guess much less useful than it could have
been, since I work on both tab and space indented files.

  Regards //Johan




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#12199; Package emacs,cc-mode. (Wed, 30 Oct 2019 23:29:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Johan Walles <johan.walles <at> gmail.com>
Cc: 12199 <at> debbugs.gnu.org
Subject: Re: bug#12199: c-guess doesn't guess indent-tabs-mode
Date: Thu, 31 Oct 2019 00:28:20 +0100
found 12199 26.1
thanks

Johan Walles <johan.walles <at> gmail.com> writes:

> Package: emacs
> Version: 24.1.1
>
> Hi Emacsers!
>
> c-guess seems not to guess the correct value for indent-tabs-mode.
>
> Try this:
> 1. Set indent-tabs-mode to nil.
> 2. Load a C file indented with tabs.
> 3. c-guess
> 4. Do describe-variable on indent-tabs-mode
>
> Current result:
> "Its value is nil"
>
> Expected result:
> "Its value is t" (since c-guess should have noticed that tabs are used
> for indentation)
>
> Note:
> In my case this makes c-guess much less useful than it could have
> been, since I work on both tab and space indented files.
>
>   Regards //Johan

I can reproduce this on Emacs 26.1.  I'm not sure if this is a bug or a
feature request.

Best regards,
Stefan Kangas




bug Marked as found in versions 26.1. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 30 Oct 2019 23:29:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#12199; Package emacs,cc-mode. (Tue, 01 Jun 2021 07:36:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Johan Walles <johan.walles <at> gmail.com>
Cc: Alan Mackenzie <acm <at> muc.de>, 12199 <at> debbugs.gnu.org
Subject: Re: bug#12199: c-guess doesn't guess indent-tabs-mode
Date: Tue, 01 Jun 2021 09:35:19 +0200
[Message part 1 (text/plain, inline)]
Johan Walles <johan.walles <at> gmail.com> writes:

> Try this:
> 1. Set indent-tabs-mode to nil.
> 2. Load a C file indented with tabs.
> 3. c-guess
> 4. Do describe-variable on indent-tabs-mode
>
> Current result:
> "Its value is nil"
>
> Expected result:
> "Its value is t" (since c-guess should have noticed that tabs are used
> for indentation)

This still seems to be the case in Emacs 28.

I've included my test file here.  Perhaps Alan has some insights here?
(Added to the CCs.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no
[indent.c (text/x-csrc, inline)]
main () {
	foo();
	bar();
}

Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#12199; Package emacs,cc-mode. (Tue, 01 Jun 2021 12:03:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: acm <at> muc.de, 12199 <at> debbugs.gnu.org, johan.walles <at> gmail.com
Subject: Re: bug#12199: c-guess doesn't guess indent-tabs-mode
Date: Tue, 01 Jun 2021 15:01:42 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Tue, 01 Jun 2021 09:35:19 +0200
> Cc: Alan Mackenzie <acm <at> muc.de>, 12199 <at> debbugs.gnu.org
> 
> > Try this:
> > 1. Set indent-tabs-mode to nil.
> > 2. Load a C file indented with tabs.
> > 3. c-guess
> > 4. Do describe-variable on indent-tabs-mode
> >
> > Current result:
> > "Its value is nil"
> >
> > Expected result:
> > "Its value is t" (since c-guess should have noticed that tabs are used
> > for indentation)
> 
> This still seems to be the case in Emacs 28.
> 
> I've included my test file here.  Perhaps Alan has some insights here?
> (Added to the CCs.)

AFAICT, c-guess.el doesn't try to guess the value of indent-tabs-mode,
it only guesses indentation parameters specific to CC Mode.

IOW, this feature, if it belongs to c-guess.el, was never implemented.




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#12199; Package emacs,cc-mode. (Wed, 02 Jun 2021 05:14:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: acm <at> muc.de, 12199 <at> debbugs.gnu.org, johan.walles <at> gmail.com
Subject: Re: bug#12199: c-guess doesn't guess indent-tabs-mode
Date: Wed, 02 Jun 2021 07:13:23 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> AFAICT, c-guess.el doesn't try to guess the value of indent-tabs-mode,
> it only guesses indentation parameters specific to CC Mode.

Ah, right.  And looking more closely at that file, it doesn't talk about
indent-tabs-mode at all, so I guess this bug report it mistaken.  (But
as you say, it could possibly be a new feature.)

But c-guess works as documented here, I'm closing this bug report.

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




bug closed, send any further explanations to 12199 <at> debbugs.gnu.org and Johan Walles <johan.walles <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 02 Jun 2021 05:14: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. (Wed, 30 Jun 2021 11:24:10 GMT) Full text and rfc822 format available.

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

Previous Next


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