help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change spaces indent in text mode?


From: Tim X
Subject: Re: change spaces indent in text mode?
Date: Sun, 07 Feb 2010 11:51:38 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Jorgen Grahn <grahn+nntp@snipabacken.se> writes:

> On Fri, 2010-01-29, Tom Rauchenwald wrote:
>> Brendan Miller <catphive@catphive.net> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]