* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-03 19:48 ` Stefan Monnier
@ 2012-12-03 19:55 ` Burton Samograd
2012-12-03 21:03 ` Dmitry Gutov
2012-12-03 21:54 ` Stefan Monnier
2012-12-03 20:00 ` Dmitry Gutov
2012-12-04 8:44 ` Stephen Leake
2 siblings, 2 replies; 17+ messages in thread
From: Burton Samograd @ 2012-12-03 19:55 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> There are better things to do in life than worry about how the
> whitespace you don't see is represented internally,
Not when someone has tabs set to 4 and someone else to 8, or 3, or 6 and
you're set to use spaces.
--
Burton Samograd
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-03 19:55 ` Burton Samograd
@ 2012-12-03 21:03 ` Dmitry Gutov
2012-12-03 21:20 ` Burton Samograd
2012-12-03 21:54 ` Stefan Monnier
1 sibling, 1 reply; 17+ messages in thread
From: Dmitry Gutov @ 2012-12-03 21:03 UTC (permalink / raw)
To: Burton Samograd; +Cc: emacs-devel
Burton Samograd <burton@samograd.ca> writes:
> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>
>> There are better things to do in life than worry about how the
>> whitespace you don't see is represented internally,
>
> Not when someone has tabs set to 4 and someone else to 8, or 3, or 6 and
> you're set to use spaces.
This particular potential problem is taken care of in .dir-locals.el at
the top of the Emacs directory tree.
--Dmitry
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-03 21:03 ` Dmitry Gutov
@ 2012-12-03 21:20 ` Burton Samograd
0 siblings, 0 replies; 17+ messages in thread
From: Burton Samograd @ 2012-12-03 21:20 UTC (permalink / raw)
To: emacs-devel
Dmitry Gutov <dgutov@yandex.ru> writes:
> Burton Samograd <burton@samograd.ca> writes:
>
>> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>>
>>> There are better things to do in life than worry about how the
>>> whitespace you don't see is represented internally,
>>
>> Not when someone has tabs set to 4 and someone else to 8, or 3, or 6 and
>> you're set to use spaces.
>
> This particular potential problem is taken care of in .dir-locals.el at
> the top of the Emacs directory tree.
If only we could use that solution at my work...
--
Burton Samograd
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-03 19:55 ` Burton Samograd
2012-12-03 21:03 ` Dmitry Gutov
@ 2012-12-03 21:54 ` Stefan Monnier
1 sibling, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2012-12-03 21:54 UTC (permalink / raw)
To: Burton Samograd; +Cc: emacs-devel
>> There are better things to do in life than worry about how the
>> whitespace you don't see is represented internally,
> Not when someone has tabs set to 4 and someone else to 8, or 3, or 6 and
> you're set to use spaces.
There are *much* better things to do in life than set tab-width to
a non-8 value in emacs-lisp-mode.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-03 19:48 ` Stefan Monnier
2012-12-03 19:55 ` Burton Samograd
@ 2012-12-03 20:00 ` Dmitry Gutov
2012-12-04 8:44 ` Stephen Leake
2 siblings, 0 replies; 17+ messages in thread
From: Dmitry Gutov @ 2012-12-03 20:00 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Chong Yidong, emacs-devel
On 03.12.2012 23:48, Stefan Monnier wrote:
>> What about the third question? Last time I've seen a discussion about
>> whitespace style in Emacs codebase, I think it was somewhat of a consensus
>> that spaces > tabs (which is also my preference), but doing whitespace-only
>> commits was declared verboten, so I can't just revert that part of
>> the change.
>
> There are better things to do in life than worry about how the
> whitespace you don't see is represented internally,
Sure, there are. But I do see it, courtesy of whitespace-mode.
--Dmitry
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-03 19:48 ` Stefan Monnier
2012-12-03 19:55 ` Burton Samograd
2012-12-03 20:00 ` Dmitry Gutov
@ 2012-12-04 8:44 ` Stephen Leake
2012-12-04 14:51 ` Stefan Monnier
2 siblings, 1 reply; 17+ messages in thread
From: Stephen Leake @ 2012-12-04 8:44 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> What about the third question? Last time I've seen a discussion about
>> whitespace style in Emacs codebase, I think it was somewhat of a consensus
>> that spaces > tabs (which is also my preference), but doing whitespace-only
>> commits was declared verboten, so I can't just revert that part of
>> the change.
>
> There are better things to do in life than worry about how the
> whitespace you don't see is represented internally,
Which is why there needs to be a clear policy, supported by Emacs tools,
that everyone knows and follows.
--
-- Stephe
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-04 8:44 ` Stephen Leake
@ 2012-12-04 14:51 ` Stefan Monnier
2012-12-04 17:55 ` martin rudalics
2012-12-05 3:49 ` Stephen Leake
0 siblings, 2 replies; 17+ messages in thread
From: Stefan Monnier @ 2012-12-04 14:51 UTC (permalink / raw)
To: Stephen Leake; +Cc: emacs-devel
> Which is why there needs to be a clear policy, supported by Emacs tools,
> that everyone knows and follows.
And the policy is: don't modify TABs or spaces on lines you do
not otherwise change.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-04 14:51 ` Stefan Monnier
@ 2012-12-04 17:55 ` martin rudalics
2012-12-04 18:07 ` Stefan Monnier
2012-12-05 3:49 ` Stephen Leake
1 sibling, 1 reply; 17+ messages in thread
From: martin rudalics @ 2012-12-04 17:55 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Stephen Leake, emacs-devel
> And the policy is: don't modify TABs or spaces on lines you do
> not otherwise change.
Easier said than done when you are used to invoke `indent-sexp' on the
sexp enclosing a small change.
martin
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-04 17:55 ` martin rudalics
@ 2012-12-04 18:07 ` Stefan Monnier
2012-12-05 9:41 ` martin rudalics
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2012-12-04 18:07 UTC (permalink / raw)
To: martin rudalics; +Cc: Stephen Leake, emacs-devel
>> And the policy is: don't modify TABs or spaces on lines you do
>> not otherwise change.
> Easier said than done when you are used to invoke `indent-sexp' on the
> sexp enclosing a small change.
AFAIK indent-sexp won't touch a line that's already properly indented,
so TABs will only be changed to spaces (or vice versa) if you do
fix the indentation, which is OK.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-04 18:07 ` Stefan Monnier
@ 2012-12-05 9:41 ` martin rudalics
2012-12-05 14:54 ` Stefan Monnier
0 siblings, 1 reply; 17+ messages in thread
From: martin rudalics @ 2012-12-05 9:41 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Stephen Leake, emacs-devel
> AFAIK indent-sexp won't touch a line that's already properly indented,
> so TABs will only be changed to spaces (or vice versa) if you do
> fix the indentation, which is OK.
Right. But if you, say, introduce a new let binding somewhere at the
beginning of a defun and later on decide that you don't need it but do
want to keep other changes you made in between, reindenting will leave
whitespace changes in the new code.
martin
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-05 9:41 ` martin rudalics
@ 2012-12-05 14:54 ` Stefan Monnier
0 siblings, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2012-12-05 14:54 UTC (permalink / raw)
To: martin rudalics; +Cc: Stephen Leake, emacs-devel
>> AFAIK indent-sexp won't touch a line that's already properly indented,
>> so TABs will only be changed to spaces (or vice versa) if you do
>> fix the indentation, which is OK.
> Right. But if you, say, introduce a new let binding somewhere at the
> beginning of a defun and later on decide that you don't need it but do
> want to keep other changes you made in between, reindenting will leave
> whitespace changes in the new code.
Better not worry about it.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: /srv/bzr/emacs/trunk r111061: Fix for bad test in ruby-mode-tests.el.
2012-12-04 14:51 ` Stefan Monnier
2012-12-04 17:55 ` martin rudalics
@ 2012-12-05 3:49 ` Stephen Leake
2012-12-05 4:56 ` Stefan Monnier
1 sibling, 1 reply; 17+ messages in thread
From: Stephen Leake @ 2012-12-05 3:49 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Which is why there needs to be a clear policy, supported by Emacs tools,
>> that everyone knows and follows.
>
> And the policy is: don't modify TABs or spaces on lines you do
> not otherwise change.
That's clear.
But the other part of the question was: are we supposed to use tabs or
spaces when editing new or old code?
It's easy enough to tell Emacs which to use, and it's best if all code
in a project follows a common standard.
I don't see any documentation on this in the various READMEs in the
Emacs source tree (but I may have missed something).
I thought this was mentioned in the Gnu coding standards (I have a note
in my .emacs for C style that says the Gnu coding standard requires tabs),
but I don't see it in the current version at
http://www.gnu.org/prep/standards/standards.html
--
-- Stephe
^ permalink raw reply [flat|nested] 17+ messages in thread