From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Date: Sat, 21 Dec 2013 17:31:14 +0200 Message-ID: <52B5B442.3010908@yandex.ru> References: <874n66byoo.fsf@yandex.ru> <52B11F12.4070109@yandex.ru> <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> <87txe5v4ol.fsf@yandex.ru> <1E72CA8B046B46A6B320EBB9A71FF8CA@gmail.com> <395424D4599947EBA14047DBA9440BB1@gmail.com> <52B329C1.9050602@yandex.ru> <52B3D3E6.8060409@yandex.ru> <1174B6D834D54E1C83E139525AB3C6C3@gmail.com> <52B4309D.8060502@yandex.ru> <2B4249DE35244273B9602A8B72DB6C08@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1387639937 19461 80.91.229.3 (21 Dec 2013 15:32:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Dec 2013 15:32:17 +0000 (UTC) Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Doppelt , Adam Sokolnicki To: Bozhidar Batsov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 21 16:32:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VuOXN-0004g6-2f for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Dec 2013 16:32:21 +0100 Original-Received: from localhost ([::1]:54532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuOXM-0008Aj-Nb for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Dec 2013 10:32:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuOXC-00088I-K0 for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2013 10:32:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VuOX5-0002K6-As for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2013 10:32:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VuOX5-0002Jj-6n for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2013 10:32:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VuOX4-0001wC-3M for bug-gnu-emacs@gnu.org; Sat, 21 Dec 2013 10:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2013 15:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16182 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13876398847390 (code B ref 16182); Sat, 21 Dec 2013 15:32:02 +0000 Original-Received: (at 16182) by debbugs.gnu.org; 21 Dec 2013 15:31:24 +0000 Original-Received: from localhost ([127.0.0.1]:33367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuOWR-0001v5-58 for submit@debbugs.gnu.org; Sat, 21 Dec 2013 10:31:23 -0500 Original-Received: from mail-ee0-f50.google.com ([74.125.83.50]:58010) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuOWN-0001ut-5R for 16182@debbugs.gnu.org; Sat, 21 Dec 2013 10:31:19 -0500 Original-Received: by mail-ee0-f50.google.com with SMTP id c41so1606279eek.9 for <16182@debbugs.gnu.org>; Sat, 21 Dec 2013 07:31:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=NwuOG5aKhJmo5nzYwoOVxDuq15dYu9LGrZqKTD0m1Xk=; b=NonBWsPfvdJ0yCQQavK6nrCFCsp2HjafsMf9S0DJ18oFF7joxJBFA7hGI6scuuSwRL xp8y0mrFbNGlZ9TyYulfQvxi6p55EhD1gV54iwlOO1MrCsS7XN41nQXkVsHVVIxoWNVP kK2Z340klBiSSdyLCx0kzof4fGIsCnUwkdvsr95Q57qYjtppxhiI4RaaAGF+BIWT7X4F pBGkVM3hFPFbxXQ1hGP5FZcblnvBTpUOGAnRwwZIEYNnTp+riPPgXgPsqGOW4ZRXUlki jp60kjSAtiZFegZwty1cTE0wsSUpEZ4xazchgRFdNKdEsHllmpByjg4bK5SbpjTfVjnf iY7A== X-Received: by 10.14.194.1 with SMTP id l1mr3274933een.103.1387639878344; Sat, 21 Dec 2013 07:31:18 -0800 (PST) Original-Received: from [192.168.10.2] (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id g47sm28393161eeo.19.2013.12.21.07.31.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 21 Dec 2013 07:31:17 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <2B4249DE35244273B9602A8B72DB6C08@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82329 Archived-At: On 20.12.2013 17:46, Bozhidar Batsov wrote: > On Friday, December 20, 2013 at 1:57 PM, Dmitry Gutov wrote: >> On 20.12.2013 11:51, Bozhidar Batsov wrote: >>> Just a small nitpick - everything that returns a value is actually an >>> expression, not a statement. >> >> It can be both (see "expression statement"). This way it's not >> ambiguous, because I'm really aligning to the statement: the containing >> expression, which follows the bob or an [implicit] semicolon. >> >> In Rubocop, you've chosen to align to just the parent expression. Maybe >> we should find a realistic example where one would be different from the >> other. > I don’t quite understand what you mean. This example is indented just like Robocop master likes with (AlignWith: variable): b = a = if 3 == 4 1 else 2 end puts a puts b Someone correct me if I'm wrong, but I suspect that users who like less indentation would prefer to have the `if' body and closer to be aligned to the beginning of the statement, rather than to `a'. That's what ruby-mode does now if `if' is in `ruby-align-to-stmt-keywords'. Another reason to pick this behavior is that "align to parent" is harder to implement. SMIE has no AST: we can find the position of the parent token (=), but finding the position of `a' will require manual seeking. And `a' could be more than a plan variable: maybe something like `b[a+1]' or `foo[:bar][:qux]`. `=' is also not the only operator we can handle. Aside from its variations (||=, etc), we might want to support `||' and others. And the left side of `||' can be an arbitrary expression.