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#60186: 29.0.60; ruby-mode indentation of multi-line expressions Date: Tue, 27 Dec 2022 17:56:14 +0200 Message-ID: <74f977f6-d9ba-04bd-fba0-0dce4729cf0d@yandex.ru> References: <4e44df18-207c-c7ca-0588-7285f3008dfb@yandex.ru> <358bbd65-9375-04c8-f0a2-24a4383f142e@yandex.ru> <2b4a91e1-bad1-382f-dd64-abf171efb404@yandex.ru> <60e207e0-7378-ad9f-3ef0-99df1c139939@yandex.ru> <902440c7-706a-20e1-55af-4e12e8cdda2c@yandex.ru> <688159e9-f6bc-f233-08c4-9834bc00c455@yandex.ru> 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="9040"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: 60186@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 27 16:57: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 1pACKS-0002Dq-Os for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Dec 2022 16:57:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pACK8-0004nA-ME; Tue, 27 Dec 2022 10:57: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 1pACK6-0004mk-N4 for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 10:57: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 1pACK6-0008Uj-Ez for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 10:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pACK5-0005SP-V6 for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 10:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Dec 2022 15:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60186 X-GNU-PR-Package: emacs Original-Received: via spool by 60186-submit@debbugs.gnu.org id=B60186.167215658420921 (code B ref 60186); Tue, 27 Dec 2022 15:57:01 +0000 Original-Received: (at 60186) by debbugs.gnu.org; 27 Dec 2022 15:56:24 +0000 Original-Received: from localhost ([127.0.0.1]:56353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pACJT-0005RM-UB for submit@debbugs.gnu.org; Tue, 27 Dec 2022 10:56:24 -0500 Original-Received: from mail-wm1-f50.google.com ([209.85.128.50]:39794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pACJR-0005RA-Pq for 60186@debbugs.gnu.org; Tue, 27 Dec 2022 10:56:22 -0500 Original-Received: by mail-wm1-f50.google.com with SMTP id g25-20020a7bc4d9000000b003d97c8d4941so3920217wmk.4 for <60186@debbugs.gnu.org>; Tue, 27 Dec 2022 07:56:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=duVKa8F3Za41fmT2WA3MW3IsZdCdRMTW04G7HvPr66o=; b=qiSNTe1TgWsQATFX7i3pAQqAhvm9MCbrvMLidltt5mFo+IyN3/DmkLh/Sd1IdnEfIo v3vl5q1nbVwTnqyYR6y3icQDney81KdRp+4V2FWgQl885Xjiy9XL//LEpMRcNOWW7kdM 6CYU/IA+ug5HRrNR6OLbiH8nelnkuALdRdadYgoMEIz+xgsXPMJ82yHYDvO7BJwf6Ji3 wfDOm+6ymAiOWAl+bU83vgSjy7PMhzHuDJK2sk2dMOMV61wrnVb4vSEubmlp4yrwILqQ p30IkC8NPTneOHn0G1jmAJlfAQZRYRVP5m8fXGOU1hVzU+xpw5IDXr5djtoj+JQv8qzb 18YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=duVKa8F3Za41fmT2WA3MW3IsZdCdRMTW04G7HvPr66o=; b=ecnvmQXd/nAZ2inHpxOXa4Xp7cb+dv6yq5B2rcfi7wyepQ1fVQNoV4pCHntRueVKaD OgnWOqB85O9B/3R/RYi9ckSLpdx4aODL57Ta0nmHR0eid2RZjyX6sMPmDcfz4lC7ThQt gsY/9XkuQkSmoJuxebkUH/zy42J+vwMhN1yZ8TwFBL2ah+zq0NAJ3g/cYAu1uzjQOIyk N6g1r2gAktyzXBXXLFJqnX/6MWTv1IvgdBltViukviaoHDquni03ymOSY41YMy7DRL8d ngP4iQdFMtEnekhiiIGKUdYMXee2D6SvXQ55TKzl6sNPRTX5JA3tb90nxZJNbFJ0rMJA WFKA== X-Gm-Message-State: AFqh2krJU9YSgrip8jOkFiTOW8ukCxPs+XpuQOdq5b7kh84wqM6ltFDC 6FnFXjvseIC4a4H6Ku90Y3E= X-Google-Smtp-Source: AMrXdXvMC3a/89/3zK+ehKRylbXrU0N8ZUofJs32TgLb3z1tF9CH9w1XsOy1q0meGS28BQ0uqHAd/Q== X-Received: by 2002:a05:600c:250:b0:3d2:2830:b8bb with SMTP id 16-20020a05600c025000b003d22830b8bbmr18513678wmj.34.1672156575943; Tue, 27 Dec 2022 07:56:15 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l6-20020a05600c4f0600b003d9780466b0sm10631668wmq.31.2022.12.27.07.56.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Dec 2022 07:56:15 -0800 (PST) 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:251959 Archived-At: On 27/12/2022 03:47, Aaron Jensen wrote: > On Mon, Dec 26, 2022 at 8:28 PM Dmitry Gutov wrote: >> >> On 25/12/2022 02:14, Aaron Jensen wrote: >>> (setq ruby-indent-simplified t >> >> BTW, do you have any opinion on the name? Perhaps something more >> semantic would be easier to discover. >> >> A recent tree-sitter thread brought up sh-indent-after-continuation. >> It's not a direct counterpart, though, and the examples only look >> remotely similar. >> >> Call ours ruby-indent-continuations-simplified, maybe? Now that we seem >> to have reduced its scope to expression continuations across newlines. >> >> Hopefully it won't be confused with Kernel#callcc. > > Simple is what it is in comparison to something more complex. Just 1 indent vs arbitrary number of indents depending on operator priority/ast nesting. Seems like "simpler" is appropriate. > All > indentations are pretty much about line continuation in one way or > another. Okay, how about ruby-indent-operator-continuation? Or ruby-indent-binary-op-continuation. Which would include all binary operators and method calls. *shrug* We could also split off the method call indentation to a separate option too. > What is it on its own? I'm not sure. > > Some food for thought: > > Unaligned That might be a good adjective (if we take it to mean, not aligned to the closest parent AST node), but something else to narrow down the scope is needed in the name. ruby-operator-unaligned-indent? ruby-operator-shallow-indent? > Beginning of line aligned Beginning of statement, I guess? > Standard "Standard" is a point of view. ;-)