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#60321: 29.0.60; ruby-mode indentation of hash or array as first arg in multiline method call Date: Sun, 1 Sep 2024 12:28:45 -0700 Message-ID: References: <2b4a91e1-bad1-382f-dd64-abf171efb404@yandex.ru> <60e207e0-7378-ad9f-3ef0-99df1c139939@yandex.ru> <902440c7-706a-20e1-55af-4e12e8cdda2c@yandex.ru> <1191195d-1528-dc2a-64e0-15426e4b5608@yandex.ru> <75342f40-d576-e1c6-3d63-692b80e78bfe@yandex.ru> <90f8ce9c-4a60-4af9-8ed7-eeddff557129@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000004bee52062113d523" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26571"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60321@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 01 21:31:27 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 1skqIH-0006l3-S3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Sep 2024 21:31:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skqHw-00066d-W1; Sun, 01 Sep 2024 15:31:05 -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 1skqHu-000669-LL for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2024 15:31:02 -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 1skqHu-0000E2-C4 for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2024 15:31:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:References:In-Reply-To:Mime-Version:To:Subject; bh=/GSUS1LAuhJcaHw/lT8A4IReiF1elEx9j8RbkGWHONw=; b=aniMR9+obEhDD7E2w+ZzdCx6nxyU7CPvWekRUSpmXvcV6LXsNR5CMkF/1bMTOxdSTa85nnLSAVBRvWNAdW2vgE7ddK6+UVH5vk3+Y0pQNPm1Hmq8tRWHzLbI6an9kfNyc+dn5CHHFzlVho7O20A96IcVIE+pJBae0eEgEEuNnH6mbnNwcBpO2tyxmAdHDdh3T5Z6+uF8Sv4q/kvgvNcVl0uDIt04B0s5XTTPMi+0aFk9ghMLOqd3zQqJAzaBUPxTlOVPVcQamo3crGMZ/npqyW+2zyq2nxH5l12CdXCCOPGhDXPItWtdVObBWl/faaDnxOOeOTuFFgJ4JZ4qp78HzA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1skqIr-0002st-QC for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2024 15:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Sep 2024 19:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60321 X-GNU-PR-Package: emacs Original-Received: via spool by 60321-submit@debbugs.gnu.org id=B60321.172521906611017 (code B ref 60321); Sun, 01 Sep 2024 19:32:01 +0000 Original-Received: (at 60321) by debbugs.gnu.org; 1 Sep 2024 19:31:06 +0000 Original-Received: from localhost ([127.0.0.1]:38934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1skqHy-0002rb-38 for submit@debbugs.gnu.org; Sun, 01 Sep 2024 15:31:06 -0400 Original-Received: from mail-lj1-f174.google.com ([209.85.208.174]:46276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1skqHw-0002qv-LC for 60321@debbugs.gnu.org; Sun, 01 Sep 2024 15:31:05 -0400 Original-Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2f409c87b07so43388681fa.0 for <60321@debbugs.gnu.org>; Sun, 01 Sep 2024 12:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725218927; x=1725823727; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JV1hNAAc15RZGGX7yVIl9BpIp8qd3pbhowJiZe0+mKg=; b=P6dovfe80p3IeiAX1gNvDYr6yWFLtjEXdQdr4Bp5d/7dWhs6KlecdhRGHnydc85/uy osSd0U2jiOlViEivXk3dtdfDH6pFNPC7Qt76rO2rCV8BroL8XO/NcIePOJfsep4q9+zq 84WO9N1utg4ACRwdSM7Ks1RzIpM7kLbUIPx+vW4j4rRnwBC4K9f3xKBPi04oh2q9Yj+Z cZIMkS8E3XLQxIoQRg35cp6PwrBdy5FuSZiX9DVE1LorbIih66V3YZ58uH0dHL6wWZCX TXaljwj2WZQM+g1Cc+yigiBRgnkpm0ioQvIebFLnmJnxTvBt/C2/2RwkGn/WgECVazLl Kx3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725218927; x=1725823727; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JV1hNAAc15RZGGX7yVIl9BpIp8qd3pbhowJiZe0+mKg=; b=vkWmOULaowJTaugpaSAMm1YPn48XVbEQHT4ojeCQ+Wic3+VUGP8ovGb0MZYiEUr7xe /zcQoE4JxVhdFgF3DalM2dRV16dEqJHhdSqN/Dx4+MrqgFdYrZr0vZ8MorVPX/6Sm3T9 DCQilvmFPSHTg+7Z/SabcQApHmE3mbFEx/Bqy0bPhn7Z0LKb7jQe+7p5YGG9RWd20ofx 1w5GBexqL5Xj2QqP11MbtROBtMByMqMfKlWjDu6t8LgwBm86qowPCzqRWnn+IVdcIH9b EvyyUlnawVFGonqGRFKj2WSG5nA1OgWrQ/GRHkSFqGjuMwJicYMoh7OmT7A5COHJV+kt 8rvw== X-Gm-Message-State: AOJu0YzSIRad2Fd44isM7JbIFdPFY/MPnk3M1uguK/PiXYEIfIUnxFUy SmXqafM+MT77o39157NHWXfceDD+eDnj2FqSPgdnhZ4jKc03iapA+r+N6C67QIqJivojASnx1Ux C0PcrMH2zUI8i60GE3PM9kgNUzMU= X-Google-Smtp-Source: AGHT+IHiqDtGQ80rDcB1DBEH6ttz2xqfvbbGM+AT3jEBpbunqqKZAHhO4K61Dyfstnx69CSfcrV4lyusMwJ/O6gDGhM= X-Received: by 2002:a2e:4e01:0:b0:2f1:a4a0:86a1 with SMTP id 38308e7fff4ca-2f62656bcaamr30308071fa.20.1725218926874; Sun, 01 Sep 2024 12:28:46 -0700 (PDT) Original-Received: from 649336022844 named unknown by gmailapi.google.com with HTTPREST; Sun, 1 Sep 2024 12:28:45 -0700 X-Superhuman-ID: m0jysi9m.82494f5b-662a-4a44-8913-88339a95b45d In-Reply-To: <90f8ce9c-4a60-4af9-8ed7-eeddff557129@yandex.ru> X-Mailer: Superhuman Desktop (2024-08-30T19:05:53Z) X-Superhuman-Draft-ID: draft0028b2782c71e95e 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:291069 Archived-At: --0000000000004bee52062113d523 Content-Type: multipart/alternative; boundary="0000000000004bee4e062113d521" --0000000000004bee4e062113d521 Content-Type: text/plain; charset="UTF-8" Hi Dmitry, Here's a corrected patch for that particular example. Thank you for finding that. I think I missed it because as long as you type the code in, it indents fine. I still have a lot to understand about SMIE, so if anything looks off in my patch, please let me know. I didn't change the default. I wasn't sure if you wanted to change the defaults of all of the variables you added in the last round or just this one, so I'll let you handle that the way you want to. Thanks, Aaron On Sun, Sep 01, 2024 at 12:36 PM, Dmitry Gutov wrote: > Hi Aaron! > > On 01/09/2024 03:54, Aaron Jensen wrote: > > Updated patch with more precise variables in the new test. > > Thanks for taking the initiative. > > Here's an example which seems to get worse with the new variable set to > nil: > > def foo > foo.update( > { > key => value, > other_key: foo > } > ) > end > > I'd like to flip the default value (now or in Emacs 31), so it would be > great to deal with examples like this. > --0000000000004bee4e062113d521 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dmitry,

Here's a corrected patch for= that particular example. Thank you for finding that. I think I missed it b= ecause as long as you type the code in, it indents fine. I still have a lot= to understand about SMIE, so if anything looks off in my patch, please let= me know.=C2=A0

I didn&#= 39;t change the default. I wasn't sure if you wanted to change the defa= ults of all of the variables you added in the last round or just this one, = so I'll let you handle that the way you want to.

Thanks,


Aaron


On Sun, Sep 01, 2024 at 12:36 PM, Dmitry Gutov <dgutov@y= andex.ru> wrote:

Hi Aaron!

On 01/09/2024 03:54, Aaron Jensen wrote:

Updated patch with more precise variables in the new test.

Thanks for taking the initiative.

Here's an example which seems to get worse with the new variable set to= nil:

def foo
foo.update(
{
key =3D> value,
other_key: foo
}
)
end

I'd like to flip the default value (now or in Emacs 31), so it would be= =20 great to deal with examples like this.


--0000000000004bee4e062113d521-- --0000000000004bee52062113d523 Content-Type: application/octet-stream; name="0001-Add-ruby-bracketed-argument-indentation-option.patch" Content-Disposition: attachment; filename="0001-Add-ruby-bracketed-argument-indentation-option.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 549608442fe6c10f_0.1 RnJvbSAxYzIwNGE4ODM0YzhlM2U1OTBmYjg1MTQzM2Q4NmExN2JjZmZkOWE0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBYXJvbiBKZW5zZW4gPGFhcm9uamVuc2VuQGdtYWlsLmNvbT4K RGF0ZTogU2F0LCAzMSBBdWcgMjAyNCAxOTozMToyMCAtMDQwMApTdWJqZWN0OiBbUEFUQ0hdIEFk ZCBydWJ5IGJyYWNrZXRlZCBhcmd1bWVudCBpbmRlbnRhdGlvbiBvcHRpb24KCiogbGlzcC9wcm9n bW9kZXMvcnVieS1tb2RlLmVsIChydWJ5LWJyYWNrZXRlZC1hcmdzLWluZGVudCksCihydWJ5LXNt aWUtcnVsZXMpOiBOZXcgb3B0aW9uCiogdGVzdC9saXNwL3Byb2dtb2Rlcy9ydWJ5LW1vZGUtcmVz b3VyY2VzL3J1YnktYnJhY2tldGVkLWFyZ3MtaW5kZW50LnJiOgoqIHRlc3QvbGlzcC9wcm9nbW9k ZXMvcnVieS1tb2RlLXRlc3RzLmVsCiAgKCJydWJ5LXBhcmVubGVzcy1jYWxsLWFyZ3VtZW50cy1p bmRlbnQucmIiKTogTmV3IHRlc3QgY2FzZQotLS0KIGxpc3AvcHJvZ21vZGVzL3J1YnktbW9kZS5l bCAgICAgICAgICAgICAgICAgICB8IDI0ICsrKysrKysrKysrKysrCiAuLi4vcnVieS1icmFja2V0 ZWQtYXJncy1pbmRlbnQucmIgICAgICAgICAgICAgfCAzMiArKysrKysrKysrKysrKysrKysrCiB0 ZXN0L2xpc3AvcHJvZ21vZGVzL3J1YnktbW9kZS10ZXN0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