From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rudolf Schlatte Newsgroups: gmane.emacs.bugs Subject: bug#32457: 26.1.50; automatically set indent-tabs-mode from .gitattributes Date: Wed, 18 May 2022 16:22:31 +0200 Message-ID: References: <87zhxm8dcv.fsf@tromey.com> <87tu9nc9vi.fsf@gnus.org> <874k1n0xx4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13070"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) To: 32457@debbugs.gnu.org Cancel-Lock: sha1:EvMGFoSUxS2C/cBmuF5zjmr+6xU= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 18 16:23:10 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrKZx-0003Bl-PP for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 16:23:09 +0200 Original-Received: from localhost ([::1]:44442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrKZw-0003DA-I0 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 10:23:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrKZq-0003Cx-Ph for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 10:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrKZq-0003CX-Gm for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 10:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrKZq-0004HA-DH for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 10:23:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87zhxm8dcv.fsf@tromey.com> Resent-From: Rudolf Schlatte Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 May 2022 14:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32457 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165288376916395 (code B ref -1); Wed, 18 May 2022 14:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 May 2022 14:22:49 +0000 Original-Received: from localhost ([127.0.0.1]:33109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrKZY-0004GC-HZ for submit@debbugs.gnu.org; Wed, 18 May 2022 10:22:48 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:44544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrKZX-0004G4-6U for submit@debbugs.gnu.org; Wed, 18 May 2022 10:22:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrKZX-0003B7-1O for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 10:22:43 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:41682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrKZV-0003BX-2e for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 10:22:42 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nrKZS-0002V6-J6 for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 16:22:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232574 Archived-At: Robert Pluim writes: >>>>>> On Wed, 18 May 2022 14:18:09 +0200, Lars Ingebrigtsen said: > > Lars> Tom Tromey 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.