GNU bug report logs -
#32457
26.1.50; automatically set indent-tabs-mode from .gitattributes
Previous Next
Reported by: Tom Tromey <tom <at> tromey.com>
Date: Thu, 16 Aug 2018 16:52:02 UTC
Severity: wishlist
Tags: wontfix
Found in version 26.1.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Robert Pluim <rpluim <at> gmail.com> writes:
>>>>>> On Wed, 18 May 2022 14:18:09 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> said:
>
> Lars> Tom Tromey <tom <at> tromey.com> writes:
> >> git can be configured to complain about indenting with tabs
> >> by using "whitespace=tab-in-indent" in .gitattributes.
> >>
> >> It would be nice if Emacs automatically detected this and set
> >> indent-tabs-mode to nil.
> >>
> >> git attributes can be queried using "git check-attr", for instance:
> >>
> >> $ git check-attr whitespace -- src/librustc_codegen_llvm/debuginfo/metadata.rs
> >> src/librustc_codegen_llvm/debuginfo/metadata.rs: whitespace:
> >> tab-in-indent,trailing-space,tabwidth=4
>
> Lars> (I'm going through old bug reports that unfortunately weren't resolved
> Lars> at the time.)
>
> Lars> I don't think this would be an appropriate feature for Emacs core -- it
> Lars> would be too surprising if Emacs was setting `indent-tabs-mode' based on
> Lars> external factors like this (and I'm sure there's a lot of other hints it
> Lars> could be taking from other VCs).
>
> Lars> It does sound like it could be a useful ELPA package, though, but I'm
> Lars> closing this wishlist item in the Emacs bug tracker.
>
> .dir-locals.el supports 'eval', so anyone who wants this could put it there.
There is also EditorConfig (https://editorconfig.org,
http://elpa.nongnu.org/nongnu/editorconfig.html) for setting
indent-tabs-mode and other variables according to a configuration file.
This bug report was last modified 3 years and 41 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.