From unknown Fri Sep 19 13:23:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#64589 <64589@debbugs.gnu.org> To: bug#64589 <64589@debbugs.gnu.org> Subject: Status: 30.0.50; smie-config-guess can break ruby indentation Reply-To: bug#64589 <64589@debbugs.gnu.org> Date: Fri, 19 Sep 2025 20:23:02 +0000 retitle 64589 30.0.50; smie-config-guess can break ruby indentation reassign 64589 emacs submitter 64589 Aaron Jensen severity 64589 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 13 00:20:36 2023 Received: (at submit) by debbugs.gnu.org; 13 Jul 2023 04:20:36 +0000 Received: from localhost ([127.0.0.1]:53128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJnoi-0001oF-Ae for submit@debbugs.gnu.org; Thu, 13 Jul 2023 00:20:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:50356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJnof-0001o6-MY for submit@debbugs.gnu.org; Thu, 13 Jul 2023 00:20:34 -0400 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 1qJnod-0008Br-Ix for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 00:20:31 -0400 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJnoU-0006Wb-NY for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2023 00:20:29 -0400 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-579e5d54e68so1837727b3.1 for ; Wed, 12 Jul 2023 21:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689222019; x=1691814019; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=V3QCfOjHjr+uR+NLa/XLidYOS2E41yr2VsSZghibSNc=; b=TaP2IJuulC9a3QZyHlbKJNvvvcBGkH8a/S32dYSNG5wlIpIXaGgpSc1z6rRq4WDevQ kN3TSC+Qbl5zg9USGhwRToUoNfb0HPRfq2j1g0rDNkMfNAZqXEjccGkbiHJC47Uc2E7N PrjRqVxvjVubx9Wf3xEzVoXubY/T7v7h/p6pVw4aZxf7NN30Zv+qFK8ybUZaNCfQY3vX V2Cn0vQm6uI62J45yEiSC7nmEctgmMHcMa4s5gyJeMpsIc3uCs8wrC64c6KHyaGCcX5S lj+cuUnEkNhgsGg/F0SgszwrMzV5WpYT1wbXQY62dm0Bd/lU7NIh55+ciiK96uH/yE4M nvAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689222019; x=1691814019; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=V3QCfOjHjr+uR+NLa/XLidYOS2E41yr2VsSZghibSNc=; b=h2aPVMfJjLY9+HOUyUKuCPcwHDUycqLd3kPEoPpPdtZXOZOs3kn6y1xM+5eKiHydJv BU8O2zXhNZXEB7xLH2ChgjjXiD0i8GBwxo2vxAIFSS2QJYgjEq82QHzlV014SYedLhlv DpBtpF5L2zVRP8OJOkljfsDtN4WdEsChG0bE3xbhjDQ3c2N5is6axy5L0QMyosNZtLC5 shpUMx1ul4wjEVsQDISd9gozDWGmMcFVgh93ONziCPATJ8tfvBWtXCuIwF3rPTyQSL2B 1QcbV1pooE1yQa6vV8bPjVP/5ErQ0SEkUegcB0/+TzsjcFoCqOJlAfs/OsorWYSfIFwO ygQw== X-Gm-Message-State: ABy/qLb2WgGCAdSwdF2R9Toj6j9qJ9EOpHyJ5D/WxOqKw/mcbytk83kH h4AHojb7o3GVSy26savnt8dUl/QDgVH87g== X-Google-Smtp-Source: APBJJlFU6zbAGYK5QZWfOSx7Rxa1TMbc+uW6CxGBhrXuAI9ofx6DEcHiqjjBdwv+K7sAh3pY4jyYOw== X-Received: by 2002:a0d:c985:0:b0:56d:1f62:7793 with SMTP id l127-20020a0dc985000000b0056d1f627793mr727131ywd.46.1689222019321; Wed, 12 Jul 2023 21:20:19 -0700 (PDT) Received: from Aarons-Laptop.local (c-73-23-241-101.hsd1.fl.comcast.net. [73.23.241.101]) by smtp.gmail.com with ESMTPSA id i16-20020a819110000000b00576beffe858sm1569356ywg.97.2023.07.12.21.20.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 21:20:18 -0700 (PDT) From: Aaron Jensen To: bug-gnu-emacs@gnu.org Subject: 30.0.50; smie-config-guess can break ruby indentation Date: Thu, 13 Jul 2023 00:20:17 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1135; envelope-from=aaronjensen@gmail.com; helo=mail-yw1-x1135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) In repro.rb: def some_method return some_other_method( some_argument ) end emacs -Q repro.rb M-x smie-config-guess Type: foo( x ) The x will not be indented. If smie-config-guess is omitted, it indents as expected. In GNU Emacs 30.0.50 (build 55, aarch64-apple-darwin22.5.0, NS appkit-2299.60 Version 13.4.1 (Build 22F82)) of 2023-07-12 built on Aarons-Laptop.local Repository revision: d861de72289464e336c772f1741016a90a2118c5 Repository branch: master Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.4.1 Configured using: 'configure --with-ns --with-native-compilation --with-modules --without-dbus --without-webp --disable-ns-self-contained' From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 16:06:37 2023 Received: (at 64589) by debbugs.gnu.org; 19 Oct 2023 20:06:37 +0000 Received: from localhost ([127.0.0.1]:37892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtZHw-0005nY-CD for submit@debbugs.gnu.org; Thu, 19 Oct 2023 16:06:37 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:44279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtZHq-0005nE-82 for 64589@debbugs.gnu.org; Thu, 19 Oct 2023 16:06:34 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id BBA645C0249; Thu, 19 Oct 2023 16:05:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 19 Oct 2023 16:05:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1697745957; x=1697832357; bh=PNHQkB3+hh7gyyShfIRW4TGJ+2onFHX0r1Z VfsfyuHg=; b=chBayFi54lBHRib7yD0PI1tCg4ROkB8l5BTYCZJTMQVcnY/KKZW OOLSZTdBZBWpaKvSDKHxoEma0f8pCylgik5cYpPQyGu6/LDI+p4rkJttM4ZIKCzb PJAFbKKHEvjxaJgBv6Y0cveMcTdlJg9EndjX+PcGGyhI7lmaFWeB1lf3Z9PQbfLz PwJPe/soBhW82Ys5V09Lvs7hx93T4dHi+11tjgumoev3zg7u6BpihU1MqUGFuMks 9yCpTbDoLDSjwgNivujXl8eLkRBIn1nR0vi2IWMr9X3UMSVhg/YLLjeQOoYNtC9t sUadaOpzlmNA6BjEt1nlL2B/j58vH5RhYnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1697745957; x=1697832357; bh=PNHQkB3+hh7gyyShfIRW4TGJ+2onFHX0r1Z VfsfyuHg=; b=eA8Qme2+x++1oQArks/I6arEJdDgxklffLe1MFXPovlzybbH64B lYr01dBTpZ5fBVYSFg/AaZKh2QfMiFHtJX/YlW3wfeWPvQvI9J9SD4rgAzRmn2D5 bTVu0Yhxalpv6nh5Uplagmzs1mejvWoZ/U1rzJ1OVaEOnxDnli3Gi7BPNYd+00fO B+iB8GAy/iMHFgbDah56Kn9APzqWMvjzVxC87yttiD+OlopJSoeT/YDAgciRbL6g 2Cl3i/rE936PhtB/s2ZBEPNNM5DZJVOYK8G083xbm2bzS4c55uP99pW/IDxRo6WI OhQoNXdOaKaGAoYaeHxaSST9/nrVlqEl6PA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeeigddugeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhevhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepkeeltdfhffevteetjeelgfduueehvdefgeelteehieefudevkeegudegffev leeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Oct 2023 16:05:56 -0400 (EDT) Message-ID: Date: Thu, 19 Oct 2023 23:05:54 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#64589: 30.0.50; smie-config-guess can break ruby indentation Content-Language: en-US To: Aaron Jensen , 64589@debbugs.gnu.org References: From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 64589 Cc: Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Hi Aaron, On 13/07/2023 07:20, Aaron Jensen wrote: > In repro.rb: > > def some_method > return some_other_method( > some_argument > ) > end > > emacs -Q repro.rb > M-x smie-config-guess > > Type: > > foo( > x > ) > > The x will not be indented. If smie-config-guess is omitted, it indents > as expected. Sorry about the late reply. But it seems like this feature might be incompatible with the relatively complex way the ruby-mode indentation is written (the comments inside 'smie-config--guess' seem to indicate so). So while it does sound cool to be able to use style detection, it might only work okay for certain languages/indentation rules. One thing to note, though, is that it seems to want larger files, to be able to "learn" from more cases. But when I provide a larger file, it usually ends up saying "Nothing to change", even if some lines are indented differently from the current config. E.g. if I just expand your example to: def some_method return some_other_method( some_argument ) foo( bar, tee ) end then adding foo( at the end indents predictably okay. Perhaps Stefan as the author could tell us whether it's at all feasible to adjust ruby-mode to be more compatible with smie-config-guesser, or whether there could be some low-hanging fruit in the latter to help. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 17:42:06 2023 Received: (at 64589) by debbugs.gnu.org; 19 Oct 2023 21:42:07 +0000 Received: from localhost ([127.0.0.1]:38021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtamM-0005ab-IE for submit@debbugs.gnu.org; Thu, 19 Oct 2023 17:42:06 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:51620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtamJ-0005a6-GO for 64589@debbugs.gnu.org; Thu, 19 Oct 2023 17:42:04 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-53db360294fso123889a12.3 for <64589@debbugs.gnu.org>; Thu, 19 Oct 2023 14:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697751690; x=1698356490; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=drt8PZVC0ClXw7HvXUsPiIH6atxPy3WEL6TgUMhkxrA=; b=QXPJprjq7IWAP6Ewo9K3sEW+VQMxsKggU0vHtO3arEgDAmdEOrPrVSXXV3ow41iA7S 40szq59F2E9NwAZx0hYVx6rssSsnvskSIPlpDU9ToVPjod5tDS0W3SBQxsL8cHzi2wsy 95tcalZbhZLuOzLwiO6Kdgp5gNuSVVJr+DiVSyv5gnEEg2fdTCOeJGrhgdERRl4q5X3A bnjtK7botz3v+tdhgh1G2Cy+gFbUseJUV+wZr1gNVvIWRwLV+1M/IYQFQEfla0IFAXg4 bKdw99e5S6qexMkWaTpLF7kN9O31iC0vKz4zQKCdxdqXEINj9o8g7QzJB/1XzS+Hg5i4 j3DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697751690; x=1698356490; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=drt8PZVC0ClXw7HvXUsPiIH6atxPy3WEL6TgUMhkxrA=; b=v1KiM325W6TUuMS3d3VliJZZRiHvbCuSTf69EfTXR1aenGoCRtBRjsy55eumSPTjID nWJxjrSFrSJyOkSGUkZ3aYcT6zlx5yjhUa9FxAcOj8C9RhVGocxaYSHFDOZQo4tIrBPv 9q9+J/HBrIN4RwqPsEndHhIH4ED0nJAoaNfUgWbo1ieENkhbAN6JfIPEBy8NNUNP/6we B2SrSTdCztcBmDg7rf9FI2FVU0qflzg187t+cSLJLH6LhJLEwfM+pZOCdjaq+pU6kqD7 aaZkEc4zGdTiM3SBst9d2ghGSRAKUOT+s7Lqb/6vp+w+0bijVNrzUQTXfwGv6srIh0Ji 3Rqw== X-Gm-Message-State: AOJu0YxwJYHZoI/28p/ZSUlA7arFhE1Sb2OfqKly0Gzl7nz6mf8ogs1Y EH4oKtNxQ4Z5RXuzBZEbcnPllWXt+OVddq70sS5+ObohV3g= X-Google-Smtp-Source: AGHT+IF3wNl8xOA//0p5pB1T2P99zwhArru972nB0I2biL94mhwxhzkwO9yRuxW/PpkOy7H3N+ilKEdi8dxexNi/8eo= X-Received: by 2002:a50:d681:0:b0:53e:455c:6273 with SMTP id r1-20020a50d681000000b0053e455c6273mr133411edi.2.1697751690314; Thu, 19 Oct 2023 14:41:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aaron Jensen Date: Thu, 19 Oct 2023 17:41:19 -0400 Message-ID: Subject: Re: bug#64589: 30.0.50; smie-config-guess can break ruby indentation To: Dmitry Gutov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64589 Cc: 64589@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, Oct 19, 2023 at 4:05=E2=80=AFPM Dmitry Gutov wro= te: > > Hi Aaron, > > On 13/07/2023 07:20, Aaron Jensen wrote: > > In repro.rb: > > > > def some_method > > return some_other_method( > > some_argument > > ) > > end > > > > emacs -Q repro.rb > > M-x smie-config-guess > > > > Type: > > > > foo( > > x > > ) > > > > The x will not be indented. If smie-config-guess is omitted, it indents > > as expected. > > Sorry about the late reply. > > But it seems like this feature might be incompatible with the relatively > complex way the ruby-mode indentation is written (the comments inside > 'smie-config--guess' seem to indicate so). So while it does sound cool > to be able to use style detection, it might only work okay for certain > languages/indentation rules. > > One thing to note, though, is that it seems to want larger files, to be > able to "learn" from more cases. But when I provide a larger file, it > usually ends up saying "Nothing to change", even if some lines are > indented differently from the current config. E.g. if I just expand your > example to: > > def some_method > return some_other_method( > some_argument > ) > > foo( > bar, > tee > ) > end > > then adding foo( at the end indents predictably okay. > > Perhaps Stefan as the author could tell us whether it's at all feasible > to adjust ruby-mode to be more compatible with smie-config-guesser, or > whether there could be some low-hanging fruit in the latter to help. Ok, thanks. The context here is that I use dtrt-indent and it invokes this before doing its work. For now, I have disabled it in Ruby (which I think is actually fine because I thankfully don't work with any Ruby code that is something other than 2 spaces). So right now, I'm not concerned about this personally, but it does seem odd that it breaks indentation in some cases. Thanks, Aaron From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 19:29:58 2023 Received: (at 64589) by debbugs.gnu.org; 19 Oct 2023 23:29:58 +0000 Received: from localhost ([127.0.0.1]:38182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtcSj-0000e6-OE for submit@debbugs.gnu.org; Thu, 19 Oct 2023 19:29:58 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:57813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtcSi-0000dp-57 for 64589@debbugs.gnu.org; Thu, 19 Oct 2023 19:29:56 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 289C65C034F; Thu, 19 Oct 2023 19:29:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 19 Oct 2023 19:29:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1697758164; x=1697844564; bh=Byaj59gEdgaQxwNhfIxZGTr/DalGNuThx6V ItYuXu+U=; b=OvNouOLPlfvw7H0UExvo226eyBVqc6cy3X99NimyiiZMAUfhlFw ThlaHGUokkmIhMdrY4lQXGpWhfAG8OIlSIHe6y/ZlY3Pcb/ZDuGUH7Q/hscR2OF5 Rd65ltF7FyP0x9IHFw4YmMuBjn0LAdUngrCHZfxefn7vJ3gYAOgaGXX32tdE4fyr vhyYRgXyjrHchHKnVvSzyVKD2JHcqDMwrPquSFL/z3lHWMpMhsrbSgd3NswN/ErV DUPd8JecEtJR00+UZBKPpj1pYPKnOLk5A2On5cd5fRw8hDD+k+ojYgN34ybrGbuN sWElh6Ty3LLQzL+ZrK78rC9LidY2ilJ6fNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1697758164; x=1697844564; bh=Byaj59gEdgaQxwNhfIxZGTr/DalGNuThx6V ItYuXu+U=; b=NIapk9W2uA82uEYuLRpoDDO+CXweFg1HLLo7GdnB+XeBf2d+JcR 68ZEWWj0FEXDDhko9OaHSmxum0Ig6MIF+CUoTiKodiSO/fGl1J+UoNUhHDpWstOy JDWa/7EECNkgF7ZX22ok2nUdoVioO7t2FmqAAZ8gc9+9qxwhDUvIcg4/YYs99bLV nrbkkFskAH4qYJyJqLiwvuGYcmDQ0A/7CL8CIJkHupHg1b+TSpAdLX/8m2K/wZDl zzyXlGgOlwjisNm/C6ZvwH8vdpMf2hfDdjYU8O6IW32drftG4zfTQisP+8X71QyC /8KgH5swinFhlpsCI1So2OT061hAjYDVyUg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeejgddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Oct 2023 19:29:23 -0400 (EDT) Message-ID: <2c81d38d-2d92-8196-c481-e6fa59e94d01@gutov.dev> Date: Fri, 20 Oct 2023 02:29:21 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#64589: 30.0.50; smie-config-guess can break ruby indentation Content-Language: en-US To: Aaron Jensen References: From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 64589 Cc: 64589@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) On 20/10/2023 00:41, Aaron Jensen wrote: > Ok, thanks. The context here is that I use dtrt-indent and it invokes > this before doing its work. For now, I have disabled it in Ruby (which > I think is actually fine because I thankfully don't work with any Ruby > code that is something other than 2 spaces). All right. > So right now, I'm not concerned about this personally, but it does > seem odd that it breaks indentation in some cases. Perhaps we'll simply end up documenting that it doesn't work for all SMIE modes, just for some. And dtrt-indent will have a whitelist. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 22:16:35 2023 Received: (at 64589) by debbugs.gnu.org; 20 Oct 2023 02:16:35 +0000 Received: from localhost ([127.0.0.1]:38296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtf3x-0006T5-CA for submit@debbugs.gnu.org; Thu, 19 Oct 2023 22:16:35 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:1194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtf3s-0006SY-2E for 64589@debbugs.gnu.org; Thu, 19 Oct 2023 22:16:32 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1ADBA442976; Thu, 19 Oct 2023 22:15:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1697768153; bh=IRnFGPmQTcwbrjKEFxxU2CZWgdaq3XJAkNaiDsAzgDQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=EIoSSm3EA4hnK0c/X7Fd/gCQZXn/D02rv0vxOk6qC2OfT7PhZzQ/1CEoPhYauEV2F 4D+jgAd53btdq3Pc1IH1RvGuYnpogPEtTitx2pvoqsXCv6Ae7X8YDWNh+vAJm4vqpb x69ZCkUochRK3Ay9/8raYVdnlq2Nr4sueOCzJjlzPIeqLXI/mvPw/EFM9H/4+NXM3M gTs2saDl8EBCKpVAgP0hX9/hsuKNNWdeOUFsu2CC9tzPgX4sec4/GBdojS3NhpU1+K glAlxJoAf0VuwCqcUB95f3dcnDLW+nZJYsRXAHrGychQmZPmSSRmXAJ3r1LP8jCI92 8kY7q1R0Yth/w== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8FF8344297D; Thu, 19 Oct 2023 22:15:53 -0400 (EDT) Received: from pastel (unknown [45.72.216.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6431612016C; Thu, 19 Oct 2023 22:15:53 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#64589: 30.0.50; smie-config-guess can break ruby indentation In-Reply-To: <2c81d38d-2d92-8196-c481-e6fa59e94d01@gutov.dev> (Dmitry Gutov's message of "Fri, 20 Oct 2023 02:29:21 +0300") Message-ID: References: <2c81d38d-2d92-8196-c481-e6fa59e94d01@gutov.dev> Date: Thu, 19 Oct 2023 22:15:52 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.009 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64589 Cc: 64589@debbugs.gnu.org, Aaron Jensen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Perhaps we'll simply end up documenting that it doesn't work for all SMIE > modes, just for some. And dtrt-indent will have a whitelist. It's definitely the case that it's a "best effort" kind of tool, which makes assumptions that don't always hold. Using it unconditionally like `dtrt-indent` does seems ... optimistic, but I'll take it as a compliment :-) Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 23:40:43 2023 Received: (at 64589) by debbugs.gnu.org; 20 Oct 2023 03:40:43 +0000 Received: from localhost ([127.0.0.1]:38362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtgNO-0005f1-Pt for submit@debbugs.gnu.org; Thu, 19 Oct 2023 23:40:43 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:58648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtgNM-0005em-E6 for 64589@debbugs.gnu.org; Thu, 19 Oct 2023 23:40:41 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-507be298d2aso468875e87.1 for <64589@debbugs.gnu.org>; Thu, 19 Oct 2023 20:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697773207; x=1698378007; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=akoCSzPC5KN9cWwZY6wtQY98S5pLpf+9G46HEUWPRUY=; b=a2zFUc2G6bNuhSglbsauVBAJKOtAQyaTPT4uJ0VX/8AwjFcXo9pcCWJoLy1HB0BQ9t nbEGY2HmtLlUysHb3wnYsGrdPuu7I4Zr0WtyidFJNpn2L9MFRpGNV66Vo32mUzCQNo4m 7rVB5GyOlxVLDvrW9wHqSN6BNF3ym6EtcYZGHf+VqrWrAa0V7VzmWZJyA1JOWfixgWok j7HxvlrQKWB4d4IWKkFIIxgDoKN9xpzbaFL1v+kRqOQJR0owu22qINyb8GZH21H1JDQj fA07OXmHrs1PI+3M79+qmyJbXClNpvUDPm7gOLmJbqOmIDmNubJy44/NuhIpPzY96k8X lTyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697773207; x=1698378007; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=akoCSzPC5KN9cWwZY6wtQY98S5pLpf+9G46HEUWPRUY=; b=FMUCo/ZWLSz1zvYFr6Bic6R1U95CEMGFn3GEiUXMOwRjb8AXggzWXPBDQG/E358JfX lzBqla5ehQ7EiDY3frCgQxdE2U5fqJhnVRUavUr9MyVemtQiqfs2TPBTJo+qAwJARFN9 ljQf0pNx7V1S7utfZfu0VwliTI83itlf6NmnwxJAs9ioaWom86mybODbYkPyV8SLdX8B KOfKQz8ey9t3DrRM7M3dgt2d56LTF0atq7JK0hfiGA5bApMOmBXt3aHYHo9e4mkHS4eM dg07p6h/vrqQ6pCan8Uhke8GbaJHHbPGAzX4j2nJPJ6B5q3Afrg80DKqTt9cgjgEKEk5 nqJA== X-Gm-Message-State: AOJu0YwrwI9LeY5pJGjOqTSRACTs4QkFLQ+PwXZUKVm/E++yhuWOgi7u 09Zm8pQM6hRGSR1ZEp6xZeIK6/2ohX0IVod/h88= X-Google-Smtp-Source: AGHT+IGRCcUmlqFdX2su8CgRSwDXZ5cPWIM3RZXndXcMtcl0SRataGw7mS2s60rkOIJmqHzpd5L6YB/MqQBrcySdNyo= X-Received: by 2002:ac2:599d:0:b0:507:a62c:5d0c with SMTP id w29-20020ac2599d000000b00507a62c5d0cmr361355lfn.19.1697773207107; Thu, 19 Oct 2023 20:40:07 -0700 (PDT) MIME-Version: 1.0 References: <2c81d38d-2d92-8196-c481-e6fa59e94d01@gutov.dev> In-Reply-To: From: Aaron Jensen Date: Thu, 19 Oct 2023 23:39:55 -0400 Message-ID: Subject: Re: bug#64589: 30.0.50; smie-config-guess can break ruby indentation To: Stefan Monnier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64589 Cc: Dmitry Gutov , 64589@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, Oct 19, 2023 at 10:15=E2=80=AFPM Stefan Monnier wrote: > > > Perhaps we'll simply end up documenting that it doesn't work for all SM= IE > > modes, just for some. And dtrt-indent will have a whitelist. > > It's definitely the case that it's a "best effort" kind of tool, which > makes assumptions that don't always hold. > Using it unconditionally like `dtrt-indent` does seems ... optimistic, > but I'll take it as a compliment :-) > > > Stefan > Just to double check, the thing I found odd was that it broke some indentation, but not all. I don't know anything about how it works or what its impact is, but it wasn't like it disabled indentation across the board. It just made much of the indentation stop working or break in subtle ways. This is what smie-config-buffer-local ends up as: ((-5 :elem basic 2)) Thanks, Aaron