git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH RFC3 09/13] send-email: Remove horrible mix of tabs and spaces

From
Andreas Ericsson <ae@op5.se>
Date
Apr 14, 2009, 07:17 UTC
Message-ID
<49E43899.7070804@op5.se>
In-Reply-To
<7vws9n92q3.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 23 quoted lines
> Andreas Ericsson <ae@op5.se> writes:
> 
>> Using tabs to align stuff to indentation level and spaces to align
>> line continuation is the only possible way to let users choose
>> whichever indentation depth they want while preserving the continuation
>> alignment.
> 
> Sure, it will look aligned with whatever width of HT ">":
> 
> 	>>if (this is a looong
>         >>....expression that is alighed) {
>         >>>statement1;
>         >>>statement2;
>         >>}
> 
> but it is *only true* if your SP "." and everything else is of the same
> width.
> 
> People seem to repeat that without realizing what they are saying, but I
> find the assumption the argument is based on quite bogus.  Why do people
> think it is only sane to assume flexible HT width but still monospaced
> font whose SP, l and w are all of the same width?
> 

Because 99% of all editors designed for programming use a fixed-width font by default for precisely that reason, and all others can be set to display fixed-width fonts without losing much (if any) readability, but indentation comes in 2*$number_of_programmers variations.

> You either forget about the alignment (there is no such thing---suck it
> up), or use time honored HT=8 and monospace convention.
> 

Or you use "indent with tabs, align with spaces" and let those who use a word processor for programming go hang. It's quite common actually. Or you use some own homecooked style of indentation that's quite obvious *to you* Either way, a project's founding father always sets the style, and those who contribute get to either follow it or provide some pretty strong argument to change it (a lot better than:

"A few of the lines were aligning function arguments via tabs and a few extra spaces, which is not reliable in my model.

Frankly, I don't like tabs and spaces sharing the same contiguous block. I don't like it all."

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Previous: Junio C HamanoNext: Michael Witten
Message 19 of 39 in “I hope this will do it!”
  1. I hope this will do it!Michael Witten, Apr 13, 2009
  2. 01/13 Docs: send-email: Put options back into alphabetical orderMichael Witten, Apr 13, 2009
  3. 02/13 Docs: send-email: Refer to CONFIGURATION section for sendemail.multieditMichael Witten, Apr 13, 2009
  4. 03/13 Docs: send-email: Remove superfluous information in CONFIGURATIONMichael Witten, Apr 13, 2009
  5. 04/13 Docs: send-email: --smtp-server-port can take symbolic portsMichael Witten, Apr 13, 2009
  6. 05/13 send-email: Cleanup the usage text and docs a bitMichael Witten, Apr 13, 2009
  7. 06/13 send-email: Handle "GIT:" rather than "GIT: " during --composeMichael Witten, Apr 13, 2009
  8. 07/13 send-email: 'References:' should only reference what is sentMichael Witten, Apr 13, 2009
  9. 08/13 send-email: Remove superfluous `my $editor = ...'Michael Witten, Apr 13, 2009
  10. 09/13 send-email: Remove horrible mix of tabs and spacesMichael Witten, Apr 13, 2009
  11. 10/13 send-email: Add --sleep for email throttlingMichael Witten, Apr 13, 2009
  12. 11/13 send-email: Minor cleanup of $smtp_server usage and send_message()Michael Witten, Apr 13, 2009
  13. 12/13 send-email: --compose takes optional argument to existing fileMichael Witten, Apr 13, 2009
  14. 13/13 send-email: --compose always includes a 'GIT: ' prefixed list of patch subjectsMichael Witten, Apr 13, 2009
  15. Junio C HamanoApr 13, 2009
  16. Michael WittenApr 13, 2009
  17. Andreas EricssonApr 14, 2009
  18. Junio C HamanoApr 14, 2009
  19. Andreas EricssonApr 14, 2009
  20. Michael WittenApr 14, 2009
  21. Andreas EricssonApr 14, 2009
  22. Stephen BoydApr 13, 2009
  23. Michael WittenApr 14, 2009
  24. Michael WittenApr 14, 2009
  25. Björn SteinbrinkApr 14, 2009
  26. Junio C HamanoApr 14, 2009
  27. Junio C HamanoApr 13, 2009
  28. Michael WittenApr 13, 2009
  29. Junio C HamanoApr 14, 2009
  30. Michael WittenApr 14, 2009
  31. Junio C HamanoApr 14, 2009
  32. Michael WittenApr 14, 2009
  33. Junio C HamanoApr 13, 2009
  34. Michael WittenApr 13, 2009
  35. Michael WittenApr 13, 2009
  36. Junio C HamanoApr 14, 2009
  37. Michael WittenApr 14, 2009
  38. Junio C HamanoApr 14, 2009
  39. Michael WittenApr 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.