From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20322: 25.0.50; indent-tabs-mode should default to nil Date: Fri, 17 Apr 2015 10:26:44 +0300 Message-ID: <83y4lr8bbf.fsf@gnu.org> References: <861tjn3069.fsf@yandex.ru> <552D20B6.8030005@yandex.ru> <83mw2abul3.fsf@gnu.org> <552D34BC.4090806@yandex.ru> <83h9sibt0q.fsf@gnu.org> <552D7796.2090109@yandex.ru> <83vbgx9xtl.fsf@gnu.org> <55307468.8070307@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1429255650 6004 80.91.229.3 (17 Apr 2015 07:27:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Apr 2015 07:27:30 +0000 (UTC) Cc: 20322@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 17 09:27:18 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yj0gI-0003h9-DX for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Apr 2015 09:27:18 +0200 Original-Received: from localhost ([::1]:39887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj0gC-0001NT-H4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Apr 2015 03:27:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj0g7-0001NG-Sm for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2015 03:27:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj0g2-0005b7-TJ for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2015 03:27:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj0g2-0005b3-PR for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2015 03:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yj0g1-0007Ef-Ro for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2015 03:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Apr 2015 07:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20322 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20322-submit@debbugs.gnu.org id=B20322.142925561527798 (code B ref 20322); Fri, 17 Apr 2015 07:27:01 +0000 Original-Received: (at 20322) by debbugs.gnu.org; 17 Apr 2015 07:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:58558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yj0fu-0007EH-QU for submit@debbugs.gnu.org; Fri, 17 Apr 2015 03:26:55 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:65198) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yj0fs-0007E3-AA for 20322@debbugs.gnu.org; Fri, 17 Apr 2015 03:26:53 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NMX00M00W9ZS800@a-mtaout22.012.net.il> for 20322@debbugs.gnu.org; Fri, 17 Apr 2015 10:26:45 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NMX00M3KWOLQG40@a-mtaout22.012.net.il>; Fri, 17 Apr 2015 10:26:45 +0300 (IDT) In-reply-to: <55307468.8070307@yandex.ru> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101611 Archived-At: > Date: Fri, 17 Apr 2015 05:48:08 +0300 > From: Dmitry Gutov > 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).