News for hackers. Stuff that matters.
Re:Joining the Church of Emacs by patrick451 on Sunday October 02, 2022 @10:21PM (#33062800)
I found it amusing his example of badly formatted code

  one = 1
  fortyTwo = 42
  elite = 1337
is exactly how most modern linters want to format my code.
Re:Joining the Church of Emacs by layer8 on Sunday October 02, 2022 @11:20PM (#33063132)
In IDEs that support refactor-renaming (Emacs probably does?), the column-aligned formatting also has the drawback that it breaks (unless the refactoring also auto-realigns all affected code).

For example,

  one      = 1
  fortyTwo = 42
  elite    = 1337
might become:

  one      = 1
  ultimateAnswer = 42
  leet    = 1337
This made me stop column-aligning in most cases. An exception is array initializers for two-dimensional tables with many columns, where the benefit is important enough.
Re:Joining the Church of Emacs by rany_ on Monday October 03, 2022 @02:27AM (#33064111)
It also makes git blame a lot less useful in these scenarios.
Re:Joining the Church of Emacs by daptaq on Monday October 03, 2022 @05:32AM (#33065222)
You can pass git blame -w to ignore whitespace changes, though yes, in general it is annoying.
Re:Joining the Church of Emacs by rany_ on Monday October 03, 2022 @08:02AM (#33066268)
I wouldn't have made this comment if I knew that. Though I suppose this is still an annoyance for git web interfaces. Thanks for the info!
Re:Joining the Church of Emacs by how_gauche on Monday October 03, 2022 @08:20AM (#33066450)
On GitHub you can add ?w=1 to diff URLs to get the same thing (there's a button for it too?)
Re:Joining the Church of Emacs by rany_ on Monday October 03, 2022 @09:14AM (#33067038)
I can't find the button. I guess it's a hidden feature