unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
@ 2015-04-14  2:51 Dmitry Gutov
  2015-04-14  3:09 ` Stefan Monnier
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Gutov @ 2015-04-14  2:51 UTC (permalink / raw)
  To: 20323

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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2015-04-14  2:51 bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode Dmitry Gutov
@ 2015-04-14  3:09 ` Stefan Monnier
  2015-04-14 12:16   ` Dmitry Gutov
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2015-04-14  3:09 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 20323

> 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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2015-04-14  3:09 ` Stefan Monnier
@ 2015-04-14 12:16   ` Dmitry Gutov
  2015-04-14 16:57     ` Stefan Monnier
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Gutov @ 2015-04-14 12:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 20323

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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2015-04-14 12:16   ` Dmitry Gutov
@ 2015-04-14 16:57     ` Stefan Monnier
  2015-04-14 22:30       ` Dmitry Gutov
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2015-04-14 16:57 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 20323

> 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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2015-04-14 16:57     ` Stefan Monnier
@ 2015-04-14 22:30       ` Dmitry Gutov
  2015-04-16 20:15         ` Glenn Morris
  2020-01-15  5:17         ` Stefan Kangas
  0 siblings, 2 replies; 15+ messages in thread
From: Dmitry Gutov @ 2015-04-14 22:30 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 20323

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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2015-04-14 22:30       ` Dmitry Gutov
@ 2015-04-16 20:15         ` Glenn Morris
  2015-04-16 20:59           ` Dmitry Gutov
  2015-04-16 21:30           ` Stefan Monnier
  2020-01-15  5:17         ` Stefan Kangas
  1 sibling, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2015-04-16 20:15 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 20323


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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2015-04-16 20:15         ` Glenn Morris
@ 2015-04-16 20:59           ` Dmitry Gutov
  2015-04-16 21:30           ` Stefan Monnier
  1 sibling, 0 replies; 15+ messages in thread
From: Dmitry Gutov @ 2015-04-16 20:59 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 20323

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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2015-04-16 20:15         ` Glenn Morris
  2015-04-16 20:59           ` Dmitry Gutov
@ 2015-04-16 21:30           ` Stefan Monnier
  1 sibling, 0 replies; 15+ messages in thread
From: Stefan Monnier @ 2015-04-16 21:30 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Dmitry Gutov, 20323

> 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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2015-04-14 22:30       ` Dmitry Gutov
  2015-04-16 20:15         ` Glenn Morris
@ 2020-01-15  5:17         ` Stefan Kangas
  2020-01-15  8:21           ` Robert Pluim
  2020-01-15 16:20           ` Eli Zaretskii
  1 sibling, 2 replies; 15+ messages in thread
From: Stefan Kangas @ 2020-01-15  5:17 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Stefan Monnier, 20323

Dmitry Gutov <dgutov@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2020-01-15  5:17         ` Stefan Kangas
@ 2020-01-15  8:21           ` Robert Pluim
  2020-01-15 16:20           ` Eli Zaretskii
  1 sibling, 0 replies; 15+ messages in thread
From: Robert Pluim @ 2020-01-15  8:21 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Dmitry Gutov, Stefan Monnier, 20323

>>>>> On Wed, 15 Jan 2020 06:17:03 +0100, Stefan Kangas <stefan@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2020-01-15  5:17         ` Stefan Kangas
  2020-01-15  8:21           ` Robert Pluim
@ 2020-01-15 16:20           ` Eli Zaretskii
  2020-01-15 18:12             ` Stefan Kangas
  1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2020-01-15 16:20 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: dgutov, monnier, 20323

> From: Stefan Kangas <stefan@marxist.se>
> Date: Wed, 15 Jan 2020 06:17:03 +0100
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 20323@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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2020-01-15 16:20           ` Eli Zaretskii
@ 2020-01-15 18:12             ` Stefan Kangas
  2020-01-16  9:46               ` Robert Pluim
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Kangas @ 2020-01-15 18:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20323, monnier, dgutov

Eli Zaretskii <eliz@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2020-01-15 18:12             ` Stefan Kangas
@ 2020-01-16  9:46               ` Robert Pluim
  2020-01-16 13:38                 ` Stefan Kangas
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Pluim @ 2020-01-16  9:46 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 20323, monnier, dgutov

>>>>> On Wed, 15 Jan 2020 19:12:03 +0100, Stefan Kangas <stefan@marxist.se> said:

    Stefan> Eli Zaretskii <eliz@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2020-01-16  9:46               ` Robert Pluim
@ 2020-01-16 13:38                 ` Stefan Kangas
  2020-02-28 23:06                   ` Stefan Kangas
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Kangas @ 2020-01-16 13:38 UTC (permalink / raw)
  To: Robert Pluim; +Cc: dgutov, monnier, 20323

Robert Pluim <rpluim@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode
  2020-01-16 13:38                 ` Stefan Kangas
@ 2020-02-28 23:06                   ` Stefan Kangas
  0 siblings, 0 replies; 15+ messages in thread
From: Stefan Kangas @ 2020-02-28 23:06 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 20323-done, monnier, dgutov

Stefan Kangas <stefan@marxist.se> writes:

> Robert Pluim <rpluim@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-02-28 23:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-14  2:51 bug#20323: 25.0.50; Emacs's .dir-locals.el should set indent-tabs-mode to nil for emacs-lisp-mode and c-mode Dmitry Gutov
2015-04-14  3:09 ` Stefan Monnier
2015-04-14 12:16   ` Dmitry Gutov
2015-04-14 16:57     ` Stefan Monnier
2015-04-14 22:30       ` Dmitry Gutov
2015-04-16 20:15         ` Glenn Morris
2015-04-16 20:59           ` Dmitry Gutov
2015-04-16 21:30           ` Stefan Monnier
2020-01-15  5:17         ` Stefan Kangas
2020-01-15  8:21           ` Robert Pluim
2020-01-15 16:20           ` Eli Zaretskii
2020-01-15 18:12             ` Stefan Kangas
2020-01-16  9:46               ` Robert Pluim
2020-01-16 13:38                 ` Stefan Kangas
2020-02-28 23:06                   ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).