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: Sun, 18 Dec 2022 21:54:18 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4213"; mail-complaints-to="usenet@ciao.gmane.io" To: 60186@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 19 03:55:16 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 1p76JA-0000y9-4q for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Dec 2022 03:55:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p76Ix-00061w-Vz; Sun, 18 Dec 2022 21:55: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 1p76Ix-00061l-5n for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 21:55:03 -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 1p76Iw-0006zU-TD for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 21:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p76Iw-0004bJ-DQ for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 21:55: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: Mon, 19 Dec 2022 02:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60186 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167141846617669 (code B ref -1); Mon, 19 Dec 2022 02:55:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Dec 2022 02:54:26 +0000 Original-Received: from localhost ([127.0.0.1]:37359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p76IM-0004au-2S for submit@debbugs.gnu.org; Sun, 18 Dec 2022 21:54:26 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:55078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p76IK-0004am-48 for submit@debbugs.gnu.org; Sun, 18 Dec 2022 21:54:24 -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 1p76IJ-0005yt-Rx for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 21:54:23 -0500 Original-Received: from mail-vs1-xe2d.google.com ([2607:f8b0:4864:20::e2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p76II-0006hx-3V for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 21:54:23 -0500 Original-Received: by mail-vs1-xe2d.google.com with SMTP id h26so7495234vsr.5 for ; Sun, 18 Dec 2022 18:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=GKr7eJ6NW2m1vAfDPBa96r5moeSoqJHm1fLBXs5G6oM=; b=RXLrPruvVSHlhdrzUq+7LwV8zg08r5MP5K+ss29uq1Ypnv1qTK0wp8v8lPTvTB+qaV OUy6BN7bA3uedEsGcSW+At9kltge2zfyHBLQ0olN/a1OHgEfXoZbw102NxBTbq52lU6V UV82/ADG94wq9Wamy9/I5g0CtdBibzljd1Bup/t7jAj12Jd+w9M3yfPGy+M9dWbaAluQ qh2vFIzAM1hIwef5xZuBNzOGBIOARnWE7gnh92ZZqh9HHy7aO9xtbzmuUrwcqF+AAaLZ uEBTCeclM9JDl/u6aWVS5A+IsUEDl6FRQu4Gb25hMcS56SCCeoGmR+J/ZrlM19JGHxAU bdvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GKr7eJ6NW2m1vAfDPBa96r5moeSoqJHm1fLBXs5G6oM=; b=Cr23xcn0VFTUJNZTGkfTlBfNDAQE64daWUulvGSiAhjghV73MtucaPa0x1mpyWLSAN 294z7lj2yXilkiLW2bUqZ3H/v8sG3QZkenQaHg7RnmCeZYI+DNz6MP8ajJ8MctZVnbIs 3FgYvVImYd3aOwzL8FXr/mEX+YSWfyAwqWZCWHuW9Okt+rKFv7bgCIbQt0kQOtMf8dbB jvI8FMe0JvjozYvNV3yPLesx0c7ZreiJuLO8n56UxSxBd0jMgpVugs6djdb+/XfLwf5a rWcW2q+amM1vXrP/nz51krAe0/QdBA10s8OP1fMCBFNl1nxLEl83zzI2zVnUtuxzwuWO YQmQ== X-Gm-Message-State: AFqh2kpH3dEjfyV2iCUbH/jqte6G67FoV5qRY0jIam8Ql64kAY7GOkTI kWs8X7MQiYz0JitSunq/fsBfiJ2M5IkSaA== X-Google-Smtp-Source: AMrXdXspzc06/EiI7pnCrV+aubBCVyPXU0h3z/LJru64+BMiyggz/seDZD+gi/G+/MxOBYmmsBCZyA== X-Received: by 2002:a05:6102:21db:b0:3bc:e711:1844 with SMTP id r27-20020a05610221db00b003bce7111844mr1079476vsg.20.1671418460660; Sun, 18 Dec 2022 18:54:20 -0800 (PST) Original-Received: from Aarons-Laptop.local (c-73-23-241-101.hsd1.fl.comcast.net. [73.23.241.101]) by smtp.gmail.com with ESMTPSA id l22-20020ab07196000000b00418ccf714cfsm1194948uao.10.2022.12.18.18.54.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Dec 2022 18:54:20 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::e2d; envelope-from=aaronjensen@gmail.com; helo=mail-vs1-xe2d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:251391 Archived-At: Follow-up to bug#60110 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. Current: some_variable = some_object. some_method Desired: some_variable = some_object. some_method Current: some_variable = some_number + some_other_number * some_third_number + some_fourth_number - some_fifth_number Desired: some_variable = some_number + some_other_number * some_third_number + some_fourth_number - some_fifth_number I don't know if this last one is related or not, but it follows the same rule plus the rule about blocks. Everything about the continuation of the expression is indented once. The contents of the block are indented once more. The end should line up with the line that opened the block. Current: some_variable = some_array. map do |x| x + 1 end Desired: some_variable = some_array. map do |x| x + 1 end