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, 20 Dec 2022 00:56:02 -0500 Message-ID: References: <4e44df18-207c-c7ca-0588-7285f3008dfb@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="14951"; 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 Tue Dec 20 06:57:17 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 1p7Vcr-0003ij-CZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Dec 2022 06:57:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7Vcf-0006IW-09; Tue, 20 Dec 2022 00:57:05 -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 1p7Vcc-0006IN-Pk for bug-gnu-emacs@gnu.org; Tue, 20 Dec 2022 00: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 1p7Vcc-000833-Cr for bug-gnu-emacs@gnu.org; Tue, 20 Dec 2022 00:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7Vcb-0006do-Uc for bug-gnu-emacs@gnu.org; Tue, 20 Dec 2022 00:57: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: Tue, 20 Dec 2022 05: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.167151578525519 (code B ref 60186); Tue, 20 Dec 2022 05:57:01 +0000 Original-Received: (at 60186) by debbugs.gnu.org; 20 Dec 2022 05:56:25 +0000 Original-Received: from localhost ([127.0.0.1]:42619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Vc1-0006dX-73 for submit@debbugs.gnu.org; Tue, 20 Dec 2022 00:56:25 -0500 Original-Received: from mail-pj1-f49.google.com ([209.85.216.49]:45041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Vbv-0006dP-UN for 60186@debbugs.gnu.org; Tue, 20 Dec 2022 00:56:22 -0500 Original-Received: by mail-pj1-f49.google.com with SMTP id 3-20020a17090a098300b00219041dcbe9so11062339pjo.3 for <60186@debbugs.gnu.org>; Mon, 19 Dec 2022 21:56:19 -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=DLl/f9ktCeC6tJwsiEpZrsLy4CCzfokBLIlikwT4Pf0=; b=EscgVpEkungGeOL9Y57YS1LOZ+XT3ChK5c4I9MwlSWWfOMKHVofMefQHPOGU08taiT o++CBNRYA0fdcl6r6uXmsR2sL0SHawjhXFDmfxNXviyb74/AhjVVxESoOsW34SGsoaAP qREA4+pjIikBt2yBcB3V/oypkayPSHRyjTtO+5kFxAt5WtbzPTKxBs29DRxvPRf/0tNx QFhKwJNixHdr5fC+6DC989Kllx/YtOUEHLxy2yp/SpzRSlw75YMFErHHoP9K+86MX1zO c99mOSPN56M9e4UrYmo47LyiHA3mx9P4JowvmM5cHYI49iZvP6s8quZY++0Zz5guHLs4 G5ww== 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=DLl/f9ktCeC6tJwsiEpZrsLy4CCzfokBLIlikwT4Pf0=; b=SQIAv8nEGAVKxiu7d2GGZoGDkd3TWVnB7/lSOvq6+BmBVYkrc4iOfdkE6FBDo7bwNt hwZRZc2IqAjWDjyPg8GvQnd+H4I1hu8IDlgMG57TGiIoVXz2MOVF/hahPomHLbb/AbQA UkwOVBCGtR17UHstP7fWM83frmPUoALtKubVQSNGni/oY6uu5wAQLpfCkDC2WftuT8k4 xoJ0+O9yOLcK1SdOoUzeApkJDl3B4l728OH+2YxUVhaBBjgAcLBdC1oP2lX94mrpDKIw 7AjhSfGcRr/lGWJt2PuC5fFpnNL0Agt5Tpn/U1/xRINs5NlDMQhNZ9i1wOVJYfu96bKo oJUw== X-Gm-Message-State: AFqh2kpYbXRTdbd/O1UL6OoWrDUg4mFy/Vqq8Fe7iwFDG63hFZVOQ0Cf WwJ0w7daafEYDzNTv8loYEqC8wgkY3v4Yje0dRI= X-Google-Smtp-Source: AMrXdXtAKywuglemkeKl1vyKXUqZoqwcrOhU9180uUjvFMvL5m5e4VOc2ArWfBPxbJ5t5gXhHKY8G1re2Jfou4LHUB4= X-Received: by 2002:a17:90a:6e4b:b0:219:4a19:f984 with SMTP id s11-20020a17090a6e4b00b002194a19f984mr1650860pjm.198.1671515774003; Mon, 19 Dec 2022 21:56:14 -0800 (PST) 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:251494 Archived-At: On Mon, Dec 19, 2022 at 11:48 PM Aaron Jensen wrote: > > On Mon, Dec 19, 2022 at 9:12 PM Dmitry Gutov wrote: > > > > On 19/12/2022 04:54, Aaron Jensen wrote: > > > > > > Follow-up to bug#60110 > > > > Thanks! > > > > > I prefer rather simplictic indentation for Ruby (and this appears to be > > > pretty common from codebases I've seen). Essentially, the rule is: If an > > > expression continues on another line, indent it once. > > > > FWIW, this feels a little wasteful -- working to emulate the editors > > which don't have much of a grammar definition, so they mostly line up > > things to the beginning of the previous line (plus maybe the indentation > > offset). > > > > But I guess that can make some experience better when working in teams. > > The implication here is that the current indentation > rules are somehow objectively better. I'd argue the opposite, > that they have usability issues. > > :) > > In all seriousness though, Sorry, I was going to say, this style of indentation is more inline with what I see in the wild in Ruby codebases and essentially every other editor I've seen. Also, enh-ruby-mode is what I'm using as a guide here, and it has a pretty much perfect grasp of the grammar since it uses the Ruby parser. It's just a simpler indentation norm. Aaron