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#60186: 29.0.60; ruby-mode indentation of multi-line expressions Date: Tue, 27 Dec 2022 22:47:23 -0500 Message-ID: References: <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> <74f977f6-d9ba-04bd-fba0-0dce4729cf0d@yandex.ru> <8d554fc2-7da5-cfe1-c865-023d56d222e3@yandex.ru> <95adedfa-7644-c78b-8853-fde8ec38f621@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="27469"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60186@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 28 04:48:29 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 1pANQa-0006yJ-IS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Dec 2022 04:48:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pANQI-0001Ev-KX; Tue, 27 Dec 2022 22:48:10 -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 1pANQA-0001EU-Tj for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 22:48:05 -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 1pANQA-00089T-FT for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 22:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pANQ9-000157-UU for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 22:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Dec 2022 03:48: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.16721992634041 (code B ref 60186); Wed, 28 Dec 2022 03:48:01 +0000 Original-Received: (at 60186) by debbugs.gnu.org; 28 Dec 2022 03:47:43 +0000 Original-Received: from localhost ([127.0.0.1]:56898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pANPq-000135-No for submit@debbugs.gnu.org; Tue, 27 Dec 2022 22:47:43 -0500 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:39515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pANPo-00012A-M0 for 60186@debbugs.gnu.org; Tue, 27 Dec 2022 22:47:41 -0500 Original-Received: by mail-pj1-f46.google.com with SMTP id o8-20020a17090a9f8800b00223de0364beso18934003pjp.4 for <60186@debbugs.gnu.org>; Tue, 27 Dec 2022 19:47:40 -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=sC2LD83kYEZ7Htq+2YlzArcxuobK2KBqTRgKw8NWn5s=; b=HTr+YU5gzV81HMR/5hECdPPtHZs+2z6gZKtnLvvE0t0ZQQBqUpOwURERs2gihTJMYE 9dKxJ1sc/QZwD22CqT61bNrmJlaVC/km1YBFqhNVyvfmNd4mzpQcl/scE2uFCXTHZX+6 FZslZW6lrUVzC6D3xGTgNEpzPhR3Gra7cj/KzXMsHoy72ipgc6E19oQr2Z2R2nwUWVSF 3SyuZi+JYzy2LjPWizKfPNxOezLQbvQut9/gMza2W0/D++qNg6lpZxhbykRHA2JwkHS0 +MFTKPBB7DwJos7jOhj8v8UvTBdIU8s3kUA8/WIarFOaZLvgS4jI3hbQyp3DCXqc6aDp BuQQ== 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=sC2LD83kYEZ7Htq+2YlzArcxuobK2KBqTRgKw8NWn5s=; b=UarNeLpJzzaZWd8Cn0Cc+Okxa6qhKyxY0nQzaspcaxRPR9zehDdegw/G3SHNx+qCUz o7c7UL/kaa2nLyExJ2jJZuZsdb+83/mcguDbPGNa7fsCpxZZJiacNL9hnp3MwwrVYsBx S/H4r2o+7MXrW86y0mfEbYFo8ixwVVwMlBBMk6OiDU4YUVnergCKTagX/WDPG6DoXnxx 1ikhPO1XE0F/lM47/uk1dXHBhvdtwZiqG1K8kZaZsuw2hZ2gwC5SBRHrj8LN5GMUNUqf wpc7bpkWeynByfe1LsgctJjHsHZ1NSLyWzmcb+xaAIkkG/f+C8BAjAWzd13jZSN5UEoJ VRQg== X-Gm-Message-State: AFqh2krBxBPAPrdYGUhCQxAfu1zirXifxShCqDjzKTcXf9KvbrzM9QuU QV9XDMPOdtqqUL0JVntKdPKMgVzonPhFN+wtaQM= X-Google-Smtp-Source: AMrXdXuBc71a1vFcNadHDZZV2VXBcMYnkh8wng2vaJ1KQIHKkwmbYsJZwwQhbU2BTm/UjffFFpZhYJmblcciyQrKBDM= X-Received: by 2002:a17:902:7d92:b0:18e:bd50:f19a with SMTP id a18-20020a1709027d9200b0018ebd50f19amr1290787plm.81.1672199254478; Tue, 27 Dec 2022 19:47:34 -0800 (PST) In-Reply-To: <95adedfa-7644-c78b-8853-fde8ec38f621@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:251975 Archived-At: On Tue, Dec 27, 2022 at 8:02 PM Dmitry Gutov wrote: > > On 28/12/2022 02:38, Aaron Jensen wrote: > > >> Or here's a step back: looking at how the two other user options I named > >> previously were ruby-method-params-indent and ruby-block-indent, the > >> latest might as well be called ruby-operator-indent, or > >> ruby-operator-indent and ruby-method-call-indent. > >> > >> I wasn't too crazy about those names originally, but the approach is > >> very extensible with styles by adding new symbols as possible values. > > > > This may end up being the right direction. If the values are symbols > > you can use things that are relative to one another like "simple". > > There could be a benefit to all of these having a "simple" option. > > What would it mean if it were nil? > > What's the current behavior called? > > For the sake of uniformity, I wanted to start with simple values -- t > and nil, and explain their meanings in the docstring. > > 't' would mean the current behavior, and I'd call it "structural", or > structure-based indentation. Or based on implicit expression grouping. I'd typically not use t and nil on anything but a boolean and the name would be named after what t represents, but this may be an Emacs idiom that is OK. If so, and there's no better options (i.e., going against that idiom is worse than not), then that works for me. > > It may be that if we only intend to support two indentation schemes we > > just have default and simplified as you suggested and then we can use > > boolean values. I don't know how Emacs-like this is, but what if there > > were one variable like `ruby-indent-simple` that could either be `t` > > or a list of things to indent simply? > > That can work too, but what is "simple"? ;-) > > Further, I'm not sure if we're going to get more than 2 "things" this > way (operators and method calls). OTOH, if we have a separate var for > operators -- ruby-operator-indent -- we could enumerate which operators > to indent "structurally" after. Or something like that. > > Not sure which direction the feature requests will drive this extension > toward, though. Maybe mostly nowhere, given the previous history. But > Rubocop's example seems to indicate that there are many different styles > out there. Yeah, hard to say, and it may eventually become less important if ruby-ts comes about and has enough options to satisfy folks with different ideas about indentation. Aaron