From: Rudolf Schlatte <rudi@constantly.at>
To: 32457@debbugs.gnu.org
Subject: bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes
Date: Wed, 18 May 2022 16:22:31 +0200 [thread overview]
Message-ID: <m1a6bely3c.fsf@constantly.at> (raw)
In-Reply-To: <87zhxm8dcv.fsf@tromey.com>
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Wed, 18 May 2022 14:18:09 +0200, Lars Ingebrigtsen <larsi@gnus.org> said:
>
> Lars> Tom Tromey <tom@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.
prev parent reply other threads:[~2022-05-18 14:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 16:50 bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes Tom Tromey
2022-05-18 12:18 ` Lars Ingebrigtsen
2022-05-18 13:31 ` Robert Pluim
2022-05-18 14:22 ` Rudolf Schlatte [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1a6bely3c.fsf@constantly.at \
--to=rudi@constantly.at \
--cc=32457@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).