From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: change spaces indent in text mode? Date: Sun, 07 Feb 2010 11:51:38 +1100 Organization: Rapt Technologies Message-ID: <87fx5d7tr9.fsf@lion.rapttech.com.au> References: <87wrz0ittg.fsf@mithlond.arda> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265506853 19858 80.91.229.12 (7 Feb 2010 01:40:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Feb 2010 01:40:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 07 02:40:51 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ndw8k-0006cT-D1 for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Feb 2010 02:40:46 +0100 Original-Received: from localhost ([127.0.0.1]:55800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ndw8j-0004Z6-Ub for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Feb 2010 20:40:45 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.glorb.com!news2.glorb.com!news.glorb.com!news.astraweb.com!border1.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) Cancel-Lock: sha1:8BK93rQpkbEfSg/wCK7O8Aju/kU= Original-Lines: 49 Original-NNTP-Posting-Host: eff33f43.news.astraweb.com Original-X-Trace: DXC=]J=kkIA]cE5\nWXJLoiYd:L?0kYOcDh@:^gYlR9D^Ya6iC3FjkdYZl3^J:1TlA[]=23\oHEEbYI>? Original-Xref: news.stanford.edu gnu.emacs.help:176650 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71716 Archived-At: Jorgen Grahn writes: > On Fri, 2010-01-29, Tom Rauchenwald wrote: >> Brendan Miller writes: >> >>> Great, thanks! >>> >>> The only problem I have, is that m-i seems to indent by 8 spaces. I >>> tried putting >>> >>> (setq tab-width 4) in my .emacs, but that doesn't seem to change >>> anything... is m-i controlled by a different variable? >> >> Try (setq-default tab-width 4) > > A few people have suggested this. Note that this redefines the > appearance *in your Emacs* of the TAB character and the text as a > whole. It will look wrong in any other program and to any other reader > who hasn't reconfigured his tools in the same way. > > I have the misfortune of working with source code where half of it > uses this configuration and half doesn't. It's pure pain; please > don't do it unless you *know* noone but you will ever have to read > this text. > Sorry, but I think you have things upside down. The problem you describe is not due to people modifying tab width, but rather inconsistent use of tabs. If everyone you had to work with used tabs, then it would be possible to realise one of the great benefits of tabs. That is, we could all have the amount of indent that we want, 2 spaces, 4, 8 10 whatever and it wouldn't matter. If we insist on everyone having the same width tab stops, then really, we have lost the benefit of tab and can just use spaces. In fact, if you are having problems because of inconsistent use of tabs/spaces maybe the solution is to have emacs convert all spaces to tabs and only use spaces when you hit the tab key or have emacs convert all leading spaces to tabs so that you don't get the mixture. There is a downside in doing this if you are in a team using version control if your VC isn't configured correctly as the changes will be seen as changes in content rather than just changes in whitespace styles. Tim -- tcross (at) rapttech dot com dot au