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: Thu, 19 Dec 2013 19:15:45 +0200 Message-ID: <52B329C1.9050602@yandex.ru> References: <874n66byoo.fsf@yandex.ru> <52B11F12.4070109@yandex.ru> <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> <87txe5v4ol.fsf@yandex.ru> <1E72CA8B046B46A6B320EBB9A71FF8CA@gmail.com> <395424D4599947EBA14047DBA9440BB1@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1387473374 648 80.91.229.3 (19 Dec 2013 17:16:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Dec 2013 17:16:14 +0000 (UTC) Cc: Steve Purcell , Adam Sokolnicki To: Bozhidar Batsov , 16182@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 19 18:16:20 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 1VthCr-0000H0-F1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Dec 2013 18:16:17 +0100 Original-Received: from localhost ([::1]:45508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VthCr-00019t-13 for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Dec 2013 12:16:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VthCj-00016R-0s for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2013 12:16:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VthCd-0008N9-6H for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2013 12:16:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VthCd-0008N5-3I for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2013 12:16:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VthCc-0004O6-SF for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2013 12:16: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: Thu, 19 Dec 2013 17:16: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.138747335316833 (code B ref 16182); Thu, 19 Dec 2013 17:16:02 +0000 Original-Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 17:15:53 +0000 Original-Received: from localhost ([127.0.0.1]:58853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VthCT-0004NQ-8M for submit@debbugs.gnu.org; Thu, 19 Dec 2013 12:15:53 -0500 Original-Received: from mail-ea0-f180.google.com ([209.85.215.180]:46263) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VthCQ-0004NH-J7 for 16182@debbugs.gnu.org; Thu, 19 Dec 2013 12:15:51 -0500 Original-Received: by mail-ea0-f180.google.com with SMTP id f15so607487eak.25 for <16182@debbugs.gnu.org>; Thu, 19 Dec 2013 09:15:49 -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=bAQaIp2WkgCz+tcwXbdfvvgnGdONYNkAveBigtGUwvM=; b=ztl64lypSItb2YlWYlWHDwnM69KbY5DaMWBTYPCLMi7kRFv2Em3Lg1kq5qeIDQUsKQ FVaoetbt1R+ZGpipqHipZdURMwdgz0wYbfC313p4j3pZl65dkh0FLNTYQPiR0RUgjjJY fD+BO0GIcFs1nFgQvDM2uLOZnhCIEge1d40uH7pMy/B8mtZZWtZhfIjrbKM4fwZ/sBl/ d8IPH4w1o0GVwmmLbnQx8CjnqzBWemLbEN08Hq3K7IO63n+vHJJuml4takOPfxy9P7jo Nz9DygtBbPxzPJx/GkCu928YJTn4Lm2DWJ1nZFTiV8ySkrUXhZc512nswkJ8rnhi0XXL IWAg== X-Received: by 10.15.110.8 with SMTP id cg8mr988775eeb.42.1387473349865; Thu, 19 Dec 2013 09:15:49 -0800 (PST) Original-Received: from [192.168.0.73] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by mx.google.com with ESMTPSA id z42sm11030378eeo.17.2013.12.19.09.15.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 09:15:48 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <395424D4599947EBA14047DBA9440BB1@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:82230 Archived-At: On 19.12.2013 14:54, Bozhidar Batsov wrote: > I can confirm that your method args indentation fix is working. I did, > however, notice the following problem after I mentioned the > if/unless/case with assignment indentation. Consider the following: > > res = method do |x, y| > something > end > > Might make sense to indent those like: > > res = method do |x, y| > something > end > > for consistency with the if/unless/case indentation by default. It might be more consistent, but I don't see any projects doing that. For example, ActiveRecord, Grape, Goliath and Rack don't. Check out the examples at the top: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/base.rb https://github.com/rack/rack/blob/master/lib/rack/builder.rb It can be an option, though. --- Come to think of it, do you see the "align end to the keyword" style much? I did a grep on my gems directory, and the other style seems to be prevalent, especially among the non-core gems: Pry, RDoc, Minitest, Rubygems, EventMachine, Nokogiri align to keyword. ActiveRecord, ActiveSupport, other Active* gems, Cucumber, Thor, Grape, Excon, WebMock, Faraday align to the beginning of the statement. RSpec uses both. Yard aligns to keyword after "=", but to statement after "||=". Maybe we even should align to the statement by default, because, you know, Rails. > Also: > > res = > method do |x, y| > something > end > > is actually indented like this: > > res = > method do |x, y| > something > end Guess we can special-case this.