GNU bug report logs -
#20323
25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Tue, 14 Apr 2015 02:52:01 UTC
Severity: wishlist
Found in version 25.0.50
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 20323 in the body.
You can then email your comments to 20323 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#20323
; Package
emacs
.
(Tue, 14 Apr 2015 02:52:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 14 Apr 2015 02:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
According to the previous discussions, we don't want to reformat code in
bulk. Still, it would be better to converge on one style eventually.
Regardless of how bug#20322 ends up, setting indent-tabs-mode in this
repository's top-level .dir-locals.el will be an improvement.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Tue, 14 Apr 2015 03:10:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 20323 <at> debbugs.gnu.org (full text, mbox):
> According to the previous discussions, we don't want to reformat code in
> bulk. Still, it would be better to converge on one style eventually.
> Regardless of how bug#20322 ends up, setting indent-tabs-mode in this
> repository's top-level .dir-locals.el will be an improvement.
My life is a lot better now that I simply pay no attention to
these issues.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Tue, 14 Apr 2015 12:17:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 20323 <at> debbugs.gnu.org (full text, mbox):
On 04/14/2015 06:09 AM, Stefan Monnier wrote:
> My life is a lot better now that I simply pay no attention to
> these issues.
Then you wouldn't mind this change either, right? ;-)
The OCD people should feel a little better, and everybody else will just
move on.
Unless someone is particularly fond of the tabs-and-spaces mix we get in
indentation inside .el files, of course. But normally, mixing them is
considered combining the worst of the two worlds.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Tue, 14 Apr 2015 16:59:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 20323 <at> debbugs.gnu.org (full text, mbox):
> The OCD people should feel a little better, and everybody else will just
> move on.
Half of the OCD people will feel a bit better and the other half will
go bonkers.
But yes, I personally couldn't care less about the value of
indent-tabs-mode in emacs-lisp-mode and c-mode inside the Emacs sources.
[ The main point here is that it should only affect the Emacs
source code. ]
So feel free to change it any way you like. You can even have
a commit-fight-fest where people keep changing it back and forth, if
you like.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Tue, 14 Apr 2015 22:31:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 20323 <at> debbugs.gnu.org (full text, mbox):
On 04/14/2015 07:57 PM, Stefan Monnier wrote:
> Half of the OCD people will feel a bit better and the other half will
> go bonkers.
As a card-carrying member of the OCD club (not really), a definite
choice in favor of the opposition would still be better than no choice,
in my book.
> But yes, I personally couldn't care less about the value of
> indent-tabs-mode in emacs-lisp-mode and c-mode inside the Emacs sources.
> [ The main point here is that it should only affect the Emacs
> source code. ]
Yes, this bug is about the dir-locals file.
> So feel free to change it any way you like. You can even have
> a commit-fight-fest where people keep changing it back and forth, if
> you like.
Sounds fun!
I haven't seen much of support for the c-mode side in this issue, so
guess I'll limit the fight-fest to the emast-lisp-mode value, for now.
Anyone interested in the C side of this is welcome to join.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Thu, 16 Apr 2015 20:16:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 20323 <at> debbugs.gnu.org (full text, mbox):
I've long since done what seems to me to be the sensible thing:
use a mode-hook to set indent-tabs-mode to whatever the (pre-existing)
file I'm editing seems to use.
I won't claim it's always right (for those files where the indentation
is mixed), but it's worked pretty well for me.
The fact that indent-tabs-mode has been added to dir-locals now breaks
this, since dir-locals take precedence over mode hooks (bug#1986).
So for me, this change increases the likelihood of me committing stuff
that does not match the existing indentation style. Ie, adding it to
dir-locals without untabifying every file (something which has already
been rejected) has made things worse IMO.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Thu, 16 Apr 2015 21:00:05 GMT)
Full text and
rfc822 format available.
Message #23 received at 20323 <at> debbugs.gnu.org (full text, mbox):
On 04/16/2015 11:15 PM, Glenn Morris wrote:
>
> I've long since done what seems to me to be the sensible thing:
>
> use a mode-hook to set indent-tabs-mode to whatever the (pre-existing)
> file I'm editing seems to use.
>
> I won't claim it's always right (for those files where the indentation
> is mixed), but it's worked pretty well for me.
That sounds like a great approach, but not for this case.
> The fact that indent-tabs-mode has been added to dir-locals now breaks
> this, since dir-locals take precedence over mode hooks (bug#1986).
Why is that a problem? If dir-locals take precedence, then the result
will be that your commits won't use tabs, except in certain subprojects
like gnus or erc, which have set file-local vars differently.
That's the original intent behind this proposal: to converge all .el
files to one indentation style, eventually.
> So for me, this change increases the likelihood of me committing stuff
> that does not match the existing indentation style. Ie, adding it to
> dir-locals without untabifying every file (something which has already
> been rejected) has made things worse IMO.
You seen to consider the presence of different indentation styles in any
specific file to be the main problem. I disagree: most files already
contain both styles, and having different styles within the project is
not much better.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Thu, 16 Apr 2015 21:31:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 20323 <at> debbugs.gnu.org (full text, mbox):
> I've long since done what seems to me to be the sensible thing:
> use a mode-hook to set indent-tabs-mode to whatever the (pre-existing)
> file I'm editing seems to use.
Sounds like a good approach. We could do that in prog-mode.
> So for me, this change increases the likelihood of me committing stuff
> that does not match the existing indentation style. Ie, adding it to
> dir-locals without untabifying every file (something which has already
> been rejected) has made things worse IMO.
My impression is that most Emacs's lisp files already have a mix anyway,
and I don't think that's a serious problem.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Wed, 15 Jan 2020 05:18:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 20323 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
>> But yes, I personally couldn't care less about the value of
>> indent-tabs-mode in emacs-lisp-mode and c-mode inside the Emacs sources.
>> [ The main point here is that it should only affect the Emacs
>> source code. ]
>
> Yes, this bug is about the dir-locals file.
>
>> So feel free to change it any way you like. You can even have
>> a commit-fight-fest where people keep changing it back and forth, if
>> you like.
>
> Sounds fun!
>
> I haven't seen much of support for the c-mode side in this issue, so guess I'll
> limit the fight-fest to the emast-lisp-mode value, for now.
I see in emacs/.dir-locals.el the following line:
(emacs-lisp-mode . ((indent-tabs-mode . nil)
So that part of this issue has already been done.
> Anyone interested in the C side of this is welcome to join.
Does anyone object to adding the same setting as above for c-mode?
If yes, I suggest to leave things as is and close the bug.
Best regards,
Stefan Kangas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Wed, 15 Jan 2020 08:22:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 20323 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Wed, 15 Jan 2020 06:17:03 +0100, Stefan Kangas <stefan <at> marxist.se> said:
>> Anyone interested in the C side of this is welcome to join.
Stefan> Does anyone object to adding the same setting as above for c-mode?
Stefan> If yes, I suggest to leave things as is and close the bug.
At the risk of inflaming the discussions: Iʼm strongly in favour of
having indent-tabs-mode set to nil for Emacs' sources.
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Wed, 15 Jan 2020 16:21:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 20323 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Wed, 15 Jan 2020 06:17:03 +0100
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 20323 <at> debbugs.gnu.org
>
> I see in emacs/.dir-locals.el the following line:
>
> (emacs-lisp-mode . ((indent-tabs-mode . nil)
>
> So that part of this issue has already been done.
>
> > Anyone interested in the C side of this is welcome to join.
>
> Does anyone object to adding the same setting as above for c-mode?
What, use only spaces in C sources? Please don't.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Wed, 15 Jan 2020 18:13:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 20323 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Does anyone object to adding the same setting as above for c-mode?
>
> What, use only spaces in C sources? Please don't.
OK. So how about setting indent-tabs-mode to t instead?
I prefer spaces myself, but I guess any convention is better than no
convention at all? Or should we just leave this alone?
Best regards,
Stefan Kangas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Thu, 16 Jan 2020 09:48:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 20323 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Wed, 15 Jan 2020 19:12:03 +0100, Stefan Kangas <stefan <at> marxist.se> said:
Stefan> Eli Zaretskii <eliz <at> gnu.org> writes:
>>> Does anyone object to adding the same setting as above for c-mode?
>>
>> What, use only spaces in C sources? Please don't.
Stefan> OK. So how about setting indent-tabs-mode to t instead?
Stefan> I prefer spaces myself, but I guess any convention is better than no
Stefan> convention at all? Or should we just leave this alone?
If we canʼt agree on a convention, then we should not enforce one =>
leave this alone.
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20323
; Package
emacs
.
(Thu, 16 Jan 2020 13:39:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 20323 <at> debbugs.gnu.org (full text, mbox):
Robert Pluim <rpluim <at> gmail.com> writes:
> If we canʼt agree on a convention, then we should not enforce one =>
> leave this alone.
OK. In that case, I don't think there is anything more to do here.
If no one objects within a week or two, I will close this bug.
Best regards,
Stefan Kangas
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Fri, 28 Feb 2020 23:07:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
bug acknowledged by developer.
(Fri, 28 Feb 2020 23:07:02 GMT)
Full text and
rfc822 format available.
Message #49 received at 20323-done <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefan <at> marxist.se> writes:
> Robert Pluim <rpluim <at> gmail.com> writes:
>
>> If we canʼt agree on a convention, then we should not enforce one =>
>> leave this alone.
>
> OK. In that case, I don't think there is anything more to do here.
> If no one objects within a week or two, I will close this bug.
No objections within 6 weeks, so I'm closing the bug 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
.
(Sat, 28 Mar 2020 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.