X-Loop: help-debbugs@HIDDEN Subject: bug#64589: 30.0.50; smie-config-guess can break ruby indentation Resent-From: Aaron Jensen <aaronjensen@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 13 Jul 2023 04:21:01 +0000 Resent-Message-ID: <handler.64589.B.16892220366963 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 64589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 64589 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.16892220366963 (code B ref -1); Thu, 13 Jul 2023 04:21:01 +0000 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 <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qJnoi-0001oF-Ae for submit <at> 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 <aaronjensen@HIDDEN>) id 1qJnof-0001o6-MY for submit <at> 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 <aaronjensen@HIDDEN>) id 1qJnod-0008Br-Ix for bug-gnu-emacs@HIDDEN; 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 <aaronjensen@HIDDEN>) id 1qJnoU-0006Wb-NY for bug-gnu-emacs@HIDDEN; Thu, 13 Jul 2023 00:20:29 -0400 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-579e5d54e68so1837727b3.1 for <bug-gnu-emacs@HIDDEN>; 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 <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 21:20:18 -0700 (PDT) From: Aaron Jensen <aaronjensen@HIDDEN> Date: Thu, 13 Jul 2023 00:20:17 -0400 Message-ID: <m27cr4igse.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1135; envelope-from=aaronjensen@HIDDEN; 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-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> 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'
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Aaron Jensen <aaronjensen@HIDDEN> Subject: bug#64589: Acknowledgement (30.0.50; smie-config-guess can break ruby indentation) Message-ID: <handler.64589.B.16892220366963.ack <at> debbugs.gnu.org> References: <m27cr4igse.fsf@HIDDEN> X-Gnu-PR-Message: ack 64589 X-Gnu-PR-Package: emacs Reply-To: 64589 <at> debbugs.gnu.org Date: Thu, 13 Jul 2023 04:21:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 64589 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 64589: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D64589 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#64589: 30.0.50; smie-config-guess can break ruby indentation Resent-From: Dmitry Gutov <dmitry@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 19 Oct 2023 20:07:02 +0000 Resent-Message-ID: <handler.64589.B64589.169774599722297 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 64589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Aaron Jensen <aaronjensen@HIDDEN>, 64589 <at> debbugs.gnu.org Cc: Stefan Monnier <monnier@HIDDEN> Received: via spool by 64589-submit <at> debbugs.gnu.org id=B64589.169774599722297 (code B ref 64589); Thu, 19 Oct 2023 20:07:02 +0000 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 <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qtZHw-0005nY-CD for submit <at> 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 <dmitry@HIDDEN>) id 1qtZHq-0005nE-82 for 64589 <at> 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: <xms:JYwxZYBAPPetL5zZBhe7ktIMNmoCCdgOToaWOh1hHyFS5eM6Ar862Q> <xme:JYwxZaiSkCRTb3yBv3jJqzsOTF-Zf8N1YYLYPrb0-z8VdLENabYtFhRU4qKVTiIDm mwGMbslwc3ZLGREvKM> X-ME-Received: <xmr:JYwxZbm5kU984rv6fNFBuNWpR1Yoz5KnRYwSzmh2fjZ4UiMpkAr4jPqeZStDCpc> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeeigddugeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhevhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepkeeltdfhffevteetjeelgfduueehvdefgeelteehieefudevkeegudegffev leeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: <xmx:JYwxZey1V7e8wUiYLdW9ezfZK8mTOYFP5Z0GeLb6-ESEyghDIos2uA> <xmx:JYwxZdRBnnecQvJMEqseWiFtKxj4-OJgmb-RofdLRqgczfu5ePWvEQ> <xmx:JYwxZZYb3SVGqT5eJcd2IWC87Nz4-ceOMCnqCZN4gUo2OvtVneuTeQ> <xmx:JYwxZcISvxbx3yNn80jTj9bRkU-sP2EFLAPxaRCecOiTt7TNxEXS5g> Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Oct 2023 16:05:56 -0400 (EDT) Message-ID: <c2213520-9dcf-9419-8232-80154a1e2e06@HIDDEN> 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 Content-Language: en-US References: <m27cr4igse.fsf@HIDDEN> From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <m27cr4igse.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> 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(<RET> 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.
X-Loop: help-debbugs@HIDDEN Subject: bug#64589: 30.0.50; smie-config-guess can break ruby indentation Resent-From: Aaron Jensen <aaronjensen@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 19 Oct 2023 21:43:02 +0000 Resent-Message-ID: <handler.64589.B64589.169775172721494 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 64589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov <dmitry@HIDDEN> Cc: 64589 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 64589-submit <at> debbugs.gnu.org id=B64589.169775172721494 (code B ref 64589); Thu, 19 Oct 2023 21:43:02 +0000 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 <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qtamM-0005ab-IE for submit <at> 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 <aaronjensen@HIDDEN>) id 1qtamJ-0005a6-GO for 64589 <at> 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 <at> 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: <m27cr4igse.fsf@HIDDEN> <c2213520-9dcf-9419-8232-80154a1e2e06@HIDDEN> In-Reply-To: <c2213520-9dcf-9419-8232-80154a1e2e06@HIDDEN> From: Aaron Jensen <aaronjensen@HIDDEN> Date: Thu, 19 Oct 2023 17:41:19 -0400 Message-ID: <CAHyO48zmKKM2zcwTGcQzXqQhjKHqgg1uYV7DK7W3ZMMSk4MThQ@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Thu, Oct 19, 2023 at 4:05=E2=80=AFPM Dmitry Gutov <dmitry@HIDDEN> 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(<RET> 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
X-Loop: help-debbugs@HIDDEN Subject: bug#64589: 30.0.50; smie-config-guess can break ruby indentation Resent-From: Dmitry Gutov <dmitry@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 19 Oct 2023 23:30:02 +0000 Resent-Message-ID: <handler.64589.B64589.16977581982490 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 64589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Aaron Jensen <aaronjensen@HIDDEN> Cc: 64589 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 64589-submit <at> debbugs.gnu.org id=B64589.16977581982490 (code B ref 64589); Thu, 19 Oct 2023 23:30:02 +0000 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 <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qtcSj-0000e6-OE for submit <at> 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 <dmitry@HIDDEN>) id 1qtcSi-0000dp-57 for 64589 <at> 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: <xms:07sxZQ_JQMRfjz7JsRw5jKXBZ_qM_Vy6mGJOrtIHQKyE5ulxqgntjw> <xme:07sxZYsxA2hQ-q5SGUwIjOtLhnzW56WdvsFG3E7pQUmAeuCkmZz5ebq72EE4AMfLg Ll-Lyea-Jt1jsWXNfY> X-ME-Received: <xmr:07sxZWBSY1VyKSU7b1aPMK_Lm5UF94FcLwdhHQcr4u1ET2Wylfaf4s6zNOMVA9g> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeejgddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: <xmx:07sxZQe_rwxFbZW9HtrCeSxRuFmUL408Q4FmTVQlMCCOy5op2Ny8OQ> <xmx:07sxZVNkLLXF0uzj3Sgz_-ocLi-igZGdI6oQ1fx10er5hci5NiGHfA> <xmx:07sxZanlc_2XML5XHUgB2HtTYgrF_8AxUXPOYpAHH3vVtScZI2SfYg> <xmx:1LsxZT0Ep9rwTfSdaAxgna3LphuRX_th5ZzWcFoF3sTDW3qPga2vrQ> 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@HIDDEN> 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 Content-Language: en-US References: <m27cr4igse.fsf@HIDDEN> <c2213520-9dcf-9419-8232-80154a1e2e06@HIDDEN> <CAHyO48zmKKM2zcwTGcQzXqQhjKHqgg1uYV7DK7W3ZMMSk4MThQ@HIDDEN> From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <CAHyO48zmKKM2zcwTGcQzXqQhjKHqgg1uYV7DK7W3ZMMSk4MThQ@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> 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.
X-Loop: help-debbugs@HIDDEN Subject: bug#64589: 30.0.50; smie-config-guess can break ruby indentation Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 20 Oct 2023 02:17:01 +0000 Resent-Message-ID: <handler.64589.B64589.169776819524873 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 64589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov <dmitry@HIDDEN> Cc: 64589 <at> debbugs.gnu.org, Aaron Jensen <aaronjensen@HIDDEN> Received: via spool by 64589-submit <at> debbugs.gnu.org id=B64589.169776819524873 (code B ref 64589); Fri, 20 Oct 2023 02:17:01 +0000 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 <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qtf3x-0006T5-CA for submit <at> 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 <monnier@HIDDEN>) id 1qtf3s-0006SY-2E for 64589 <at> 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 <monnier@HIDDEN> In-Reply-To: <2c81d38d-2d92-8196-c481-e6fa59e94d01@HIDDEN> (Dmitry Gutov's message of "Fri, 20 Oct 2023 02:29:21 +0300") Message-ID: <jwv1qdq6nxk.fsf-monnier+emacs@HIDDEN> References: <m27cr4igse.fsf@HIDDEN> <c2213520-9dcf-9419-8232-80154a1e2e06@HIDDEN> <CAHyO48zmKKM2zcwTGcQzXqQhjKHqgg1uYV7DK7W3ZMMSk4MThQ@HIDDEN> <2c81d38d-2d92-8196-c481-e6fa59e94d01@HIDDEN> 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-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> 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
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.