Indentation style

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sun Jul 28 17:56:28 PDT 2019


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20190728/ee34936e/attachment.sig>


More information about the notmuch mailing list