From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#20322: 25.0.50; indent-tabs-mode should default to nil Date: Fri, 17 Apr 2015 05:48:08 +0300 Message-ID: <55307468.8070307@yandex.ru> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1429238967 24772 80.91.229.3 (17 Apr 2015 02:49:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Apr 2015 02:49:27 +0000 (UTC) Cc: 20322@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 17 04:49:13 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 1YiwLA-0007R2-QR for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Apr 2015 04:49:13 +0200 Original-Received: from localhost ([::1]:39239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiwLA-0000gL-0f for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Apr 2015 22:49:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiwL5-0000gG-H9 for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2015 22:49:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiwL0-0006b8-Ct for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2015 22:49:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiwL0-0006b2-9v for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2015 22:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YiwKz-0007eT-N4 for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2015 22:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Apr 2015 02:49: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.142923889829362 (code B ref 20322); Fri, 17 Apr 2015 02:49:01 +0000 Original-Received: (at 20322) by debbugs.gnu.org; 17 Apr 2015 02:48:18 +0000 Original-Received: from localhost ([127.0.0.1]:58464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YiwKI-0007dV-92 for submit@debbugs.gnu.org; Thu, 16 Apr 2015 22:48:18 -0400 Original-Received: from mail-wg0-f47.google.com ([74.125.82.47]:32858) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YiwKG-0007dI-Rg for 20322@debbugs.gnu.org; Thu, 16 Apr 2015 22:48:17 -0400 Original-Received: by wgin8 with SMTP id n8so99490236wgi.0 for <20322@debbugs.gnu.org>; Thu, 16 Apr 2015 19:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=t6UB34Eb+q6w/I/1Td4MsRCTc7KJSTYI1g4BjGrhMCk=; b=wH+obmjsO51aF0+1huVu8CstlNWzpcZE9Yk7Pv8MokhumSciOGgsgRIiMUkXe/oZhS Cp59uduidj5L+CeclKtvstYADm9ElffAG31y7UkEbSVSlTnUJ76tAbobJnuPSa0kvXlM FBY6a9cfTUOkLLc9Re0MsWzGP0fA2jU0cjt5zVR/m/ByL751CfmVj6qduPBlZylERgla ILVRB+p1mJcF85Gkb4jQIyGfEJ7vc2Ykni7oiE0vL60gtrlJN00IEEQbgqwUxZGug1os RynKYJ0qNESQSWZCtgBcCGHA6ZLuL22wOs6WC/Iq9aRmoKyfuu2Z6HeZTlmPmfXOdWJi 4f3A== X-Received: by 10.180.76.137 with SMTP id k9mr321474wiw.4.1429238890955; Thu, 16 Apr 2015 19:48:10 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id ch6sm12701774wjc.3.2015.04.16.19.48.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2015 19:48:10 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 In-Reply-To: <83vbgx9xtl.fsf@gnu.org> 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:101603 Archived-At: 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. > 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. 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? 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. 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. >> 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? 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. Think back to the four "how to configure indentation" steps I listed in an earlier email. Now mode-hooks and lambdas will add one or two new ones, and without a variable, the user will have to figure out somehow that the major mode function changes the `indent-tabs-mode' value. It wouldn't have simplified the scenario for me: at the time I configured Emacs both for JavaScript *and* C (and a few other languages), to do tutorials, exercises and that kind of stuff. >>> 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'. > 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. Anyway, just for an arbitrary example, here's the three projects using C++ that I've looked at most recently. All relevant to Emacs's code assistance (which is the area I'm paying attention to lately): https://github.com/Sarcasm/irony-mode https://github.com/AndersBakken/rtags https://github.com/Valloric/ycmd None of them use tabs.