From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#70105: 30.0.50; Emacs should support EditorConfig out of the box Date: Tue, 18 Jun 2024 16:21:26 +0000 Message-ID: <87y172ql15.fsf@localhost> References: <867chibhqi.fsf@gnu.org> <86frtnd2e6.fsf@gnu.org> <87bk3yai02.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1225"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jcs090218@gmail.com, bjorn.bidar@thaodan.de, Eli Zaretskii , 8slashes+git@gmail.com, 70105@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 18 18:20: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 1sJbZJ-00005K-Iu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jun 2024 18:20:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJbYv-0005NM-Nk; Tue, 18 Jun 2024 12:20: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 1sJbYu-0005MO-4h for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 12:20: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 1sJbYt-0001jC-T3 for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 12:19:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJbYw-0005GA-8d for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 12:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2024 16:20:02 +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.171872759620196 (code B ref 70105); Tue, 18 Jun 2024 16:20:02 +0000 Original-Received: (at 70105) by debbugs.gnu.org; 18 Jun 2024 16:19:56 +0000 Original-Received: from localhost ([127.0.0.1]:44660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJbYp-0005Ff-Me for submit@debbugs.gnu.org; Tue, 18 Jun 2024 12:19:56 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:42505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJbYn-0005FN-9z for 70105@debbugs.gnu.org; Tue, 18 Jun 2024 12:19:54 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9113A240027 for <70105@debbugs.gnu.org>; Tue, 18 Jun 2024 18:19:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718727584; bh=tn8ZrcYcLUm/+cIxsLaIBU+ZCFe68hZM9xyO+CbuKnM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Ci27b24mFh8GYv5Qa0qgDs2voXZfmIyfsko+OEGfEyUDW9KJXfOCqS7d8kTlZ0hR1 bwmqEnPwrRdx+uizelTlXZ2Lwm6OKelz8Jeo9b0+cOXpZmVW38r6ou5kZmWhOZb/S0 m7jAqpvB5UrvWgdPyuH4IlztO80fBNCvAwCjfy4oxa3BNLkN2TvO1TTOpGAslZw/Ab DXi/8A4gCicnm1v27kBU/wDdck5cfZdZZ5e//r/Q8Kzs2L2eXLbhwdwgH1k9jKTz04 W/NwamxFcZ6U5Kyv6x9aIZ8HUsABfjhOj8rR7Xse05nd/FtLWm2jdsZfbZytvfGxLj aErF8LLb+gcQQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W3X5V4t8vz6ty4; Tue, 18 Jun 2024 18:19:42 +0200 (CEST) In-Reply-To: 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:287444 Archived-At: Stefan Monnier writes: >> 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) > 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 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 >> We already had a user reporting problems caused by >> https://github.com/editorconfig/editorconfig-emacs where tab-width was >> changed to 4 by default. > > The upstream code sets `tab-width` in more cases than the code > I'm submitting, so maybe I already fixed the problem? > Do you have a more precise URL for the issue? 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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at