From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#54702: 29.0.50; ruby-mode indentation: endless methods Date: Fri, 16 Dec 2022 00:07:07 -0500 Message-ID: References: <2136fe2e-85dd-8a3f-dc7b-ee7a8389dc76@yandex.ru> <0178ae56-21d9-55e9-68f6-b2e8e2a483ff@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6953"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54702@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 16 06:08:25 2022 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 1p62xM-0001dt-Ni for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Dec 2022 06:08:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p62x2-0008NQ-Mj; Fri, 16 Dec 2022 00:08:04 -0500 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 1p62x0-0008Mo-MT for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 00:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p62x0-0005Fv-EZ for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 00:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p62x0-0003Pn-BD for bug-gnu-emacs@gnu.org; Fri, 16 Dec 2022 00:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Dec 2022 05:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54702 X-GNU-PR-Package: emacs Original-Received: via spool by 54702-submit@debbugs.gnu.org id=B54702.167116724613093 (code B ref 54702); Fri, 16 Dec 2022 05:08:02 +0000 Original-Received: (at 54702) by debbugs.gnu.org; 16 Dec 2022 05:07:26 +0000 Original-Received: from localhost ([127.0.0.1]:47005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p62wP-0003P7-RX for submit@debbugs.gnu.org; Fri, 16 Dec 2022 00:07:26 -0500 Original-Received: from mail-pf1-f181.google.com ([209.85.210.181]:43869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p62wO-0003P1-LX for 54702@debbugs.gnu.org; Fri, 16 Dec 2022 00:07:25 -0500 Original-Received: by mail-pf1-f181.google.com with SMTP id n3so1026751pfq.10 for <54702@debbugs.gnu.org>; Thu, 15 Dec 2022 21:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BxE7piec0pi2O3Vwy7/L/27bwykcJYI34DrWsyV9j58=; b=ausOmOph54zscMbWYbdGdbrvWv7WJ7kx7K61rxAfumoQrEraaLS+iyvt9/VUNSdf6y 8TZ04C6W0BiFBYmlHvr4IM+wEkFBe5V7Dht3eBPf7wIorB90WFq0Rvgki+/DtBoAFD+e N2Ai9c50m8BPL5TUPGoffZl7jYmljpAprlv2oImMptofZtkZ8e4atubDUJvCbGfGvgMI DGhkpVvZuaJz/hqBHg5ZJu31Y6qGhRgd0OGz+OW/DBuWbNi7vCYUyRYkeDPZM+xEAKGc G8dEXXRtgNl5CZ8MaqqYv4kDpaMD49b6Wza9TWGr8r8Ddb9+LerB1+R46QqZ78/U+Lpg wHIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=BxE7piec0pi2O3Vwy7/L/27bwykcJYI34DrWsyV9j58=; b=rhyK8QQ74fAuyuf8JQwJEN4pBRVwMO2B/zruKbdJSCQux8Fo4kW9IjSVK+jc2FFNLP ek17LsikCxMPdDuTvic/E0A3JKVdeEle1/fBoCKMwDCdNoUcJkHavg1lIZH/YPXFosB+ szwh/hV8XFx5NgHju4H24+8eIDxQ4hahVQb8iDRsEVbz7MM4BAGrK0utdlqzhU14Sjge IsxKbkfEbcdO8hbrKYtTBwT0Y8ZhbrWsO2W6tJjYYY2Kq9j0oQj6ovzcXTXfQ5gcqTwg SMim0jURsptr/4sX9Dn+82GzbUHMiaukMXbqe8FmANZwzYxCt3D1iG93VP2u/exK3X79 ZraA== X-Gm-Message-State: ANoB5pmRaMqW0AoLrSECSuvGJgW5cucZ8Z+AM51+PjI0l8ShjOU9O/JU 2CgxGY7CezdcsIIY3oZU1qP04y+KzFrjvL/AjoLV1v5jYB0Z9Q== X-Google-Smtp-Source: AA0mqf5M6VwRL7O19QGXHfMuQw5j+O8bQVGsDH9WiwwNW78PCUBvtUygjIKT7oQ/4C1g+9xVDdz9p+sf0ektZH6UuTw= X-Received: by 2002:a63:7111:0:b0:478:a6de:4d1b with SMTP id m17-20020a637111000000b00478a6de4d1bmr21346172pgc.95.1671167238496; Thu, 15 Dec 2022 21:07:18 -0800 (PST) In-Reply-To: <0178ae56-21d9-55e9-68f6-b2e8e2a483ff@yandex.ru> 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:251178 Archived-At: On Thu, Dec 15, 2022 at 7:33 PM Dmitry Gutov wrote: > > Hi Aaron, > > Sorry for the long pause. You said you're using something else, though, > so it didn't seem urgent (and I've yet to encounter endless methods at > $day_job, FWIW). Not a problem at all. Our project is very data heavy and we define lots of one line methods, so we have made good use of them. > Not a problem for me, but could you test the attached patch anyway? > > It seems to handle a bunch of different/complex cases fine without > regressions, but it's always better with a second pair of eyes. Sure. I tried a few things and the only problem I can find is that it does not handle endless module methods: def self.some_method = "some-value" (with or without the line break, it handles them as the unpatched version handles instance endless methods. > > I'd probably use ruby-mode if > > it supported indenting long parameter/argument lists the way the > > non-smie version does, like this: > > > > def some_method( > > some_param, > > some_other_param > > ) > > Now that the SMIE stuff is again in my short-term memory, it shouldn't > be too hard. Just please file a separate bug report (slash feature > request) with a precise example. Bonus points for linking to a relevant > Rubocop rule, so that we can pick a better name for the new user option. Sure thing, just sent one in: bug#60110 > I don't see the non-SMIE version indenting it like this -- it looks more > like this instead (and only if I set ruby-deep-indent-paren to nil): > > def test2 ( > asd, > asd > asd > ) > > So let's start with a couple of good examples. Yeah, this is what I see too. Not sure what I saw before. In any case, I sent a current/desired. > My main problem with it is the spotty maintenance like in this example: > https://github.com/zenspider/enhanced-ruby-mode/issues/96 > > But it might work fine for many people. Especially those who don't use Robe. > > Some previous versions of it (probably by the previous maintainer) were > really broken, so I just took up ruby-mode instead. I haven't tried > using its latest versions much. Copy that. It works well for me. My endless method patch has since been merged. Unrelated, but I'm excited about the prospect of a treesit mode for Ruby. Thanks again, Aaron