From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#64589: 30.0.50; smie-config-guess can break ruby indentation Date: Thu, 19 Oct 2023 23:05:54 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30286"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Stefan Monnier To: Aaron Jensen , 64589@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 19 22:07:03 2023 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 1qtZIL-0007dC-DL for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Oct 2023 22:07:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtZHy-0001Su-QD; Thu, 19 Oct 2023 16:06:38 -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 1qtZHw-0001A3-0x for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 16:06:36 -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 1qtZHv-0004IJ-OF for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 16:06:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qtZIM-0005oC-Dy for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 16:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Oct 2023 20:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64589 X-GNU-PR-Package: emacs Original-Received: via spool by 64589-submit@debbugs.gnu.org id=B64589.169774599722297 (code B ref 64589); Thu, 19 Oct 2023 20:07:02 +0000 Original-Received: (at 64589) by debbugs.gnu.org; 19 Oct 2023 20:06:37 +0000 Original-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 Original-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 Original-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) Original-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 Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Oct 2023 16:05:56 -0400 (EDT) Content-Language: en-US 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:272759 Archived-At: 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.