Re: [Python-Dev] Reindenting the C code base?

2008-12-16 Thread Kirk McDonald
On Mon, Dec 15, 2008 at 11:21 AM, Brett Cannon br...@python.org wrote: On Mon, Dec 15, 2008 at 00:20, Georg Brandl g.bra...@gmx.net wrote: Jeffrey Yasskin schrieb: On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum gu...@python.org wrote: On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou

Re: [Python-Dev] Reindenting the C code base?

2008-12-16 Thread Sylvain Fourmanoit
On Sat, 13 Dec 2008, Guido van Rossum wrote: If you reindent, much of the history of the file is essentially lost -- svn blame will blame whoever reindented the code, and it's a pain to go back. I am not a subversion specialist, but it appears this part can be handled gracefully by passing

Re: [Python-Dev] Reindenting the C code base?

2008-12-16 Thread anatoly techtonik
On Sat, Dec 13, 2008 at 11:26 PM, Guido van Rossum gu...@python.org wrote: I think we should not do this. We should use 4 space indents for new files, but existing files should not be reindented. If you reindent, much of the history of the file is essentially lost -- svn blame will blame

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Georg Brandl
Jeffrey Yasskin schrieb: On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum gu...@python.org wrote: On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou solip...@pitrou.net wrote: Guido van Rossum guido at python.org writes: I think we should not do this. We should use 4 space indents for new

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Steve Holden
Miguel Lobo wrote: I think we should not do this. We should use 4 space indents for new files, but existing files should not be reindented. If you reindent, much of the history of the file is essentially lost -- svn blame will blame whoever reindented the code, and it's a pain to go back. I

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread M.-A. Lemburg
On 2008-12-14 21:43, Martin v. Löwis wrote: Personally, I think the indentation of, at least, Objects/unicodeobject.c should be fixed. This file has become so mixed-up with tab and space indents that I have no-idea what to use when I edit it. Just to give an idea how messy it is, they are 5214

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Brett Cannon
On Mon, Dec 15, 2008 at 00:20, Georg Brandl g.bra...@gmx.net wrote: Jeffrey Yasskin schrieb: On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum gu...@python.org wrote: On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou solip...@pitrou.net wrote: Guido van Rossum guido at python.org writes: I

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Guido van Rossum
Aha! A specific file. I'm supportive of fixing that specific file. Now if you can figure out how to do it and still allow merging between 2.6 and 3.0 that would be cool. --Guido van Rossum (home page: http://www.python.org/~guido/) On Sun, Dec 14, 2008 at 9:54 AM, Alexandre Vassalotti

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Scott Dial
Guido van Rossum wrote: Aha! A specific file. I'm supportive of fixing that specific file. Now if you can figure out how to do it and still allow merging between 2.6 and 3.0 that would be cool. Like svn blame, you can use svn merge -x -w to avoid merging whitespace changes. However,

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Martin v. Löwis
Aha! A specific file. I'm supportive of fixing that specific file. Now if you can figure out how to do it and still allow merging between 2.6 and 3.0 that would be cool. In the specific case, I think it's best to fix the 2.7 source, and then merge the changes into 3k. The 3.x version is still

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread Alexandre Vassalotti
On Mon, Dec 15, 2008 at 3:59 PM, Guido van Rossum gu...@python.org wrote: Aha! A specific file. I'm supportive of fixing that specific file. Now if you can figure out how to do it and still allow merging between 2.6 and 3.0 that would be cool. Here's the simplest solution I thought so far to

Re: [Python-Dev] Reindenting the C code base?

2008-12-15 Thread bharat satsangi
please unsubscribe me On Tue, Dec 16, 2008 at 12:51 AM, Brett Cannon br...@python.org wrote: On Mon, Dec 15, 2008 at 00:20, Georg Brandl g.bra...@gmx.net wrote: Jeffrey Yasskin schrieb: On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum gu...@python.org wrote: On Sat, Dec 13, 2008 at

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Guido van Rossum
On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou solip...@pitrou.net wrote: Guido van Rossum guido at python.org writes: I think we should not do this. We should use 4 space indents for new files, but existing files should not be reindented. Well, right now many files are indented with a mix

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Jeffrey Yasskin
On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum gu...@python.org wrote: On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou solip...@pitrou.net wrote: Guido van Rossum guido at python.org writes: I think we should not do this. We should use 4 space indents for new files, but existing files

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Antoine Pitrou
Jeffrey Yasskin jyasskin at gmail.com writes: I've never figured out how to configure emacs to deduce whether the current file uses spaces or tabs and has a 4 or 8 space indent. Same question for Kate! Although I guess that if emacs isn't able to do it, Kate won't do it either... (Kate

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sat, Dec 13, 2008 at 5:11 PM, Antoine Pitrou solip...@pitrou.net wrote: Guido van Rossum guido at python.org writes: I think we should not do this. We should use 4 space indents for new files, but existing files should not be reindented. Well, right now many files are indented with a mix

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sun, Dec 14, 2008 at 12:43 PM, Jeffrey Yasskin jyass...@gmail.com wrote: I've never figured out how to configure emacs to deduce whether the current file uses spaces or tabs and has a 4 or 8 space indent. I always try to get it right anyway, but it'd be a lot more convenient if my editor

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Alexandre Vassalotti
On Sun, Dec 14, 2008 at 12:57 PM, Alexandre Vassalotti alexan...@peadrop.com wrote: On Sun, Dec 14, 2008 at 12:43 PM, Jeffrey Yasskin jyass...@gmail.com wrote: I've never figured out how to configure emacs to deduce whether the current file uses spaces or tabs and has a 4 or 8 space indent. I

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Martin v. Löwis
I've never figured out how to configure emacs to deduce whether the current file uses spaces or tabs and has a 4 or 8 space indent. If it is now official policy that different files use different styles, then I think it would be helpful to put Emacs variables at the end of each file. See the

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Martin v. Löwis
Personally, I think the indentation of, at least, Objects/unicodeobject.c should be fixed. This file has become so mixed-up with tab and space indents that I have no-idea what to use when I edit it. Just to give an idea how messy it is, they are 5214 lines indented with tabs and 4272 indented

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Martin v. Löwis
Same question for Kate! Although I guess that if emacs isn't able to do it, Kate won't do it either... (Kate allows configuring on a directory basis, on a file extension basis, but not on a filename basis) I guess it would be possible to write a Kate plugin that does that. Regards,

Re: [Python-Dev] Reindenting the C code base?

2008-12-14 Thread Antoine Pitrou
Martin v. Löwis martin at v.loewis.de writes: I guess it would be possible to write a Kate plugin that does that. Or perhaps more simply, Kate allows modelines at the beginning and at the end of source files. I don't know if it's ok to add these to the code base though.

[Python-Dev] Reindenting the C code base?

2008-12-13 Thread Antoine Pitrou
Hello, I remember there were some talks of reindenting the C code base (from tabs to 4-space indents) after py3k is released, but I can't find the discussion thread again. Was a decision ever taken about it? Regards Antoine. ___ Python-Dev mailing

Re: [Python-Dev] Reindenting the C code base?

2008-12-13 Thread Guido van Rossum
On Sat, Dec 13, 2008 at 1:22 PM, Antoine Pitrou solip...@pitrou.net wrote: I remember there were some talks of reindenting the C code base (from tabs to 4-space indents) after py3k is released, but I can't find the discussion thread again. Was a decision ever taken about it? I think we

Re: [Python-Dev] Reindenting the C code base?

2008-12-13 Thread Antoine Pitrou
Guido van Rossum guido at python.org writes: I think we should not do this. We should use 4 space indents for new files, but existing files should not be reindented. Well, right now many files are indented with a mix of spaces and tabs, depending on who did the edit and how their editor was

Re: [Python-Dev] Reindenting the C code base?

2008-12-13 Thread Miguel Lobo
I think we should not do this. We should use 4 space indents for new files, but existing files should not be reindented. If you reindent, much of the history of the file is essentially lost -- svn blame will blame whoever reindented the code, and it's a pain to go back. I believe svn blame -x