[Top][All Lists]

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

Re: tabs vs. spaces in source code

From: Mark Polesky
Subject: Re: tabs vs. spaces in source code
Date: Sat, 25 Jul 2009 10:47:06 -0700 (PDT)

Carl Sorensen wrote:
> No, Jan was not in favor of it unless it became a standard for
> GNU coding. Hence the comment on "first making it a standard"
> (i.e., a GNU standard) and "sending a patch to emacs-devel".
> The current standard is to let tabs and spaces be handled as
> emacs handles them.

Oh, is that something that could ever happen, realistically?

> vim has settings that will convert tabs to spaces; all one would
> need to do would be to open the file and save it; vim would take
> care of the conversion automatically.
> ...
> > But even in such cases, as long as my tab-width matches the
> > tab-widths in the source, tabs2spaces should be fine. Is it
> > correct to say that git (or savannah) translates all tabs to 8
> > spaces without exception?
> No, this is not correct.  tabs go to the nearest 8-space column.
> So if you type two spaces followed by a tab, you'll be in column
> 8, not in column 10.

Ha! That's what I meant. Just as easily the jEdit macro could do
it. And I could call removeTrailingWhiteSpace() while I'm at it:


Patrick McCarty wrote:
> One thing you could do right now, without awaiting approval, is
> to check for lines that have tabs *after* spaces at the
> beginning.  These should be converted to tabs *followed* by
> spaces.

Well, that was exactly what my editor was doing wrong, but I'd
rather wait for consensus on the tabs->spaces than waste time
doing something that I might just change later anyway.

- Mark


reply via email to

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