From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 20322@debbugs.gnu.org
Subject: bug#20322: 25.0.50; indent-tabs-mode should default to nil
Date: Fri, 17 Apr 2015 10:26:44 +0300 [thread overview]
Message-ID: <83y4lr8bbf.fsf@gnu.org> (raw)
In-Reply-To: <55307468.8070307@yandex.ru>
> Date: Fri, 17 Apr 2015 05:48:08 +0300
> From: Dmitry Gutov <dgutov@yandex.ru>
> CC: 20322@debbugs.gnu.org
>
> On 04/15/2015 07:10 PM, Eli Zaretskii wrote:
>
> > If it turns out that most of the modes need indent-tabs-mode set to
> > nil, you can make it the default in prog-mode, or even in fundamental
> > mode.
>
> Make it the default in fundamental mode means changing the default value
> of the variable.
Yes, I know that. I'm saying that this default doesn't bother me, as
long as the modes that I care about still default to non-nil.
> > As long as the modes that don't need to avoid tabs are changed
> > to have the same default as now, I won't object.
>
> I'm not aware of any popular programming language that doesn't work with
> tabs for indentation. So "need" is a pretty strong word.
I meant "need" as in "most users of that language already use spaces".
> If the
> statistics show that spaces are more popular on GitHub for C and C++,
> why not follow the logical conclusion and change the defaults for those
> modes, too?
I don't consider GitHub to be a representative sample for this matter.
> Note that cc-mode also services the needs of Emacs users writing Java
> and Objective-C (all seven of them), and those folks must be relatively
> modern-inclined.
Each one of them has a specific hook to take care of that, if needed.
Moreover, if most users of ObjC or Java want spaces, let's make that
change in the respective mode, java-mode etc.
> And while I wouldn't mind leaving this bee's nest "as is", there's no
> way to do that just for C and C++ without introducing additional
> complication for users that *do* want to use spaces with those langs.
I don't see any complications. Doesn't everyone have their own hooks
for every language they use, anyway? I know I do, since almost the
first day I started using Emacs. That hook is the place where users
could customize the variable, if they don't the defaults.
> >> Like I said, in the end that would call for the change of the
> >> default value. In the meantime, should we have an
> >> xxx-indent-tabs-mode variable per major mode?
> >
> > I don't see a need for a mode-specific variable in this case; do you?
>
> How, then, will the users change that value? With `add-hook',
> `xxx-mode-hook' and a lambda function?
See above; and it doesn't have to be a lambda function, of course.
Mine has a name (my-c-stuff, if you want to know) and a doc string.
> That's a significant jump in complexity from what's currently needed to
> change `indent-tabs-mode' - either `setq-default', or actually using the
> `Customize' interface.
We are talking about programmers, for whom having a mode hook is not a
problem. I'm actually guessing they already have such a hook anyway;
I cannot see how one can use a programming-language mode without a lot
of customizations, and the place to do that is in a mode hook. This
is normal, routine practice in Emacs.
> >>> The vast majority of people I work with use tabs, FWIW.
> >>
> >> Do they use 8-column offsets, then?
> >
> > No (that's how I know they use tabs in the first place!).
>
> One of us doesn't understand the other here. Just to be sure: I meant
> `c-basic-offset', not `tab-width'.
Yes, I know that. People I was talking about don't use 8 columns at
all, neither for the tab width, nor for the offsets.
> > For a customizable option, this is not an issue. I can understand
> > that the new generation may want to get rid of tabs, but since most of
> > that generation don't work in C/C++, I think we can leave those alone
> > for now.
>
> The question is not what the majority of the "new generation" works in
> (probably Java, or PHP), but what fraction of C/C++ programmers uses spaces.
I gave you my personal statistics on that: most of them use tabs. And
I personally get annoyed whenever a project asks me to untabify my
submissions (but abide, of course).
next prev parent reply other threads:[~2015-04-17 7:26 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 2:37 bug#20322: 25.0.50; indent-tabs-mode should default to nil Dmitry Gutov
2015-04-14 3:07 ` Stefan Monnier
2015-04-14 14:14 ` Dmitry Gutov
2015-04-14 15:25 ` Eli Zaretskii
2015-04-14 15:39 ` Dmitry Gutov
2015-04-14 15:59 ` Eli Zaretskii
2015-04-14 20:24 ` Dmitry Gutov
2015-04-14 21:43 ` Stefan Monnier
2015-04-14 22:17 ` Dmitry Gutov
2015-04-15 1:19 ` Stefan Monnier
2015-04-15 2:08 ` Dmitry Gutov
2015-04-15 4:19 ` Stefan Monnier
2015-04-20 14:56 ` Dmitry Gutov
2015-04-20 19:26 ` Stefan Monnier
2015-04-20 22:09 ` Dmitry Gutov
2015-04-21 1:25 ` Stefan Monnier
2015-04-21 19:25 ` Dmitry Gutov
2015-04-21 19:47 ` Eli Zaretskii
2015-04-22 15:02 ` Dmitry Gutov
2015-04-22 15:18 ` Eli Zaretskii
2015-04-22 15:23 ` Dmitry Gutov
2015-04-22 15:28 ` Eli Zaretskii
2015-04-22 15:49 ` Dmitry Gutov
2015-04-21 20:27 ` Stefan Monnier
2015-04-21 20:51 ` Dmitry Gutov
2015-04-22 13:56 ` Stefan Monnier
2015-04-22 14:59 ` Dmitry Gutov
2015-04-22 16:47 ` Stefan Monnier
2015-11-02 18:18 ` Dmitry Gutov
2015-11-02 20:37 ` John Wiegley
2015-11-02 21:03 ` Dmitry Gutov
2015-11-02 21:18 ` John Wiegley
2015-11-02 21:06 ` Eli Zaretskii
2015-11-02 21:29 ` John Wiegley
2015-11-02 23:31 ` Richard Stallman
2015-11-03 3:32 ` Eli Zaretskii
2015-11-02 23:31 ` Richard Stallman
2015-04-15 14:31 ` Wolfgang Jenkner
2015-04-15 16:10 ` Eli Zaretskii
2015-04-17 2:48 ` Dmitry Gutov
2015-04-17 4:58 ` Stefan Monnier
2015-04-17 13:14 ` Dmitry Gutov
2015-04-17 7:26 ` Eli Zaretskii [this message]
2015-04-17 8:11 ` Eli Zaretskii
2015-04-17 14:17 ` Dmitry Gutov
2015-04-17 14:36 ` Eli Zaretskii
2015-04-17 15:55 ` Dmitry Gutov
2015-04-17 16:23 ` Eli Zaretskii
2015-04-17 18:12 ` Stefan Monnier
2015-04-17 18:18 ` Dmitry Gutov
2015-04-20 15:03 ` Dmitry Gutov
2015-04-17 7:55 ` Andreas Schwab
2015-04-17 8:12 ` Eli Zaretskii
2015-04-17 10:55 ` Dmitry Gutov
2015-12-26 14:27 ` Dmitry Gutov
2015-12-27 2:52 ` Richard Stallman
2015-12-27 3:21 ` Dmitry Gutov
2015-12-27 15:50 ` Eli Zaretskii
2015-12-27 16:10 ` Dmitry Gutov
2015-12-27 16:28 ` Eli Zaretskii
2015-12-27 16:51 ` Dmitry Gutov
2015-12-30 4:47 ` John Wiegley
2015-12-30 11:48 ` Dmitry Gutov
2015-12-30 12:15 ` Dmitry Gutov
2015-12-30 19:18 ` John Wiegley
2015-12-31 0:24 ` Dmitry Gutov
2015-12-31 1:17 ` John Wiegley
2015-12-31 1:26 ` Dmitry Gutov
2015-12-31 2:48 ` John Wiegley
2015-12-31 6:30 ` Richard Stallman
2015-04-14 17:15 ` Stefan Monnier
2015-04-14 18:08 ` Nicolas Petton
2015-04-14 20:33 ` Dmitry Gutov
2015-04-14 19:09 ` Achim Gratz
2015-04-14 21:58 ` Dmitry Gutov
2015-04-15 2:33 ` Richard Stallman
2015-04-15 11:18 ` Dmitry Gutov
2015-04-15 16:17 ` Eli Zaretskii
2015-04-15 23:03 ` Dmitry Gutov
[not found] ` <<E1YiD8o-000318-H5@fencepost.gnu.org>
2015-04-15 15:29 ` Drew Adams
2015-04-14 14:17 ` Eli Zaretskii
2015-04-14 14:40 ` Dmitry Gutov
2015-04-14 15:29 ` Eli Zaretskii
2015-04-14 15:48 ` Dmitry Gutov
2015-04-14 16:02 ` Eli Zaretskii
2015-04-17 17:22 ` Philipp Stephani
2015-04-18 2:55 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y4lr8bbf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=20322@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).