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#73991: EditorConfig bundled with Emacs 30 does not set tab-width Date: Thu, 24 Oct 2024 15:56:51 -0400 Message-ID: References: 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="4151"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73991@debbugs.gnu.org To: Kenta USAMI Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 24 21:57:53 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 1t43xw-0000uf-74 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Oct 2024 21:57:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t43xd-0002rw-6y; Thu, 24 Oct 2024 15:57:33 -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 1t43xb-0002rm-1T for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 15:57:31 -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 1t43xa-0001jz-On for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 15:57:30 -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:Date:References:In-Reply-To:From:To:Subject; bh=x16Ws0EM9f6LSelr90EOy0ZxlOR+NPM8+x4Wu0M9v0o=; b=Aprv9XJ7n+TwYSFOKaa4DqZIIyrOHZ/Rh4Zz0W5JrNqg9nKVrwuQE+BYOSHrguLuShUsbD2E/s4srCcFgpMNL7KdzAC038mZrq85bWsKj1s337602KzXgn9xMsKzqriw7+c55VefesgbS+HwhLPSKfemfBcauH89yLMhdHBSrN8BLk268CMa8BpSqMqWK33JajZdWZQFhV4n5LCqjmWTKwJWcxwekMuCS3/mmVWjIFGH1KBBVc6uh9gOayp2BCdwBB15zMLAa/5LcqHUGvq1y1Xp9m5MDXLy5Ticit86Q76b1H6S2AFSDdsOPj66guCi7HojlDQ30h83ideQwnLRfQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t43y5-0005ZG-Lv for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 15:58: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: Thu, 24 Oct 2024 19:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 73991-submit@debbugs.gnu.org id=B73991.172979985421351 (code B ref 73991); Thu, 24 Oct 2024 19:58:01 +0000 Original-Received: (at 73991) by debbugs.gnu.org; 24 Oct 2024 19:57:34 +0000 Original-Received: from localhost ([127.0.0.1]:36261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t43xd-0005YI-K0 for submit@debbugs.gnu.org; Thu, 24 Oct 2024 15:57:33 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t43xa-0005Y1-O8 for 73991@debbugs.gnu.org; Thu, 24 Oct 2024 15:57:31 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 686ED441793; Thu, 24 Oct 2024 15:56:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1729799812; bh=5f1DVBGMQC1kdorHwdnvtabTy1VsiuOUag/6SEA+Dgg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cSG3iQCqNfGdnnd1WLsYleSMCJ4FPmn7MLG1WVVq371uOxhMclyVZIUL8TODycJLs rACKnsCIMbFR3+IkkKNBLcw4FZRfb02LFQrcrZrUEAOJ0ANES1eAOGYqr2n76sL5G8 slfxi0bNOmGmvPWBTxeBdllHpbz8sFYXm2T0EeRo8L8/pvL8fBKzPQWd2quAI57rDy +y9ykxVUr0ZuN9Zevj2iMMsfTIakGp1UndguOKzxkGockToxSdScn3PDHFatQ+R4q/ vLjCf5TY8NwsgOh0PYfs9Xr8u1Jdo+SHr89eJTVH4aPAW8WvwngwO1dTmHc2+H3E4v jf20TbZHMb97g== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5FC9344176D; Thu, 24 Oct 2024 15:56:52 -0400 (EDT) Original-Received: from pastel (69-196-161-60.dsl.teksavvy.com [69.196.161.60]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3E52E120C29; Thu, 24 Oct 2024 15:56:52 -0400 (EDT) In-Reply-To: (Kenta USAMI's message of "Fri, 25 Oct 2024 02:49:08 +0900") 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:294204 Archived-At: > In Emacs 30.0.91, the debugger does not respond when watching the variable. You can get the same behavior with indent_size = tab tab_width = 4 BTW, I think the patch below is in order: if the user sets "indent_size=tab", which means that the "indentation step" should be equal to `tab-width`, then we should default `indent-tabs-mode` to t (which in EditorConfig parlance means to default `indent_style` to `tab`). Can I push this to `emacs-30` or do you, dear maintainers, prefer that I push it to `master`? Stefan diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el index c21e12559a6..478d94a2dc1 100644 --- a/lisp/editorconfig.el +++ b/lisp/editorconfig.el @@ -437,6 +437,11 @@ editorconfig--get-indentation (when tab_width (setq tab_width (string-to-number tab_width))) + ;; When users choose `indent_size=tab', they most likely prefer + ;; `indent_style=tab' as well. + (when (and (null style) (equal size "tab")) + (setq style "tab")) + (setq size (cond ((editorconfig-string-integer-p size) (string-to-number size))