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: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens Date: Wed, 18 Dec 2013 05:55:19 +0200 Message-ID: <874n66byoo.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387338972 14285 80.91.229.3 (18 Dec 2013 03:56:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Dec 2013 03:56:12 +0000 (UTC) To: 16182@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 18 04:56:18 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 1Vt8F6-0004B9-5a for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Dec 2013 04:56:16 +0100 Original-Received: from localhost ([::1]:36834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vt8F5-0001LM-ST for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Dec 2013 22:56:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vt8Ey-0001L2-0c for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 22:56:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vt8Es-0002I6-Li for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 22:56:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vt8Es-0002I1-It for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 22:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vt8Es-0003Db-8x for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 22:56: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: Wed, 18 Dec 2013 03:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16182 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138733895212351 (code B ref -1); Wed, 18 Dec 2013 03:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Dec 2013 03:55:52 +0000 Original-Received: from localhost ([127.0.0.1]:56406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vt8Eg-0003D7-0R for submit@debbugs.gnu.org; Tue, 17 Dec 2013 22:55:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50046) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vt8Ec-0003Cs-4B for submit@debbugs.gnu.org; Tue, 17 Dec 2013 22:55:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vt8EW-0002GF-E5 for submit@debbugs.gnu.org; Tue, 17 Dec 2013 22:55:45 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vt8EW-0002G5-9v for submit@debbugs.gnu.org; Tue, 17 Dec 2013 22:55:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vt8EQ-0001Jc-Kk for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 22:55:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vt8EL-0002E7-7Z for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 22:55:34 -0500 Original-Received: from mail-ee0-x22c.google.com ([2a00:1450:4013:c00::22c]:57481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vt8EK-0002DA-VT for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 22:55:29 -0500 Original-Received: by mail-ee0-f44.google.com with SMTP id b57so3228631eek.31 for ; Tue, 17 Dec 2013 19:55:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=STQWnQjevAumLAMIidlqkuFhx6MRERUsSMbFtU4cikI=; b=y80ox/k3y1YZFQpSFIrtiBzlOX57kVj4XOhQtZ3mkvx65Ad8MkwKX0viDNi7FXGTRu ikny0gOsg0NzO0UjMTTa04fjm5CgIWcdgv3RoVL1xpZISLST0F5STcHthHGiHgA/8Fw+ Po6qw4Xbi+f1LC8OqDSpZMdoB0NN0xiF8gnzZsMmUo6g1FW9diInyd00ZxhDT5itYtrV hc9Iy8K5LHMFHnYFLOnHF+rhJQLmr28W5T5vrcyNyG17SRTIPJeWIx/QeliHcKAVYqPb UCL4agTTa9XCZVOlVwGqOvCsDioavsP19lU9s9qai0zE2ltn7XOlNNzIDZES6fKZ8Yvj U9MA== X-Received: by 10.15.76.6 with SMTP id m6mr26589728eey.37.1387338927841; Tue, 17 Dec 2013 19:55:27 -0800 (PST) Original-Received: from axl (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id p45sm58568224eeg.1.2013.12.17.19.55.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 17 Dec 2013 19:55:25 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:82164 Archived-At: Judging by the open source code, it's not overly popular, but there's a definite tendency to align literals in these kind of examples to the beginning of the statement, not to the opening paren that contains them (which is what ruby-mode does now, as long as there is any text after the opening round paren): https://github.com/intridea/grape/blob/master/README.md#basic-usage Status.create!({ user: current_user, text: params[:status] }) https://github.com/intridea/grape/blob/master/lib/grape/endpoint.rb#L79 methods.each do |method| route_set.add_route(self, { path_info: route.route_compiled, request_method: method, }, route_info: route) end The code is the trunk indents the second example like this: methods.each do |method| route_set.add_route(self, { path_info: route.route_compiled, request_method: method, }, route_info: route) end Which is the preferred style? Should ruby-mode support both? The former style looks more compact, but it can also make the arguments following the "de-indented" literal look a bit out of place.