From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70105: 30.0.50; Emacs should support EditorConfig out of the box Date: Tue, 18 Jun 2024 15:37:52 -0400 Message-ID: References: <867chibhqi.fsf@gnu.org> <86frtnd2e6.fsf@gnu.org> <87bk3yai02.fsf@localhost> <87y172ql15.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24125"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: jcs090218@gmail.com, bjorn.bidar@thaodan.de, Eli Zaretskii , 8slashes+git@gmail.com, 70105@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 18 21:39:26 2024 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 1sJeft-00063j-OX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jun 2024 21:39:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJefV-0002fh-SM; Tue, 18 Jun 2024 15:39:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJefU-0002fT-83 for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 15:39:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJefU-00025s-0F for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 15:39:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJefV-0006MD-PC for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 15:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2024 19:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70105 X-GNU-PR-Package: emacs Original-Received: via spool by 70105-submit@debbugs.gnu.org id=B70105.171873949424333 (code B ref 70105); Tue, 18 Jun 2024 19:39:01 +0000 Original-Received: (at 70105) by debbugs.gnu.org; 18 Jun 2024 19:38:14 +0000 Original-Received: from localhost ([127.0.0.1]:49714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJeej-0006KO-WF for submit@debbugs.gnu.org; Tue, 18 Jun 2024 15:38:14 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJeeg-0006K6-Ps for 70105@debbugs.gnu.org; Tue, 18 Jun 2024 15:38:11 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B7E51444491; Tue, 18 Jun 2024 15:38:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1718739479; bh=mxxeo7VnD5cyrJld5Uxq8pYsRaVvwG3QmDEJVFrtDKo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YzRl3f7AV8E5JMYV0wQs4xR82JZVDuCHTPV/cZCSNhbjsX7Dn/ebSHeY5c+Xj+kwV NozrnDCTBrVjdzxaygw1Nwsfju/gggbf6rRelDwwawKpAFELJZioAzLSVxDa6EwoUz PPW0BO6iddokP19XhyFcsCkc7KfZUCVV9JO7QOIb9ErSY35V1QlVx+PvhyBzz8VB/5 Ti42BUzwDBumQYTmdb79guwVA/w//TILETJAKddQja6PGecXJWqm6l7fCYczZPmAeD 48RheGgjq12RrUSmcWjmNonBHcw8D/IbUx4KfI+1abivKs2q+U8iUikbeoJNPYblBF lmgzQEsZsw2Rw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1F1BA44446F; Tue, 18 Jun 2024 15:37:59 -0400 (EDT) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0F1C3120193; Tue, 18 Jun 2024 15:37:59 -0400 (EDT) In-Reply-To: <87y172ql15.fsf@localhost> (Ihor Radchenko's message of "Tue, 18 Jun 2024 16:21:26 +0000") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287453 Archived-At: >>> In particular, Org mode needs to use a fixed `tab-width' and >>> editorconfig must not override that (it is a part of the syntax). >> I don't understand: `tab-width` mostly affects the display, how can it >> break Org mode? > Because Org mode syntax depends on indentation for lists: > > - parent list > - sub-list > - sub-sub-list > > When the indentation has tabs in it, (current-indentation) return value > becomes a variable of `tab-width'. As a result, Org file syntax > unexpectedly becomes dependent on seemingly unrelated Emacs > configuration toggle. > (I also considered let-binding `tab-width' when Org parser the file, but > lists will then look funny visually) If you use the `tab-width` set by the user then you have the advantage that you parse the code in a way that is consistent with what the users see (so the problem only bites the users who don't look at their code). If you parse with a fixed `tab-width` OTOH the user may be puzzled because the code looks like one thing to them but you parse it as something else. >> In any case, Org is not the only mode with such needs (Makefile, Haskell, >> Python, come to mind). But also, disabling editorconfig wholesale seems >> a bit crude. Maybe we'll need a more targeted way to address the problem >> (and there's always `hack-local-variables-hook`). > I did not imply that editorconfig should be _completely_ disabled. > Just for tab-width in our case. I mentioned it because that's the option that the upstream package offers. > I guess that `hack-local-variables-hook' should be an ok > option. Although it feels a bit funny to: > 1. Set tab-width in org-mode body > 2. Set it again in hack-local-variables-hook There's also the option of saying that it's the user's fault. It's hard to tell in general what would be the right behavior, so I think it's important we look at concrete cases. > Hmm... Sorry, I cannot see anything in the list archives. > Either I made things up in my mind or it was discussed on IRC/Matrix. I guess we'll have to wait to see if the issue pops up again. Stefan