From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73359: 30.0.91; editorconfig does not work on xml files Date: Thu, 19 Sep 2024 19:10:25 +0300 Message-ID: <86msk38w0e.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14419"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73359@debbugs.gnu.org To: =?UTF-8?Q?Nguy=E1=BB=85n_?= =?UTF-8?Q?Qu=E1=BB=91c?= Minh , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 19 18:10:56 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 1srJk7-0003YW-Uu for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Sep 2024 18:10:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srJjy-0000Tk-Lw; Thu, 19 Sep 2024 12:10:46 -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 1srJjx-0000TK-4H for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 12:10:45 -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 1srJjw-0006b4-RL for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 12:10:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=xALsx9+LYFtL6pz77vHL7G2ixovVEQzAvDDwuZmn+3s=; b=WwCIu8M5ue+0k6kpW1C2RyJInUWVc3v/UYDMZJhYotvnrXK9x9rO4CSA3Km5AjuEQiahzETUljNguW6wxUWppVPf77t9R0auUQ4+H/mHUWves68gbJ5UMzaJcOx5g3O0k7kLzxz+VcUkkMvN6zU/U+zv6Qox58dFw81jMtz0NgrF65guIZKWxGvc7n2AGFdaaVxMHiZ1PqMBxBUcwsK0BeTs9ufHexOZ2RusMDvj3jIgLWGOUvW3wo6YB5e/PIResuN+Jo8oV1LvLvzCVsyuDefrpIsTNSjeuijwRsux14d4xgNyUlOGOc0Wb3emMuA70yT/879LsoiaO652SqJIgA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srJkE-0008KK-Co for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 12:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 16:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73359 X-GNU-PR-Package: emacs Original-Received: via spool by 73359-submit@debbugs.gnu.org id=B73359.172676225531990 (code B ref 73359); Thu, 19 Sep 2024 16:11:02 +0000 Original-Received: (at 73359) by debbugs.gnu.org; 19 Sep 2024 16:10:55 +0000 Original-Received: from localhost ([127.0.0.1]:33346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srJk6-0008Ju-I3 for submit@debbugs.gnu.org; Thu, 19 Sep 2024 12:10:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srJk4-0008Jf-Q3 for 73359@debbugs.gnu.org; Thu, 19 Sep 2024 12:10:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srJjh-0006Zo-3A; Thu, 19 Sep 2024 12:10:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=xALsx9+LYFtL6pz77vHL7G2ixovVEQzAvDDwuZmn+3s=; b=XWMAkM1rtX/TJHxTiPR0 5DcqzvE+KyzvWlspO7GOjmIw3mLee1/7O5uRwVHABWdtnahoyLrtfplpwsqa9zp+0/BUQjfDcsnc9 eS/PneOTzfXirTtwYd9hD8KXzNVgPKxrCI8oc0Q4+psgonIRUONyNhftzM2munwGx6vTyyfNcRKO0 XJzqzXt1wvEJZYpqkSisaLRjSLj5sx1qi5MH9ncmvkSTomf8Yns6xKPQ9iircKjPynDRyBOFWmrJB 9OwtPxPOsKLqPLxm1GPcS5oe9XyWM+ydd7qzdKkMwiLJzQgx/PMqw8n6LlFQCv2Vy/dE7eAtIXZjE 0flKZfjv2GKrOg==; In-Reply-To: (nqminhuit@gmail.com) 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:292064 Archived-At: > From: Nguyễn Quốc Minh > > Date: Thu, 19 Sep 2024 14:29:48 +0700 > > 1. start emacs with 'emacs -Q -mm' > 2. enable editorconfig-mode with 'M-x editorconfig-mode' > 3. open an xml file, e.g., pom.xml from a Java project. > 4. observe the minibuffer: > > For information about GNU Emacs and the GNU system, type C-h C-a. > funcall-interactively: Text is read-only [10 times] > Quit > Editorconfig mode enabled > Quit > pom.xml has auto save data; consider M-x recover-this-file > Using vacuous schema > Unsupported element in ‘editorconfig-indentation-alist’: ((nxml-attribute-indent . 2) . 2) > Directory-local variables error: (wrong-type-argument listp Unsupported element in > ‘editorconfig-indentation-alist’: ((nxml-attribute-indent . 2) . 2)) Stefan, this element of editorconfig-indentation-alist: (nxml-mode nxml-child-indent (nxml-attribute-indent . 2)) seems to violate the expected form of the elements, which is (MODE . SETTING). It was added as part of commit 8e143a2f300, whose log says "Sync with upstream", so I suppose this form of the element is supported by upstream, but not by Emacs? I guess we need to replace it with a function or something? Btw, can we clarify the doc string of editorconfig-indentation-alist, where it says "where SETTING should obey the same rules as `editorconfig-indent-size-vars'"? Because if one looks at the doc string of editorconfig-indent-size-vars, the "rules" are either trivial or unclear. If SETTING above should be one or more symbols ("list of variables that need to be set to SIZE") or a function that returns a list of (VAR . VAL) pairs, then why not say that in the doc string of editorconfig-indentation-alist?