Re: Indentation style

Subject: Re: Indentation style

Date: Sun, 28 Jul 2019 20:56:28 -0400

To: Thomas Schneider, David Bremner

Cc: notmuch@notmuchmail.org

From: Daniel Kahn Gillmor


On Mon 2019-07-29 00:19:48 +0200, Thomas Schneider wrote:
> Maybe I misunderstood, but this doesn’t really look like Emacs’ defaults
> for C.

I think the question is less "emacs defaults" vs. "consistency with the
current codebase".

> While we’re at it, how about a generic .editorconfig?  The world isn’t
> split into good people and dea… uh, Emacs and Vim.

Anyone who submits a .editorconfig that allows us to drop .dir-locals.el
would get enthusiastic support from me.  notmuch has been a very
emacs-focused project for years, but it doesn't need to be, and generic
editor configuration rules are preferable to editor-specific rules.

here's what i suspect such an editorconfig would look like given our
current codebase, but i haven't tested it or tried to apply the changes
to the notmuch codebase and see if it changes anything.

----------------------
root = true
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.{c,h,cpp,sh,el}]
tab_width = 8
indent_style = tab
indent_size = 4
----------------------

That said, i don't know how to represent (fill-column . 70) in
editorconfig syntax (see e0d85656da7f4d6e7d0b66a7bece39724143bffe for
justification), or (c-file-style . "linux").

(fwiw, i would also be happy if we moved away from literal tabs and just
used spaces-only.  But i am not interested in setting off a flamewar,
so if anyone prefers the mixed-tabs-and-spaces situation we are in
today, i will never mention this again)

       --dkg

signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: