From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#32496: 27.0.50; Strange indentation when ruby-align-chained-calls is t Date: Wed, 22 Aug 2018 15:50:05 +0300 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1534942724 30751 195.159.176.226 (22 Aug 2018 12:58:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2018 12:58:44 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 To: bruce.connor.am@gmail.com, 32496@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 22 14:58:40 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fsSic-0007pw-Ay for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2018 14:58:38 +0200 Original-Received: from localhost ([::1]:58925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsSkg-0001hc-ME for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2018 09:00:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsSkA-00085P-0D for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2018 09:00:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fsSbK-0007Ut-CE for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2018 08:51:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fsSbH-0007Qp-Ss for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2018 08:51:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fsSbG-0000lD-3j for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2018 08:51:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Aug 2018 12:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32496 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32496-submit@debbugs.gnu.org id=B32496.15349422152859 (code B ref 32496); Wed, 22 Aug 2018 12:51:02 +0000 Original-Received: (at 32496) by debbugs.gnu.org; 22 Aug 2018 12:50:15 +0000 Original-Received: from localhost ([127.0.0.1]:57312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fsSaU-0000k2-RJ for submit@debbugs.gnu.org; Wed, 22 Aug 2018 08:50:15 -0400 Original-Received: from mail-lj1-f173.google.com ([209.85.208.173]:35352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fsSaT-0000jn-5E for 32496@debbugs.gnu.org; Wed, 22 Aug 2018 08:50:13 -0400 Original-Received: by mail-lj1-f173.google.com with SMTP id p10-v6so1351147ljg.2 for <32496@debbugs.gnu.org>; Wed, 22 Aug 2018 05:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wrnlfpqauxT8xwrDaHYsMUrS0yB+X+UV7zcP9hm541I=; b=HYNzBH7SE6mFbcx10W3DFDwhG4u91X2GQHyiLhuQNgc4x7xCrNOtXOCUiuJ4UANWVp 5Z2+tRXhatDBFvpk482uHFopW6Lw7HLYOM7v4Dn/jBrhGpFKnhDZSKCNG3h/jLm3/5kF nD9hfsV0KIbVLcCPlhSEQ49/tBRM6GvOgrF7NRKuPk4seGagDm4Ax/mubPvQnMkT2aKc fZyE4EgxVNULyUUrt6CJvU0sxcGb1dtZro94Qh2uL4WQRVI2zqqdq1epfdEWhL7teaA2 RdwX682qzwWxg7y6V4YmfclLfwwmA0t31YkR3wKrAB8ZCj0WtG8ZY2FC+jW8bltEWlvU Lagg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wrnlfpqauxT8xwrDaHYsMUrS0yB+X+UV7zcP9hm541I=; b=bXJi5DVk7pybjLCHxIeu28Nfb1stwHcI0/FsFBjtX2j8O78FNvjrAXE6Gir1zG/HIb yrmfXksTMuRRjqPwdH75OfuPTtscUa9T6gE2NUiQ5EqwbTwg75v0na0rfNMbTIZUZf/L IlvnTcB1sNHaxcDXk/myNTlPtPHDZw0kXRx//hTUtvn8x3OYYrIN9PqVquFmrLHegV0v q8uEKDSS3xoJyQRQufhq6I5ygT1J4yIcJnQufO2Qsz8X7ji8UfRsRvbWmeiwf8HzXJ/B Qqppb9nSFBw+XliWIi7O4/N/vYZXY9nSkW82pYHJ3TjRp4N+mHl900EHNht8PpCZo6gd zVZw== X-Gm-Message-State: APzg51AwRe2nY7QZhR1g4aM3B/GHQnU8fVa20J0qir2G9ApcdeZ06lcS OylOZr7cHy/i3ODBUr+XAxg93rEA X-Google-Smtp-Source: ANB0Vdb9iM96e5zd+/WzZyrPl3p7bucjPN3BryvrqZHzcv+BokHUpULCs/BiqeTKMoPn8YlYglJlNg== X-Received: by 2002:a2e:8652:: with SMTP id i18-v6mr2136730ljj.43.1534942206846; Wed, 22 Aug 2018 05:50:06 -0700 (PDT) Original-Received: from [192.168.1.174] ([178.252.127.223]) by smtp.googlemail.com with ESMTPSA id d13-v6sm298792lfi.74.2018.08.22.05.50.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Aug 2018 05:50:05 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149660 Archived-At: On 8/22/18 2:36 PM, Artur Malabarba wrote: > 1. (setq ruby-align-chained-calls t) > 2. (setq ruby-use-smie t) > 3. Open a file in ruby-mode, insert the following and indent it > > ---------- > some_variable.where.not(x: nil) >              .where(y: 2) > ---------- > > Expected behaviour: Nothing would happen, the code is already properly > indented. > > What actually happens: The code gets indented as follows > > ---------- > some_variable.where.not(x: nil) >                    .where(y: 2) > ---------- > > Note that this is conflicts with the indentation enforced by rubocop. I'd like to point out that this is exactly the behavior Bozhidar asked for, back when this variable was introduced. See: http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01802.html and in particular the Example 1 in the referenced comment: https://github.com/rubocop-hq/ruby-style-guide/pull/176#issuecomment-18664622 So we even have a test (ruby-align-chained-calls) that check that the alignment is do to the last dot, and not to the first one.