From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens 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: To: 16182@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.138733895212351 (code B ref -1); Wed, 18 Dec 2013 03:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Dec 2013 03:55:52 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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 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) 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) From: Dmitry Gutov Date: Wed, 18 Dec 2013 05:55:19 +0200 Message-ID: <874n66byoo.fsf@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2013 04:06: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: To: Bozhidar Batsov , Steve Purcell , Adam Sokolnicki Cc: 16182@debbugs.gnu.org Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138733954513447 (code B ref 16182); Wed, 18 Dec 2013 04:06:02 +0000 Received: (at 16182) by debbugs.gnu.org; 18 Dec 2013 04:05:45 +0000 Received: from localhost ([127.0.0.1]:56420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vt8OH-0003Up-B4 for submit@debbugs.gnu.org; Tue, 17 Dec 2013 23:05:45 -0500 Received: from mail-ea0-f177.google.com ([209.85.215.177]:47975) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vt8OE-0003Uf-FJ for 16182@debbugs.gnu.org; Tue, 17 Dec 2013 23:05:43 -0500 Received: by mail-ea0-f177.google.com with SMTP id n15so3276806ead.36 for <16182@debbugs.gnu.org>; Tue, 17 Dec 2013 20:05:41 -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=H22waf15fsDEfvKZu6TCUf/TqMzsgBrOCYcLZcwbgZA=; b=PLDvoz6pc27JS8bslo3qLn4tYEw/zwGcFEwj4B7vApFe5OqTYGJJULpobLa6IuVh+l BryEzQnRQ4P6/beVexl9jqCDlKUEcJ/rfYsou5/+2gM8qiRoeKf4lqP42/T9M4jHWLO7 DsdSHxV3oVZbCFpZUJa3qVc7qb8cZQau1HQKZcyAWN9cR+cdDfw2jxzuFza3Oi4M8w7+ fOfl2nabPw3LSY+I9wR8gnw8HXjErz3Raib0oG5NcOUm+sV2/zH7BFM8q4GZ4TNY1pDV VeCctZVhyRL6GFbPPzxaYEi2MmD40ek0JZeIv4Z4WTELLB58AP+ufy+cnANt7f6hIumj 2Rdg== X-Received: by 10.15.49.193 with SMTP id j41mr26076516eew.10.1387339541723; Tue, 17 Dec 2013 20:05:41 -0800 (PST) Received: from [192.168.10.2] (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id h48sm58625884eev.3.2013.12.17.20.05.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 20:05:40 -0800 (PST) Message-ID: <52B11F12.4070109@yandex.ru> Date: Wed, 18 Dec 2013 06:05:38 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <874n66byoo.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16182 Comments welcome. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2013 10:32:01 +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: To: Dmitry Gutov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138736271822105 (code B ref 16182); Wed, 18 Dec 2013 10:32:01 +0000 Received: (at 16182) by debbugs.gnu.org; 18 Dec 2013 10:31:58 +0000 Received: from localhost ([127.0.0.1]:56601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtEQ2-0005kS-3n for submit@debbugs.gnu.org; Wed, 18 Dec 2013 05:31:58 -0500 Received: from mail-ee0-f51.google.com ([74.125.83.51]:44218) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtEPz-0005kG-Im for 16182@debbugs.gnu.org; Wed, 18 Dec 2013 05:31:56 -0500 Received: by mail-ee0-f51.google.com with SMTP id b15so3442799eek.38 for <16182@debbugs.gnu.org>; Wed, 18 Dec 2013 02:31:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=U0ssV/C2P1YZZ2OhILpT18IUH8LwEAK7KZ2qfSTpnuU=; b=d+vLU1SDh+RT2jwfBODZ9kdhCiwucs/hwGTze15yOrHDvMJ5WaWbi1uAFN9aWNHRin /rwYP677BCuSMslXGZmUyGlHHoUFE1x63nKRJgzRuMABOAqkDnaXlaT5Tel7ZSE/Aubd X90BBOqwVmJ1ryNmiy/U1KDLydsxasFa+fscbXGhHRH8f5m0SlPQ2vkb7a17QArudFNy CG1AsgKT8/4KNsKRVimrEoIE5Wv0b9n+AWqHcaQNBT3WsR3wWFc0MIg2RmRh4hCYWASv SHxRSZa2jf27/K/0eBLdqCb9gG8plVo4MA7kfPnFax24h+Q8pJMML+EXIuUC8po8W4WJ iZPA== X-Received: by 10.14.149.139 with SMTP id x11mr27626186eej.35.1387362714625; Wed, 18 Dec 2013 02:31:54 -0800 (PST) Received: from [192.168.1.28] ([95.87.231.111]) by mx.google.com with ESMTPSA id 4sm61178402eed.14.2013.12.18.02.31.52 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 18 Dec 2013 02:31:53 -0800 (PST) Date: Wed, 18 Dec 2013 12:31:51 +0200 From: Bozhidar Batsov Message-ID: <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> In-Reply-To: <52B11F12.4070109@yandex.ru> References: <874n66byoo.fsf@yandex.ru> <52B11F12.4070109@yandex.ru> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="52b17997_25a70bf7_1c26" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --52b17997_25a70bf7_1c26 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Personally I dislike this style, because you=E2=80=99re basically it obsc= ures the semantics of the method arguments, but I acknowledge that I=E2=80= =99ve seen it the wild. =46or me it would be more beneficial if we suppor= ted a variant of the style: methods.each do =7Cmethod=7C route=5Fset.add=5Froute( self, =7B path=5Fin= fo: route.route=5Fcompiled, request=5Fmethod: method, =7D, route=5Finfo: = route ) end The current trunk indents this all wrong: methods.each do =7Cmethod=7C route=5Fset.add=5Froute( self, =7B path=5Fin= fo: route.route=5Fcompiled, request=5Fmethod: method, =7D, route=5Finfo: = route ) end =20 Something that=E2=80=99s not mentioned here, but it=E2=80=99s a bigger pr= oblem for the users is probably the fact that we don=E2=80=99t support th= e following indentation style: x =3D if something do=5Fsomething end Even if I don=E2=80=99t use and (and the majority of Ruby hackers A=46AIK= ) it=E2=80=99s still fairly popular. Currently this is the only supported= option (which is arguably the most popular): x =3D if something do=5Fsomething end -- =20 Cheers, Bozhidar On Wednesday, December 18, 2013 at 6:05 AM, Dmitry Gutov wrote: > http://debbugs.gnu.org/cgi/bugreport.cgi=3Fbug=3D16182 > =20 > Comments welcome. =20 --52b17997_25a70bf7_1c26 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Personally I dislike this style, because you=E2=80=99re basically= it obscures the semantics of the method arguments, but I acknowledge tha= t I=E2=80=99ve seen it the wild. =46or me it would be more beneficial if = we supported a variant of the style:

methods=
.each do =7Cmethod=7C
  route=5Fset.add=5Froute(
    self, =7B
      path=5Finfo: route.route=5Fcompiled,
      request=5Fmethod: method,
    =7D, route=5Finfo: route
  )
end
The current trunk indents this all wrong:
methods.each do =7Cmethod=7C
  route=5Fset.add=5Froute(
      self, =7B
        path=5Finfo: route.route=5Fcompiled,
        request=5Fmethod: method,
      =7D, route=5Finfo: route
    )
end
Something that=E2=80=99s not mentioned here, but it=E2=80= =99s a bigger problem for the users is probably the fact that we don=E2=80= =99t support the following indentation style:

x =3D if something
  do=5Fsomething
end
=

Even if I don=E2=80=99t use and (and the majori= ty of Ruby hackers A=46AIK) it=E2=80=99s still fairly popular. Currently = this is the only supported option (which is arguably the most popular):

x =3D if something
    &= nbsp; do=5Fsomething
    end

-- 
Cheers,
=
Bozhidar

=20

On Wednesday, December= 18, 2013 at 6:05 AM, Dmitry Gutov wrote:

=20 =20 =20 =20
=20

--52b17997_25a70bf7_1c26-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2013 12:43:01 +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: To: Dmitry Gutov Cc: 16182@debbugs.gnu.org Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13873705558302 (code B ref 16182); Wed, 18 Dec 2013 12:43:01 +0000 Received: (at 16182) by debbugs.gnu.org; 18 Dec 2013 12:42:35 +0000 Received: from localhost ([127.0.0.1]:56672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtGSQ-00029p-4e for submit@debbugs.gnu.org; Wed, 18 Dec 2013 07:42:34 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:49213) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtGSN-00029e-HJ for 16182@debbugs.gnu.org; Wed, 18 Dec 2013 07:42:31 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.DIT.UMontreal.CA (8.14.1/8.14.1) with ESMTP id rBICgS34010863; Wed, 18 Dec 2013 07:42:29 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 3BD06AE129; Wed, 18 Dec 2013 07:42:27 -0500 (EST) From: Stefan Monnier Message-ID: References: <874n66byoo.fsf@yandex.ru> Date: Wed, 18 Dec 2013 07:42:27 -0500 In-Reply-To: <874n66byoo.fsf@yandex.ru> (Dmitry Gutov's message of "Wed, 18 Dec 2013 05:55:19 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4796=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4796> : inlines <334> : streams <1092868> : uri <1627915> X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) > Status.create!({ > user: current_user, > text: params[:status] > }) This looks fine. > 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 But this looks confusing to me. If (as a coder) I wanted to keep the code "not too deeply indented", I'd use something like: methods.each do |method| route_set.add_route( self, { path_info: route.route_compiled, request_method: method, }, route_info: route) end But that's just me (and I haven't checked to see if the current indenter would get this right). Stefan From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: References: <874n66byoo.fsf@yandex.ru> In-Reply-To: <874n66byoo.fsf@yandex.ru> Resent-From: Adam Sokolnicki Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2013 17:58:01 +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: To: 16182@debbugs.gnu.org Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13873894279709 (code B ref 16182); Wed, 18 Dec 2013 17:58:01 +0000 Received: (at 16182) by debbugs.gnu.org; 18 Dec 2013 17:57:07 +0000 Received: from localhost ([127.0.0.1]:57517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtLMp-0002WX-9H for submit@debbugs.gnu.org; Wed, 18 Dec 2013 12:57:07 -0500 Received: from mail-ob0-f170.google.com ([209.85.214.170]:55599) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtLMn-0002WP-B8 for 16182@debbugs.gnu.org; Wed, 18 Dec 2013 12:57:05 -0500 Received: by mail-ob0-f170.google.com with SMTP id wp18so8304677obc.1 for <16182@debbugs.gnu.org>; Wed, 18 Dec 2013 09:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2iVGtXPigYxyC+qtCZypcwlBQuguFfH8fK6OkgF89nY=; b=NnW/cpeGEvVyMzdd/hrzwujKqoifLgH5/NDyFJDPKUd+PUbglDmfgLlqZQ/fyY5OF1 1Ipur9cy5WEHe2KeT9QgTRMb/Yqanfd4a3JdAO5NoIxYIKzwbDpjpsi8RuamIniqn+ie bX5PHCcJ3Ulnm6JroQwqNkRo3v98Z0ETPCoa0hFOEiwa9G03HybtzqT4AhG6YP7rZfTr olpDSUn4zb3Z29iC2zOkYb/xbEEF1wY0Ms3vZcEBLlSO9nYjNBEyWL+BAVkzAuTDuAXI MSZq8PXqdqwE7UqAyC4BbBH/yiinZEoL7Y4MdonWsjF2qIznCeXGtTtfhMpMOwnK2LKN FDBA== MIME-Version: 1.0 X-Received: by 10.182.29.33 with SMTP id g1mr16513447obh.59.1387389424222; Wed, 18 Dec 2013 09:57:04 -0800 (PST) Received: by 10.182.105.200 with HTTP; Wed, 18 Dec 2013 09:57:04 -0800 (PST) Date: Wed, 18 Dec 2013 18:57:04 +0100 Message-ID: From: Adam Sokolnicki Content-Type: multipart/alternative; boundary=001a11c2b8b2cbc8a704edd2c508 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Personally I like the alignment to the beginning of the statement rather to the open paren. When I'm breaking line on argument list it's because the line is too long. With indentation to the opened paren the line stays long despite breaking the line. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (adam.sokolnicki[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.170 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Personally I like the alignment to the beginning of the statement rather to the open paren. When I'm breaking line on argument list it's because the line is too long. With indentation to the opened paren the line stays long despite breaking the line. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.170 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (adam.sokolnicki[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid --001a11c2b8b2cbc8a704edd2c508 Content-Type: text/plain; charset=ISO-8859-1 Personally I like the alignment to the beginning of the statement rather to the open paren. When I'm breaking line on argument list it's because the line is too long. With indentation to the opened paren the line stays long despite breaking the line. I think this is how vim indents ruby code by default. I you ask me emacs can only support the indentation to the beginning of the statement. --001a11c2b8b2cbc8a704edd2c508 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Personally I like the alignment to the beginning of the st= atement rather to the open paren. When I'm breaking line on argument li= st it's because the line is too long. With indentation to the opened pa= ren the line stays long despite breaking the line.

I think this is how vim indents ruby code by default.
<= div>
I you ask me emacs can only support the indentation to t= he beginning of the statement.
--001a11c2b8b2cbc8a704edd2c508-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 04:36:01 +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: To: Bozhidar Batsov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138742773614666 (code B ref 16182); Thu, 19 Dec 2013 04:36:01 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 04:35:36 +0000 Received: from localhost ([127.0.0.1]:58061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtVKi-0003oU-9r for submit@debbugs.gnu.org; Wed, 18 Dec 2013 23:35:36 -0500 Received: from mail-ea0-f171.google.com ([209.85.215.171]:64790) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtVKf-0003oK-SQ for 16182@debbugs.gnu.org; Wed, 18 Dec 2013 23:35:34 -0500 Received: by mail-ea0-f171.google.com with SMTP id h10so205476eak.16 for <16182@debbugs.gnu.org>; Wed, 18 Dec 2013 20:35:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=NF7YLpy+F40ZuVIuLP7LrmkV6pbA9QEMiOp1pWbmmq8=; b=Y1R3ulc0wDgf6eDdtImfL9xqciOsWH+TmBNeOcJUao/ca4zumX5C1N5SXJE+ZNPAI+ C4rvrzRioW0t8NbtNsv3Yh9GEVBLIp+ksRj2wvuvOmzKOeO1H24FstW4WPorou79BJan bbw6Jl7GH4GbsJnUX+LPKpZZIo/5JSwR3sE0+QkhfOajZYft32J+CABDwjqiDzjNKAoN evyQHnBkbx/N3Vw9EhAJb5Usgy5nVbvU1zlNrSbp53JQ3l2Od8V4Jaoxbr+aF8qqefnb CFKeFemmdWYulQLnhYKYQ0oY1VE4GEadq/cayfM+sqwB5/KLwnkt0+LYmMoX/31Jq7Cc W6sQ== X-Received: by 10.15.22.137 with SMTP id f9mr23739929eeu.30.1387427733078; Wed, 18 Dec 2013 20:35:33 -0800 (PST) Received: from axl (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id p45sm5822983eeg.1.2013.12.18.20.35.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Dec 2013 20:35:30 -0800 (PST) From: Dmitry Gutov References: <874n66byoo.fsf@yandex.ru> <52B11F12.4070109@yandex.ru> <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> Date: Thu, 19 Dec 2013 06:35:22 +0200 In-Reply-To: <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> (Bozhidar Batsov's message of "Wed, 18 Dec 2013 12:31:51 +0200") Message-ID: <87txe5v4ol.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Bozhidar Batsov writes: > Personally I dislike this style, because you=E2=80=99re basically it obsc= ures > the semantics of the method arguments, but I acknowledge that I=E2=80=99ve > seen it the wild. Ok, that's a -1, then. > For me it would be more beneficial if we supported a > variant of the style: > > methods.each do |method| > route_set.add_route( > self, { > path_info: route.route_compiled, > request_method: method, > }, route_info: route > ) > end Should work now, with revision 115602. > Something that=E2=80=99s not mentioned here, but it=E2=80=99s a bigger pr= oblem for the > users is probably the fact that we don=E2=80=99t support the following > indentation style: > > x =3D if something > do_something > end > > Even if I don=E2=80=99t use and (and the majority of Ruby hackers AFAIK) = it=E2=80=99s > still fairly popular. It's actually easy to do now, but the old engine doesn't support that either. That should be takes as evidence that Emacs Rubyists don't care about this variant much (I didn't see it in feature requests either). So I'd rather wait for a request from someone who actually would use it. If you'd like to add it now, please propose the name of the user option. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 04:50: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: To: Adam Sokolnicki Cc: 16182@debbugs.gnu.org Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138742854316185 (code B ref 16182); Thu, 19 Dec 2013 04:50:02 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 04:49:03 +0000 Received: from localhost ([127.0.0.1]:58078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtVXi-0004Cy-Ri for submit@debbugs.gnu.org; Wed, 18 Dec 2013 23:49:03 -0500 Received: from mail-ea0-f179.google.com ([209.85.215.179]:56669) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtVXg-0004CW-3n for 16182@debbugs.gnu.org; Wed, 18 Dec 2013 23:49:00 -0500 Received: by mail-ea0-f179.google.com with SMTP id r15so212622ead.10 for <16182@debbugs.gnu.org>; Wed, 18 Dec 2013 20:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=12eQH7DxInhifX487hdd3tg3ctmuxvmfrK8GBug62KM=; b=YXxumKyAJmWVUp5u3JNURbc00UQeJgKs++uxMZ+EtVc1s7I/gfzq36OnNK9+s3ACNO p3xQ1mu5F7PMzUDXxWFsNSUn0SxH8xyt93IUDlOiuDyG14iV5PQf/f4eoh3tXk6E4T/A AJAPV6E9nxyB5EKY2xC7feE79ixzYGqyYPpmBa0JLsy90wXNBJaN4DbxyxG5tirbTmcS V7d2GVgnjD0JO3mZgWCcN7rayPSeSJjLM6K+2+YhZB816QTbjWiDmLaH0+pd/lpecLOH z46Vr8V6WRbrUGpGHgLQvhuf86TkHgfLV9SFcslBgpH3PiS+ov9zTT0tqQUgUAfu50H7 AWJA== X-Received: by 10.15.82.8 with SMTP id z8mr33339213eey.25.1387428539336; Wed, 18 Dec 2013 20:48:59 -0800 (PST) Received: from axl (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id a45sm5875196eem.6.2013.12.18.20.48.57 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Dec 2013 20:48:58 -0800 (PST) From: Dmitry Gutov References: <874n66byoo.fsf@yandex.ru> Date: Thu, 19 Dec 2013 06:48:55 +0200 In-Reply-To: (Adam Sokolnicki's message of "Wed, 18 Dec 2013 18:57:04 +0100") Message-ID: <87r499v420.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Adam Sokolnicki writes: > Personally I like the alignment to the beginning of the statement > rather to the open paren. Let's count this as +1. > When I'm breaking line on argument list it's > because the line is too long. With indentation to the opened paren the > line stays long despite breaking the line. Like Stefan suggests, if the opened paren is immediately followed by a newline, the arguments will be indented less (but still indented by additional two columns, compared to the beginning of the statement). > I think this is how vim indents ruby code by default. If that's true, could you point to: * Some other open source project or two using this style. * Some tutorial or step-by-step instruction for me to test this indentation in Vim. Do I need to install anything apart from the base distribution? Suppose I have the snippet of code typed out. What do I press next? > I you ask me emacs can only support the indentation to the beginning > of the statement. I don't think it's sufficient, by itself. Take this example: current_user.statuses.find(params[:id]).update({ user: current_user, text: params[:status] }) Suppose `update' accepted a second argument, and we wanted to pass it here, on the next line after the hash. Which column would it be indented to? 0? From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 04:58: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: To: Stefan Monnier Cc: 16182@debbugs.gnu.org Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138742905817091 (code B ref 16182); Thu, 19 Dec 2013 04:58:02 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 04:57:38 +0000 Received: from localhost ([127.0.0.1]:58084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtVg1-0004Ra-Vv for submit@debbugs.gnu.org; Wed, 18 Dec 2013 23:57:38 -0500 Received: from mail-ea0-f174.google.com ([209.85.215.174]:45760) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtVfz-0004RO-I9 for 16182@debbugs.gnu.org; Wed, 18 Dec 2013 23:57:36 -0500 Received: by mail-ea0-f174.google.com with SMTP id b10so211166eae.19 for <16182@debbugs.gnu.org>; Wed, 18 Dec 2013 20:57:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=0qEcgZMo8SMVralgDLBfm/sXfWBWZ9Ap2o1qgk5hMXU=; b=fxNpHnbu0SZolBRaIzudJeo/kuXgmR9KYfAvRx+tuJ6SOBVPodyVhA51IS4JGM95hB aoBk8T3UXDxssL8fhP7/CeEmC2RwRasllczhPPQ0ozgfQrjEZJgIQxDAIOLXcn3dyWnN 0AHzMafrSmelZlgVBLfYEz9frbnA+YH2yN3PmMuR1H//Bm5KTQoqoS0yfD5dyJ9zD+87 lOVtAi0TSM0OScN/9rxVOSaAPkgNUbegSoB+nxPVOxmvbadGj1MvC8BS7cT5YKnPAxlx RkTPgtqrxECAzsX49HZK9nTP9t2s0BjgOD+T60DIK0gAGN+xjRXcvM4NXWmDOlYbbT4H AAGA== X-Received: by 10.14.182.199 with SMTP id o47mr32895591eem.7.1387429054344; Wed, 18 Dec 2013 20:57:34 -0800 (PST) Received: from axl (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id b41sm5877780eef.16.2013.12.18.20.57.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Dec 2013 20:57:33 -0800 (PST) From: Dmitry Gutov References: <874n66byoo.fsf@yandex.ru> Date: Thu, 19 Dec 2013 06:57:29 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 18 Dec 2013 07:42:27 -0500") Message-ID: <87ob4dv3nq.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefan Monnier writes: >> Status.create!({ >> user: current_user, >> text: params[:status] >> }) > > This looks fine. This is not hard to support (add some `skip-syntax-forward' before the relevant `smie-indent--hanging-p' call), but does it make sense to indent this call one way, and when the first argument does not start with a hanging paren (like `self', in the example below), do it differently? >> methods.each do |method| >> route_set.add_route(self, { >> path_info: route.route_compiled, >> request_method: method, >> }, route_info: route) >> end > But this looks confusing to me. If (as a coder) I wanted to keep the > code "not too deeply indented", I'd use something like: > > methods.each do |method| > route_set.add_route( > self, > { path_info: route.route_compiled, > request_method: method, }, > route_info: route) > end I agree it makes sense, but this change could be not entirely obvious to users not familiar with Emacs indentation engines. > But that's just me (and I haven't checked to see if the current > indenter would get this right). It does now. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 09:09:01 +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: To: 16182@debbugs.gnu.org Cc: Steve Purcell , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138744408518408 (code B ref 16182); Thu, 19 Dec 2013 09:09:01 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 09:08:05 +0000 Received: from localhost ([127.0.0.1]:58200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtZaP-0004mp-8a for submit@debbugs.gnu.org; Thu, 19 Dec 2013 04:08:05 -0500 Received: from mail-ee0-f48.google.com ([74.125.83.48]:64094) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtZaM-0004mO-AF for 16182@debbugs.gnu.org; Thu, 19 Dec 2013 04:08:03 -0500 Received: by mail-ee0-f48.google.com with SMTP id e49so318426eek.7 for <16182@debbugs.gnu.org>; Thu, 19 Dec 2013 01:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=Tdxsi2NOyWtXjsjdi7O1i4M9Vg4AO8g7cQs+unnmpGg=; b=wGDHYV1jMx3WVLAu14gQdp95wzftWlXgcBRGSpXEiZ2YRcYJpcJQ8nxceLzo3qP613 ukc6xvp4gTe/6vEQ7m4v3BuSWCzHHVsZuZmi5jv9LKIByq5+T9PH6L9g5xV1WNNCBdNP wd4dW45XtKnwCHgUW0IsIOBC0I/E9ZIbztYur6oX8J9cfqtDhwOP8JFm6e9kD17XvpV7 NjDh5uBDLC1yxhEYc9WtU/Dfi/vbB9Ig8sfjhe6VxO5lu7QovSxOmzQvHHyc0F+8ZhFd U7HlcszwcJMDr4x2umb0r1yzJzq5LZa9/+KzayR9Y2qiDByBf4+sRqohtJFKvSuqIOF2 gEvg== X-Received: by 10.15.73.134 with SMTP id h6mr547752eey.90.1387444081564; Thu, 19 Dec 2013 01:08:01 -0800 (PST) Received: from [10.0.1.3] (93-152-182-45.ddns.onlinedirect.bg. [93.152.182.45]) by mx.google.com with ESMTPSA id p45sm7572593eeg.1.2013.12.19.01.07.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Dec 2013 01:08:00 -0800 (PST) Date: Thu, 19 Dec 2013 11:08:55 +0200 From: Bozhidar Batsov Message-ID: <1E72CA8B046B46A6B320EBB9A71FF8CA@gmail.com> In-Reply-To: <87txe5v4ol.fsf@yandex.ru> References: <874n66byoo.fsf@yandex.ru> <52B11F12.4070109@yandex.ru> <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> <87txe5v4ol.fsf@yandex.ru> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="52b2b7a7_2e22fbb7_206" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --52b2b7a7_2e22fbb7_206 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday, December 19, 2013 at 6:35 AM, Dmitry Gutov wrote: > Bozhidar Batsov = writes: > =20 > > Personally I dislike this style, because you=E2=80=99re basically it = obscures > > the semantics of the method arguments, but I acknowledge that I=E2=80= =99ve > > seen it the wild. > > =20 > =20 > =20 > Ok, that's a -1, then. > =20 > > =46or me it would be more beneficial if we supported a > > variant of the style: > > =20 > > methods.each do =7Cmethod=7C > > route=5Fset.add=5Froute( > > self, =7B > > path=5Finfo: route.route=5Fcompiled, > > request=5Fmethod: method, > > =7D, route=5Finfo: route > > ) > > end > > =20 > =20 > =20 > Should work now, with revision 115602. > =20 > > Something that=E2=80=99s not mentioned here, but it=E2=80=99s a bigge= r problem for the > > users is probably the fact that we don=E2=80=99t support the followin= g > > indentation style: > > =20 > > x =3D if something > > do=5Fsomething > > end > > =20 > > Even if I don=E2=80=99t use and (and the majority of Ruby hackers A=46= AIK) it=E2=80=99s > > still fairly popular. > > =20 > =20 > =20 > It's actually easy to do now, but the old engine doesn't support that > either. That should be takes as evidence that Emacs Rubyists don't care= > about this variant much (I didn't see it in feature requests either). > =20 > So I'd rather wait for a request from someone who actually would use it= . > If you'd like to add it now, please propose the name of the user option= . > =20 > =20 I recall seeing StackOverflow questions about this in Emacs, but as I nei= ther practice nor promote this style I=E2=80=99m indifferent to supportin= g it in Emacs. I do, however, support it in RuboCop (https://github.com/b= batsov/rubocop/issues/661). If we decide to have it in Emacs we might use= a similar name for the config variable - =60ruby-end-alignment=E2=80=99 = with two options - =E2=80=98keword and =E2=80=98assignment. =20 --52b2b7a7_2e22fbb7_206 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On Th= ursday, December 19, 2013 at 6:35 AM, Dmitry Gutov wrote:
Bozhidar Batsov <bozhidar=40batsov.com> writes:

Personally I dis= like this style, because you=E2=80=99re basically it obscures
t= he semantics of the method arguments, but I acknowledge that I=E2=80=99ve=
seen it the wild.

= Ok, that's a -1, then.

=
=46or me it would be more beneficial if we supported a
variant of the style:

methods.each do =7Cmetho= d=7C
route=5Fset.add=5Froute(
self, =7B
path=5Finfo: route.route=5Fcompiled,
request=5Fm= ethod: method,
=7D, route=5Finfo: route
)
=
end

Should work now, wit= h revision 115602.

Something that=E2=80=99s not mentioned here, but it=E2=80=99s a big= ger problem for the
users is probably the fact that we don=E2=80= =99t support the following
indentation style:

x =3D if something
do=5Fsomething
end

Even if I don=E2=80=99t use and (and the majority of Ru= by hackers A=46AIK) it=E2=80=99s
still fairly popular.

It's actually easy to do now, but the= old engine doesn't support that
either. That should be takes a= s evidence that Emacs Rubyists don't care
about this variant mu= ch (I didn't see it in feature requests either).

So I'd rather wait for a request from someone who actually would use it.=
If you'd like to add it now, please propose the name of the us= er option.
=20 =20 =20 =20 =20
I recall seeing StackOverflow questions about th= is in Emacs, but as I neither practice nor promote this style I=E2=80=99m= indifferent to supporting it in Emacs. I do, however, support it in Rubo= Cop (https://github.com/bbatsov/rubocop/issues/= 661). If we decide to have it in Emacs we might use a similar name fo= r the config variable - =60ruby-end-alignment=E2=80=99 with two options -= =E2=80=98keword and =E2=80=98assignment.  

--52b2b7a7_2e22fbb7_206-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 12:56: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: To: 16182@debbugs.gnu.org, Gutov Dmitry Cc: Steve Purcell , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138745770618184 (code B ref 16182); Thu, 19 Dec 2013 12:56:02 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 12:55:06 +0000 Received: from localhost ([127.0.0.1]:58308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtd85-0004jA-BD for submit@debbugs.gnu.org; Thu, 19 Dec 2013 07:55:06 -0500 Received: from mail-ea0-f171.google.com ([209.85.215.171]:34793) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtd81-0004ih-4d for 16182@debbugs.gnu.org; Thu, 19 Dec 2013 07:55:02 -0500 Received: by mail-ea0-f171.google.com with SMTP id h10so456267eak.2 for <16182@debbugs.gnu.org>; Thu, 19 Dec 2013 04:55:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=6WYUNdAEfXpqcHSaex6a76R3cz7iwS3u4GP2HzZSIR4=; b=zjJbQHS33IPU6h0bTkg8CFav0NBTNQLfblhROyHgm4VjhU9TOt1YQ0j9xUnUYOES3V 4J6fEOdX5cQKdljPpx3hHt44QBw4JB11BkX0b/odxgqM9n7E2+/r2F2IwPjKg263MOWF mPffuejR1y9L1q4rFUgNncpROVUCyZlxDOdEjmiy+HzdiNNI/Nv2COu3xsja4afVz1JB O88jY/XbAH5B8U3ww+WLxqmuMfWbQZpTB8OkR9SdJ3/Ds4asnLcXpe1b4nXgEhyO1NAU ZvkRrSCFlX8wXj1UlRMMbYT1KTW1kNxyrQYB6npziaI5iIjX1vHTO0XCN5fKONchxTm1 9Feg== X-Received: by 10.14.150.5 with SMTP id y5mr295370eej.73.1387457699984; Thu, 19 Dec 2013 04:54:59 -0800 (PST) Received: from [192.168.1.28] ([95.87.231.111]) by mx.google.com with ESMTPSA id g47sm9130064eeo.19.2013.12.19.04.54.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Dec 2013 04:54:58 -0800 (PST) Date: Thu, 19 Dec 2013 14:54:56 +0200 From: Bozhidar Batsov Message-ID: <395424D4599947EBA14047DBA9440BB1@gmail.com> In-Reply-To: <1E72CA8B046B46A6B320EBB9A71FF8CA@gmail.com> References: <874n66byoo.fsf@yandex.ru> <52B11F12.4070109@yandex.ru> <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> <87txe5v4ol.fsf@yandex.ru> <1E72CA8B046B46A6B320EBB9A71FF8CA@gmail.com> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="52b2eca0_3f06ecb2_1c26" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --52b2eca0_3f06ecb2_1c26 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I can confirm that your method args indentation fix is working. I did, ho= wever, notice the following problem after I mentioned the if/unless/case = with assignment indentation. Consider the following: res =3D method do =7Cx, y=7C something end Might make sense to indent those like: res =3D method do =7Cx, y=7C something end for consistency with the if/unless/case indentation by default. Also: res =3D method do =7Cx, y=7C something end is actually indented like this: res =3D method do =7Cx, y=7C something end -- =20 Cheers, Bozhidar On Thursday, December 19, 2013 at 11:08 AM, Bozhidar Batsov wrote: > On Thursday, December 19, 2013 at 6:35 AM, Dmitry Gutov wrote: > > Bozhidar Batsov writes: > > =20 > > > Personally I dislike this style, because you=E2=80=99re basically i= t obscures > > > the semantics of the method arguments, but I acknowledge that I=E2=80= =99ve > > > seen it the wild. > > > =20 > > =20 > > =20 > > Ok, that's a -1, then. > > =20 > > > =46or me it would be more beneficial if we supported a > > > variant of the style: > > > =20 > > > methods.each do =7Cmethod=7C > > > route=5Fset.add=5Froute( > > > self, =7B > > > path=5Finfo: route.route=5Fcompiled, > > > request=5Fmethod: method, > > > =7D, route=5Finfo: route > > > ) > > > end > > > =20 > > =20 > > =20 > > Should work now, with revision 115602. > > =20 > > > Something that=E2=80=99s not mentioned here, but it=E2=80=99s a big= ger problem for the > > > users is probably the fact that we don=E2=80=99t support the follow= ing > > > indentation style: > > > =20 > > > x =3D if something > > > do=5Fsomething > > > end > > > =20 > > > Even if I don=E2=80=99t use and (and the majority of Ruby hackers A= =46AIK) it=E2=80=99s > > > still fairly popular. > > > =20 > > =20 > > =20 > > It's actually easy to do now, but the old engine doesn't support that= > > either. That should be takes as evidence that Emacs Rubyists don't ca= re > > about this variant much (I didn't see it in feature requests either).= > > =20 > > So I'd rather wait for a request from someone who actually would use = it. > > If you'd like to add it now, please propose the name of the user opti= on. > > =20 > > =20 > > =20 > =20 > I recall seeing StackOverflow questions about this in Emacs, but as I n= either practice nor promote this style I=E2=80=99m indifferent to support= ing it in Emacs. I do, however, support it in RuboCop (https://github.com= /bbatsov/rubocop/issues/661). If we decide to have it in Emacs we might u= se a similar name for the config variable - =60ruby-end-alignment=E2=80=99= with two options - =E2=80=98keword and =E2=80=98assignment. =20 > =20 --52b2eca0_3f06ecb2_1c26 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
I can confirm that yo= ur method args indentation fix is working. I did, however, notice the fol= lowing problem after I mentioned the if/unless/case with assignment inden= tation. Consider the following:

res =3D method do =7Cx, y=7C
  something
end

Might make sense to indent those like:
=

res =3D m= ethod do =7Cx, y=7C
           so= mething
         end
<= br>
for consistency= with the if/unless/case indentation by default. Also:
<= font face=3D=22Trebuchet MS=22>
res =3D
  method do =7Cx, y=7C
    something
  end

is actually indented like this:

res =3D
  method do =7C= x, y=7C
  something
end

-- 
Cheers,
Bozhidar

=
=20

On Thursday, December = 19, 2013 at 11:08 AM, Bozhidar Batsov wrote:

On Th= ursday, December 19, 2013 at 6:35 AM, Dmitry Gutov wrote:
Bozhidar Batsov <bozhidar=40batsov.com> writes:

Personally I dis= like this style, because you=E2=80=99re basically it obscures
t= he semantics of the method arguments, but I acknowledge that I=E2=80=99ve=
seen it the wild.

= Ok, that's a -1, then.

=
=46or me it would be more beneficial if we supported a
variant of the style:

methods.each do =7Cmetho= d=7C
route=5Fset.add=5Froute(
self, =7B
path=5Finfo: route.route=5Fcompiled,
request=5Fm= ethod: method,
=7D, route=5Finfo: route
)
=
end

Should work now, wit= h revision 115602.

Something that=E2=80=99s not mentioned here, but it=E2=80=99s a big= ger problem for the
users is probably the fact that we don=E2=80= =99t support the following
indentation style:

x =3D if something
do=5Fsomething
end

Even if I don=E2=80=99t use and (and the majority of Ru= by hackers A=46AIK) it=E2=80=99s
still fairly popular.

It's actually easy to do now, but the= old engine doesn't support that
either. That should be takes a= s evidence that Emacs Rubyists don't care
about this variant mu= ch (I didn't see it in feature requests either).

So I'd rather wait for a request from someone who actually would use it.=
If you'd like to add it now, please propose the name of the us= er option.
=20 =20 =20 =20
I recall seeing StackOverflow questions about th= is in Emacs, but as I neither practice nor promote this style I=E2=80=99m= indifferent to supporting it in Emacs. I do, however, support it in Rubo= Cop (https://github.com/bbatsov/rubocop/issues/= 661). If we decide to have it in Emacs we might use a similar name fo= r the config variable - =60ruby-end-alignment=E2=80=99 with two options -= =E2=80=98keword and =E2=80=98assignment.  

=20 =20 =20 =20 =20

--52b2eca0_3f06ecb2_1c26-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 13:48: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: To: Dmitry Gutov Cc: 16182@debbugs.gnu.org Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138746085024638 (code B ref 16182); Thu, 19 Dec 2013 13:48:02 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 13:47:30 +0000 Received: from localhost ([127.0.0.1]:58359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtdwn-0006PK-U6 for submit@debbugs.gnu.org; Thu, 19 Dec 2013 08:47:30 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:59636) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtdwl-0006P3-O9 for 16182@debbugs.gnu.org; Thu, 19 Dec 2013 08:47:28 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id rBJDlPZm009986; Thu, 19 Dec 2013 08:47:26 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 8D25DAE6B6; Thu, 19 Dec 2013 08:47:26 -0500 (EST) From: Stefan Monnier Message-ID: References: <874n66byoo.fsf@yandex.ru> <87ob4dv3nq.fsf@yandex.ru> Date: Thu, 19 Dec 2013 08:47:26 -0500 In-Reply-To: <87ob4dv3nq.fsf@yandex.ru> (Dmitry Gutov's message of "Thu, 19 Dec 2013 06:57:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4797=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4797> : inlines <336> : streams <1093430> : uri <1629184> X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) > I agree it makes sense, but this change could be not entirely obvious to > users not familiar with Emacs indentation engines. I didn't get this indentation from SMIE. I wrote SMIE to understand this style of indentation. AFAIK this style of indentation is 100% standard, especially for open braces in C/C++/... Stefan From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 13:48:03 +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: To: Bozhidar Batsov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138746085424660 (code B ref 16182); Thu, 19 Dec 2013 13:48:03 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 13:47:34 +0000 Received: from localhost ([127.0.0.1]:58362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtdws-0006Pg-7X for submit@debbugs.gnu.org; Thu, 19 Dec 2013 08:47:34 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:52639) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtdwo-0006PI-1q for 16182@debbugs.gnu.org; Thu, 19 Dec 2013 08:47:30 -0500 Received: by mail-ee0-f45.google.com with SMTP id d49so478364eek.18 for <16182@debbugs.gnu.org>; Thu, 19 Dec 2013 05:47:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=DrWBEeH6xXUvc8GA9gwIPy5HSPcxBQ6TqYGo0QCq7gg=; b=qdcyYuZzImsuf+zv+NeOnR8UUruMQkwwQjVQaUE3xJaoqSjOzMIAib52669f/gFmtc aikiWMRf0FhQ8lFoL1rtTVRNdlzlO9QsRlT+c32tOYOnZWNKxhzHRrfSKPeJaCuFip89 hfvm9e4w0ha4rZU+rVK+zXWB8hhuhyAd/7ImfxW0V71Xwd8Ee0r/Fevt9SoyfruXSU7L RI59GBtEdV0GxpImKNQD8G1nxc4CB96hINnHIJrN3cobgjJjq7MjvohFcfmy2DVpaDu5 ffx9fRadaDc8iJRWLTTxSv2ZCeLl+ALxf20gYN5U8TSM22kLA0DvV+TpACnu7T9EFeUw 1kHg== X-Received: by 10.15.64.4 with SMTP id n4mr566935eex.99.1387460849120; Thu, 19 Dec 2013 05:47:29 -0800 (PST) Received: from axl (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id j46sm9509826eew.18.2013.12.19.05.47.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Dec 2013 05:47:28 -0800 (PST) From: Dmitry Gutov References: <874n66byoo.fsf@yandex.ru> <52B11F12.4070109@yandex.ru> <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> <87txe5v4ol.fsf@yandex.ru> <1E72CA8B046B46A6B320EBB9A71FF8CA@gmail.com> Date: Thu, 19 Dec 2013 15:47:20 +0200 In-Reply-To: <1E72CA8B046B46A6B320EBB9A71FF8CA@gmail.com> (Bozhidar Batsov's message of "Thu, 19 Dec 2013 11:08:55 +0200") Message-ID: <871u19lzpz.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Bozhidar Batsov writes: > I recall seeing StackOverflow questions about this in Emacs, but as I > neither practice nor promote this style I=E2=80=99m indifferent to suppor= ting > it in Emacs. I do, however, support it in RuboCop > (https://github.com/bbatsov/rubocop/issues/661). If we decide to have > it in Emacs we might use a similar name for the config variable - > `ruby-end-alignment=E2=80=99 with two options - =E2=80=98keword and =E2= =80=98assignment. I like this direction, but since there are only two choices, it should probably be a boolean variable. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) 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: To: Bozhidar Batsov , 16182@debbugs.gnu.org Cc: Steve Purcell , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138747335316833 (code B ref 16182); Thu, 19 Dec 2013 17:16:02 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 17:15:53 +0000 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 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 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) 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) Message-ID: <52B329C1.9050602@yandex.ru> Date: Thu, 19 Dec 2013 19:15:45 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <874n66byoo.fsf@yandex.ru> <52B11F12.4070109@yandex.ru> <490C2BFA3C624DB6AB057CD2AA393D9C@gmail.com> <87txe5v4ol.fsf@yandex.ru> <1E72CA8B046B46A6B320EBB9A71FF8CA@gmail.com> <395424D4599947EBA14047DBA9440BB1@gmail.com> In-Reply-To: <395424D4599947EBA14047DBA9440BB1@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: References: <874n66byoo.fsf@yandex.ru> In-Reply-To: <874n66byoo.fsf@yandex.ru> Resent-From: Adam Doppelt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 18:42:01 +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: To: 16182@debbugs.gnu.org Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138747849527238 (code B ref 16182); Thu, 19 Dec 2013 18:42:01 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 18:41:35 +0000 Received: from localhost ([127.0.0.1]:58928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtiXN-00075D-Fh for submit@debbugs.gnu.org; Thu, 19 Dec 2013 13:41:33 -0500 Received: from mail-ie0-f170.google.com ([209.85.223.170]:33088) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtiVc-00071b-EV for 16182@debbugs.gnu.org; Thu, 19 Dec 2013 13:39:44 -0500 Received: by mail-ie0-f170.google.com with SMTP id qd12so1881752ieb.15 for <16182@debbugs.gnu.org>; Thu, 19 Dec 2013 10:39:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=JECujTJwXaMYAYyXiGkRsIzgW3f9tHCSMvjHTh5VyWU=; b=IoZihBJFJFhtaDMRHpN1pjT+N0lkHX46hKnZ+8R4RnTvcif/DqC6hsrAZ5vEqtAVbv nekrgwgE0wG66Ng2tnNBIvJx+lOcvQj3HWapaLtBNvELpCTEblLw5C+lM5Sid8ueCpZh 8B+Xk5/44Pu/L8+/lieJif1TM4ON/t5aFuUqM69TiGc1UcYb8f4dRB5eEYEkcxUsMbgL +c2zwlZmb/QrW9Z8ii/L3DiWkgle1CZa2aeYTKDBVrebga1a0OSlAdUk5c6UyrEOiRlG hk/oZljwc2sIc0iR96BvsDPk6oip4WEJ66peSeehYhRkR6IPvObLHRiI4m6GDMgXpbrp t6Vw== X-Gm-Message-State: ALoCoQklzIxvEw1PjpRy0XPWV8xWjhVDvzJhWBBT5vIrRfYBVM+SE8Y43EmT9Ff+um0WDU8Q+PTZ MIME-Version: 1.0 X-Received: by 10.43.182.74 with SMTP id pl10mr1942415icc.70.1387478383603; Thu, 19 Dec 2013 10:39:43 -0800 (PST) Received: by 10.64.225.205 with HTTP; Thu, 19 Dec 2013 10:39:43 -0800 (PST) Date: Thu, 19 Dec 2013 10:39:43 -0800 Message-ID: From: Adam Doppelt Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Thu, 19 Dec 2013 13:41:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Coincidentally, I mailed Dmitry about this very issue today! He encouraged me to chime in on the bug. In my neck of the woods it's common to indent to the beginning of the statement: x = if y y + 1 end x = list.each do |i| i end x = case y when 1 then 2 end @x ||= begin expensive_operation ... end CONSTANT = begin expensive_operation ... end I patched my personal ruby-mode to default to this indenting. Incidentally, as the resident emacs enthusiast my dotfiles are used by many emacs rubyists here in Seattle. I'd love to see this supported in the new ruby-mode. Just my two cents. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 20:33:01 +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: To: Dmitry Gutov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13874851747410 (code B ref 16182); Thu, 19 Dec 2013 20:33:01 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 20:32:54 +0000 Received: from localhost ([127.0.0.1]:59007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtkH6-0001vR-Uq for submit@debbugs.gnu.org; Thu, 19 Dec 2013 15:32:53 -0500 Received: from mail-ea0-f182.google.com ([209.85.215.182]:51829) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtkH3-0001vH-QL for 16182@debbugs.gnu.org; Thu, 19 Dec 2013 15:32:50 -0500 Received: by mail-ea0-f182.google.com with SMTP id a15so678804eae.13 for <16182@debbugs.gnu.org>; Thu, 19 Dec 2013 12:32:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=3ATF4d9p2T6pqrM0q1CTSQUKZ9EGkx80iumpdraBJvE=; b=0S2VwGmtHFYLha/4Pb1orNTYcm4nX0SMYoYphQbbgbmEwRkQlmcNuwygG3vlw8zCn/ aPyiJmDqFzxll3ho+CWrW2rglFBO1zLVJWrSTD9c0LGarrvxMqoX5hupAszgHWubwuEN x4/Q6qPEyAkLjUUe9Hy6/djAP6+7hDKcDRU0fO313Dust0vbFeWYe1MHznJwds3NUELN MBTvnbLuXLl5b+OeQTmzr3LIsWFfIBzGu7eetxV7wmlYzE3A/6p47sAGxLSIYKD2pR+f eqHLifqdYynmLQKqwACU9TwmCn/ujNhvpX4m4AK5ackabP11dZXWg68oNrLteRWhMVWZ pVNQ== X-Received: by 10.15.86.75 with SMTP id h51mr532819eez.44.1387485169024; Thu, 19 Dec 2013 12:32:49 -0800 (PST) Received: from [10.0.1.3] (93-152-182-45.ddns.onlinedirect.bg. [93.152.182.45]) by mx.google.com with ESMTPSA id n1sm12425322eep.20.2013.12.19.12.32.47 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Dec 2013 12:32:48 -0800 (PST) Date: Thu, 19 Dec 2013 22:33:44 +0200 From: Bozhidar Batsov Message-ID: In-Reply-To: <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> <52B329C1.9050602@yandex.ru> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="52b35828_1cdce2de_206" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --52b35828_1cdce2de_206 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday, December 19, 2013 at 7:15 PM, Dmitry Gutov wrote: > 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: > > =20 > > res =3D method do =7Cx, y=7C > > something > > end > > =20 > > Might make sense to indent those like: > > =20 > > res =3D method do =7Cx, y=7C > > something > > end > > =20 > > for consistency with the if/unless/case indentation by default. > =20 > It might be more consistent, but I don't see any projects doing that. =20 > =46or example, ActiveRecord, Grape, Goliath and Rack don't. > =20 > Check out the examples at the top: > =20 > https://github.com/rails/rails/blob/master/activerecord/lib/active=5Fre= cord/base.rb > =20 > https://github.com/rack/rack/blob/master/lib/rack/builder.rb > =20 > It can be an option, though. Part of the reason people are not using a particular style from time to t= ime is simply lack of tool support. :-) I guess more people would have us= ed that style if their editor supported it. > =20 > --- > =20 > Come to think of it, do you see the =22align end to the keyword=22 styl= e =20 > much=3F I did a grep on my gems directory, and the other style seems to= be =20 > prevalent, especially among the non-core gems: > =20 > Pry, RDoc, Minitest, Rubygems, EventMachine, Nokogiri align to keyword.= > =20 > ActiveRecord, ActiveSupport, other Active* gems, Cucumber, Thor, Grape,= =20 > Excon, WebMock, =46araday align to the beginning of the statement. > =20 > RSpec uses both. Yard aligns to keyword after =22=3D=22, but to stateme= nt =20 > after =22=7C=7C=3D=22. > =20 > Maybe we even should align to the statement by default, because, you =20 > know, Rails. > =20 > =20 Well, even though I develop Rails apps for a living I wouldn=E2=80=99t sa= y the style used in the Rails codebase should be considered some gold sta= ndard - after all they are outdenting =E2=80=9Cprivate/protected=E2=80=9D= there :-) That said - before I started using programming Ruby in Emacs I= aligned to the beginning of the statement, but I stopped because this wa= sn=E2=80=99t supported in ruby-mode. After using the alignment to keyword= style for several years I=E2=80=99ve grown to like it a lot (and it seem= s others are enjoying it as well http://stackoverflow.com/questions/29250= 28/how-do-you-assign-a-variable-with-the-result-of-a-if-else-block). I=E2= =80=99m perfectly fine with alignment to statement becoming the default (= although the change of this default would be fairly visible/disruptive, s= ince as it stands keyword alignment is the only supported style and I gue= ss most Rubyists using Emacs employ it). =20 =20 > =20 > > Also: > > =20 > > res =3D > > method do =7Cx, y=7C > > something > > end > > =20 > > is actually indented like this: > > =20 > > res =3D > > method do =7Cx, y=7C > > something > > end > > =20 > =20 > =20 > Guess we can special-case this. That=E2=80=99d be great. =20 --52b35828_1cdce2de_206 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On Th= ursday, December 19, 2013 at 7:15 PM, Dmitry Gutov wrote:
On 19.12.2013 14:54, Bozhidar Ba= tsov wrote:
I can confirm th= at your method args indentation fix is working. I did,
however,= notice the following problem after I mentioned the
if/unless/c= ase with assignment indentation. Consider the following:

res =3D method do =7Cx, y=7C
something
en= d

Might make sense to indent those like:

res =3D method do =7Cx, y=7C
some= thing
end

for consistency wi= th the if/unless/case indentation by default.

It might be more consistent, but I don't see any project= s doing that.
=46or example, ActiveRecord, Grape, Goliath and = Rack don't.


It can be an option, though.
=
Part of the reason people are not us= ing a particular style from time to time is simply lack of tool support. = :-) I guess more people would have used that style if their editor suppor= ted it.

---

Come to think of it, = do you see the =22align end to the keyword=22 style
much=3F 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, =46araday align to th= e beginning of the statement.

RSpec uses both. Y= ard aligns to keyword after =22=3D=22, but to statement
after = =22=7C=7C=3D=22.

Maybe we even should align to t= he statement by default, because, you
know, Rails.
=
Well, even though I develop Rails apps for= a living I wouldn=E2=80=99t say the style used in the Rails codebase sho= uld be considered some gold standard - after all they are outdenting =E2=80= =9Cprivate/protected=E2=80=9D there :-) That said - before I started usin= g programming Ruby in Emacs I aligned to the beginning of the statement, = but I stopped because this wasn=E2=80=99t supported in ruby-mode. After u= sing the alignment to keyword style for several years I=E2=80=99ve grown = to like it a lot (and it seems others are enjoying it as well http://stackoverflow.com/ques= tions/2925028/how-do-you-assign-a-variable-with-the-result-of-a-if-else-b= lock). I=E2=80=99m perfectly fine with alignment to statement becomin= g the default (although the change of this default would be fairly visibl= e/disruptive, since as it stands keyword alignment is the only supported = style and I guess most Rubyists using Emacs employ it). 
&= nbsp;

Also:
<= br>
res =3D
method do =7Cx, y=7C
so= mething
end

is actually indented li= ke this:

res =3D
method do =7Cx, y=7C=
something
end

Guess we can special-case this.
That=E2=80=99d be great. 
=20

--52b35828_1cdce2de_206-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Steve Purcell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 20:43:01 +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: To: Bozhidar Batsov Cc: Adam Sokolnicki , 16182@debbugs.gnu.org, Dmitry Gutov Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13874857328383 (code B ref 16182); Thu, 19 Dec 2013 20:43:01 +0000 Received: (at 16182) by debbugs.gnu.org; 19 Dec 2013 20:42:12 +0000 Received: from localhost ([127.0.0.1]:59012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtkQ7-0002B6-2t for submit@debbugs.gnu.org; Thu, 19 Dec 2013 15:42:11 -0500 Received: from h1189701.stratoserver.net ([85.214.32.38]:58995) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtkQ4-0002Ax-GC for 16182@debbugs.gnu.org; Thu, 19 Dec 2013 15:42:09 -0500 Received: from [192.168.1.112] (host109-158-248-123.range109-158.btcentralplus.com [109.158.248.123]) by h1189701.stratoserver.net (Postfix) with ESMTPSA id 28ED5820005; Thu, 19 Dec 2013 21:42:05 +0100 (CET) Content-Type: multipart/alternative; boundary="Apple-Mail=_9AF4F925-131A-4966-9D3A-F499C1266919" Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) From: Steve Purcell In-Reply-To: Date: Thu, 19 Dec 2013 20:42:04 +0000 Message-Id: <7205D5AB-FD06-4231-A854-F20D5DE18167@sanityinc.com> 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> X-Mailer: Apple Mail (2.1827) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --Apple-Mail=_9AF4F925-131A-4966-9D3A-F499C1266919 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 19 Dec 2013, at 20:33, Bozhidar Batsov wrote: > Well, even though I develop Rails apps for a living I wouldn=92t say = the style used in the Rails codebase should be considered some gold = standard - after all they are outdenting =93private/protected=94 there = :-) That said - before I started using programming Ruby in Emacs I = aligned to the beginning of the statement, but I stopped because this = wasn=92t supported in ruby-mode. After using the alignment to keyword = style for several years I=92ve grown to like it a lot (and it seems = others are enjoying it as well = http://stackoverflow.com/questions/2925028/how-do-you-assign-a-variable-wi= th-the-result-of-a-if-else-block). I=92m perfectly fine with alignment = to statement becoming the default (although the change of this default = would be fairly visible/disruptive, since as it stands keyword alignment = is the only supported style and I guess most Rubyists using Emacs employ = it).=20 I really wouldn=92t advise changing the default alignment in this case. = The current default is =93right=94 for many if not most existing users. But +1 for there being options. :-)= --Apple-Mail=_9AF4F925-131A-4966-9D3A-F499C1266919 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
On 19 Dec 2013, at 20:33, Bozhidar Batsov = <bozhidar@batsov.com> = wrote:
Well, even though I = develop Rails apps for a living I wouldn=92t say the style used in the = Rails codebase should be considered some gold standard - after all they = are outdenting =93private/protected=94 there :-) That said - before I = started using programming Ruby in Emacs I aligned to the beginning of = the statement, but I stopped because this wasn=92t supported in = ruby-mode. After using the alignment to keyword style for several years = I=92ve grown to like it a lot (and it seems others are enjoying it as = well http://stackoverflow.com/questio= ns/2925028/how-do-you-assign-a-variable-with-the-result-of-a-if-else-block= ). I=92m perfectly fine with alignment to statement becoming the = default (although the change of this default would be fairly = visible/disruptive, since as it stands keyword alignment is the only = supported style and I guess most Rubyists using Emacs employ = it). 


I really = wouldn=92t advise changing the default alignment in this case. The = current default is =93right=94 for many if not most existing = users.

But +1 for there being options. = :-)
= --Apple-Mail=_9AF4F925-131A-4966-9D3A-F499C1266919-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2013 05:22:01 +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: To: Bozhidar Batsov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Doppelt , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13875169116777 (code B ref 16182); Fri, 20 Dec 2013 05:22:01 +0000 Received: (at 16182) by debbugs.gnu.org; 20 Dec 2013 05:21:51 +0000 Received: from localhost ([127.0.0.1]:59314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtsX0-0001lE-Ed for submit@debbugs.gnu.org; Fri, 20 Dec 2013 00:21:50 -0500 Received: from mail-ea0-f171.google.com ([209.85.215.171]:32785) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtsWx-0001l4-VN for 16182@debbugs.gnu.org; Fri, 20 Dec 2013 00:21:48 -0500 Received: by mail-ea0-f171.google.com with SMTP id h10so813465eak.2 for <16182@debbugs.gnu.org>; Thu, 19 Dec 2013 21:21:46 -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=iJZz/l/ro90lnEz1OyyrVGjpbjexlML4THzbyVfCSyU=; b=nrBqLjaLMjhRyjtqf9UIPTa+FTXnaUm+EPHhZdoO1fHCf8sYpwpG9v4j4jCHpIZnNQ AwM4lQ0CX0UUDZVO3HtWCyPC2JK2bUdyp7L3RXdoIzAKchBWfefSXZ1O0X0PnvnVf+Ys j/VskPGwylXdVaRZseG9xnaujHDMXygTbrgVD1Qd+mwRDt/djtALtbXfFh5SfaYXUnjc Z96ymQc95RTbOkYnzzF47oS0I0eXlIthFOtQ4oJaLH2iju94/rcvIfShyJv3xOZJw74s sZYylSos58HI1sQ438PtPVeQq+6mboavnOOl7SBloGqjRSaWIWNcM3IGvlRybujh/Wj4 xqXA== X-Received: by 10.14.246.202 with SMTP id q50mr562227eer.58.1387516906903; Thu, 19 Dec 2013 21:21:46 -0800 (PST) Received: from [192.168.10.2] (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id 44sm15250001eek.5.2013.12.19.21.21.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 21:21:45 -0800 (PST) Message-ID: <52B3D3E6.8060409@yandex.ru> Date: Fri, 20 Dec 2013 07:21:42 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 19.12.2013 22:33, Bozhidar Batsov wrote: > Part of the reason people are not using a particular style from time to > time is simply lack of tool support. :-) I guess more people would have > used that style if their editor supported it. Maybe so. I'll have to return to the "do" block later, since this kind of special handling requires finding the beginning of the method chain (in the general case) that the block is passed to. Other keywords are simpler. > Well, even though I develop Rails apps for a living I wouldn’t say the > style used in the Rails codebase should be considered some gold standard > - after all they are outdenting “private/protected” there :-) Yuck indeed. :) > That said > - before I started using programming Ruby in Emacs I aligned to the > beginning of the statement, but I stopped because this wasn’t supported > in ruby-mode. After using the alignment to keyword style for several > years I’ve grown to like it a lot (and it seems others are enjoying it > as well > http://stackoverflow.com/questions/2925028/how-do-you-assign-a-variable-with-the-result-of-a-if-else-block). > I’m perfectly fine with alignment to statement becoming the default > (although the change of this default would be fairly visible/disruptive, > since as it stands keyword alignment is the only supported style and I > guess most Rubyists using Emacs employ it). Well, since there's not much support for changing the defaults, I've reverted the special handling of "begin" that already made its way in, and added a user option that would control all applicable keywords: `ruby-align-to-stmt-keywords', in revision 115624. Everyone, please try how it works for you, maybe comment on the name, etc. The feature freeze is in a couple of days, so we have to get the basics right. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2013 09:53: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: To: Dmitry Gutov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Doppelt , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13875331266654 (code B ref 16182); Fri, 20 Dec 2013 09:53:02 +0000 Received: (at 16182) by debbugs.gnu.org; 20 Dec 2013 09:52:06 +0000 Received: from localhost ([127.0.0.1]:59533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtwkX-0001jF-Pw for submit@debbugs.gnu.org; Fri, 20 Dec 2013 04:52:06 -0500 Received: from mail-ee0-f47.google.com ([74.125.83.47]:43120) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtwkU-0001is-G2 for 16182@debbugs.gnu.org; Fri, 20 Dec 2013 04:52:03 -0500 Received: by mail-ee0-f47.google.com with SMTP id e51so779230eek.6 for <16182@debbugs.gnu.org>; Fri, 20 Dec 2013 01:52:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=SZJPzqxxdifJ2r8BuP9F8RtHAW9BjWg4y1ldkzwOPmQ=; b=qEg0FR+fAz0n8PPNgaUdrMJQIf4k1XR17Fgb76YSlser+jgdiT+RtsmUz9zjj6eFKL o3Z/ob3X7QT9S5yDlUsTb7fUWDRxcRKzeUHnunL+RlvHRLKQe1lMNo8hIa6kuXNSGvIE NOYvk03Ekt3VTUDjnfes+5KXHjJku04uPrO9MO08z8FNiLAJmTwV0KOw2TrwfvDDZm6n o/Rj53GojMJ+qH+CDdDDUiap0priloBi28DQ9Goiiwv6h8C3lJFxX0ubenbGhYKg6GuV Y6d1LINKx1wLvC/sFt32pDJl5advroHk5xiSvJVo5PMZTUck5XcKtT+xmdWOchrAR/xR 9bRg== X-Received: by 10.14.6.5 with SMTP id 5mr1985939eem.51.1387533121639; Fri, 20 Dec 2013 01:52:01 -0800 (PST) Received: from [192.168.1.28] ([95.87.231.111]) by mx.google.com with ESMTPSA id j46sm16985367eew.18.2013.12.20.01.51.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Dec 2013 01:52:00 -0800 (PST) Date: Fri, 20 Dec 2013 11:51:57 +0200 From: Bozhidar Batsov Message-ID: <1174B6D834D54E1C83E139525AB3C6C3@gmail.com> In-Reply-To: <52B3D3E6.8060409@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> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="52b4133d_64af49b_1c26" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --52b4133d_64af49b_1c26 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On =46riday, December 20, 2013 at 7:21 AM, Dmitry Gutov wrote: > On 19.12.2013 22:33, Bozhidar Batsov wrote: > > Part of the reason people are not using a particular style from time = to > > time is simply lack of tool support. :-) I guess more people would ha= ve > > used that style if their editor supported it. > > =20 > =20 > =20 > Maybe so. I'll have to return to the =22do=22 block later, since this k= ind =20 > of special handling requires finding the beginning of the method chain = =20 > (in the general case) that the block is passed to. Other keywords are =20 > simpler. > =20 > > Well, even though I develop Rails apps for a living I wouldn=E2=80=99= t say the > > style used in the Rails codebase should be considered some gold stand= ard > > - after all they are outdenting =E2=80=9Cprivate/protected=E2=80=9D t= here :-) > > =20 > =20 > =20 > Yuck indeed. :) > =20 > > That said > > - before I started using programming Ruby in Emacs I aligned to the > > beginning of the statement, but I stopped because this wasn=E2=80=99t= supported > > in ruby-mode. After using the alignment to keyword style for several > > years I=E2=80=99ve grown to like it a lot (and it seems others are en= joying it > > as well > > http://stackoverflow.com/questions/2925028/how-do-you-assign-a-variab= le-with-the-result-of-a-if-else-block). > > I=E2=80=99m perfectly fine with alignment to statement becoming the d= efault > > (although the change of this default would be fairly visible/disrupti= ve, > > since as it stands keyword alignment is the only supported style and = I > > guess most Rubyists using Emacs employ it). > > =20 > =20 > =20 > Well, since there's not much support for changing the defaults, I've =20 > reverted the special handling of =22begin=22 that already made its way = in, =20 > and added a user option that would control all applicable keywords: =20 > =60ruby-align-to-stmt-keywords', in revision 115624. > =20 > =20 Just a small nitpick - everything that returns a value is actually an exp= ression, not a statement. Maybe =60ruby-align-to-expr-keywords=E2=80=99 would be a more appropriate= name for the option. =20 > =20 > Everyone, please try how it works for you, maybe comment on the name, e= tc. > =20 > The feature freeze is in a couple of days, so we have to get the basics= =20 > right. > =20 > =20 Btw, I noticed this in the indent examples: zoo .lose( q, p) Shouldn=E2=80=99t it be: zoo .lose( q, p) =20 --52b4133d_64af49b_1c26 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On =46= riday, December 20, 2013 at 7:21 AM, Dmitry Gutov wrote:
On 19.12.2013 22:33, Bozhidar Ba= tsov wrote:
Part of the reas= on people are not using a particular style from time to
time is= simply lack of tool support. :-) I guess more people would have
used that style if their editor supported it.
<= div>
Maybe so. I'll have to return to the =22do=22 block la= ter, since this kind
of special handling requires finding the = beginning of the method chain
(in the general case) that the b= lock is passed to. Other keywords are
simpler.

<= /div>
Well, even though I develop = Rails apps for a living I wouldn=E2=80=99t say the
style used i= n the Rails codebase should be considered some gold standard
- = after all they are outdenting =E2=80=9Cprivate/protected=E2=80=9D there := -)

Yuck indeed. :)
=
> That said
- before I started using programming Ruby in Emacs I aligned to the
beginning of the statement, but I stopped because this wasn=E2=80= =99t supported
in ruby-mode. After using the alignment to keywo= rd style for several
years I=E2=80=99ve grown to like it a lot = (and it seems others are enjoying it
as well
I=E2=80=99m perfectly fine with alignment to statement b= ecoming the default
(although the change of this default would = be fairly visible/disruptive,
since as it stands keyword alignm= ent is the only supported style and I
guess most Rubyists using= Emacs employ it).

Well, sinc= e there's not much support for changing the defaults, I've
rev= erted the special handling of =22begin=22 that already made its way in, <= /div>
and added a user option that would control all applicable keywo= rds:
=60ruby-align-to-stmt-keywords', in revision 115624.
Just a small nitpick - everything t= hat returns a value is actually an expression, not a statement.
Maybe =60ruby-align-to-expr-keywords=E2=80=99 would be a more appropriat= e name for the option. 

Everyone, please try how it wor= ks for you, maybe comment on the name, etc.

The = feature freeze is in a couple of days, so we have to get the basics
right.

Btw, I noticed this in the indent examples:<= /font>

zoo
  .lose(
  q, p)
Shouldn=E2=80=99t it be:

z= oo
  .lose(
    q, p)
=

 
=20

--52b4133d_64af49b_1c26-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2013 11:58: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: To: Bozhidar Batsov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Doppelt , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138754064821801 (code B ref 16182); Fri, 20 Dec 2013 11:58:02 +0000 Received: (at 16182) by debbugs.gnu.org; 20 Dec 2013 11:57:28 +0000 Received: from localhost ([127.0.0.1]:59630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtyhr-0005fX-7T for submit@debbugs.gnu.org; Fri, 20 Dec 2013 06:57:27 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]:37221) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtyhm-0005fI-I1 for 16182@debbugs.gnu.org; Fri, 20 Dec 2013 06:57:23 -0500 Received: by mail-ee0-f44.google.com with SMTP id b57so1017103eek.3 for <16182@debbugs.gnu.org>; Fri, 20 Dec 2013 03:57:21 -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=r5UehGUBzoRm2uHm4qctHc2O2gDP6c+1XeoxUf8ZCgk=; b=xCwROAul8g2mYW/272FL+u0H+Mn6waU8Kyk8ZtPlwwG4NdhxFudlbGjLM2Co4jHSOM 7z98oXqek+YWJ5tcbAGkpOy1hRaXocN4RNHBPWL02vdtLRcV0GrhZMywuDe7AkpZ8nvb 2UwdwN+KZFukkPXh8EhQyEDNtw64LS4mJkHjqrbtHqFlvVyHZ+a3FpP2nXBbwoTDG4NK 0NhsQpHeYXGDdyijRMO3WLBZssta33YGrKu8MDZWKBFmCM/oX8Ac2vRCluRisNWKVfd6 UGldTiCxwGHHlpo01YaML6/a85iN2YU86M4SaeEiW5+kVIhJtvcF5DB6dKfGMuAr2Wun UonQ== X-Received: by 10.14.37.131 with SMTP id y3mr5348573eea.1.1387540641550; Fri, 20 Dec 2013 03:57:21 -0800 (PST) Received: from [192.168.10.2] (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id o1sm17919955eea.10.2013.12.20.03.57.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Dec 2013 03:57:20 -0800 (PST) Message-ID: <52B4309D.8060502@yandex.ru> Date: Fri, 20 Dec 2013 13:57:17 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 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> In-Reply-To: <1174B6D834D54E1C83E139525AB3C6C3@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. > Maybe `ruby-align-to-expr-keywords’ would be a more appropriate name for > the option. I was thinking rather of `ruby-align-to-statement'. A non-functional change that may be easier to pronounce. > Btw, I noticed this in the indent examples: > > zoo > .lose( > q, p) > > Shouldn’t it be: > > zoo > .lose( > q, p) Maybe, but that's harder to do. Basically, we'd want to keep the additional indentation when and only when the parent token (.), or any one of its siblings (in case of a chained method call) are at indentation. Checking if the parent is at indentation is easy, but finding its siblings - not so much. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: References: <874n66byoo.fsf@yandex.ru> In-Reply-To: <874n66byoo.fsf@yandex.ru> Resent-From: Adam Sokolnicki Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2013 12:45: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: To: 16182@debbugs.gnu.org Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138754347732042 (code B ref 16182); Fri, 20 Dec 2013 12:45:02 +0000 Received: (at 16182) by debbugs.gnu.org; 20 Dec 2013 12:44:37 +0000 Received: from localhost ([127.0.0.1]:59684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtzRU-0008Kh-2X for submit@debbugs.gnu.org; Fri, 20 Dec 2013 07:44:36 -0500 Received: from mail-oa0-f52.google.com ([209.85.219.52]:41339) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtzRR-0008KX-AD for 16182@debbugs.gnu.org; Fri, 20 Dec 2013 07:44:34 -0500 Received: by mail-oa0-f52.google.com with SMTP id h16so2710798oag.25 for <16182@debbugs.gnu.org>; Fri, 20 Dec 2013 04:44:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=zFvke6gbVKS0g9g9UNfYDqVTC2RGJEYhfAKtoIhxU+A=; b=nuzY6tvWVq09xfMNVCFAKSga0c3QsQJR4om0azfLnkcojntRuGdH9YKbZkY0Ci7L5+ zZk7qFuvWyjTcOtucncYey2xCliVxBJceNumXLsRlbGXbzoi4NPwTSw6nzeTHvmfKhN5 rwH/CFtfW9InwQ02OZJfnfupn+1ZZsIiJylA1/gKmXA0xCwTon24B+1u8Zyl+3xMQap6 kEKsekj08jg78x6h0kZkJqvBteQZg2mMiNy8xMrP+c3v4iosrxNf9EK6QGzCHqRTKlOb Qf6KqdKKVYZch8SpPAxuJwPwOpyXRW/ZwKZnRv5v9YnPCW5HzZfgAMPQfVUqmcOysE7x gIyg== MIME-Version: 1.0 X-Received: by 10.60.33.7 with SMTP id n7mr6109310oei.25.1387543472451; Fri, 20 Dec 2013 04:44:32 -0800 (PST) Received: by 10.182.105.200 with HTTP; Fri, 20 Dec 2013 04:44:32 -0800 (PST) Date: Fri, 20 Dec 2013 13:44:32 +0100 Message-ID: From: Adam Sokolnicki Content-Type: multipart/alternative; boundary=089e01182c7ec934e604edf6a339 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> When I'm breaking line on argument list it's >> because the line is too long. With indentation to the opened paren the >> line stays long despite breaking the line. > > Like Stefan suggests, if the opened paren is immediately followed by a > newline, the arguments will be indented less (but still indented by > additional two columns, compared to the beginning of the statement). [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (adam.sokolnicki[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.219.52 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> When I'm breaking line on argument list it's >> because the line is too long. With indentation to the opened paren the >> line stays long despite breaking the line. > > Like Stefan suggests, if the opened paren is immediately followed by a > newline, the arguments will be indented less (but still indented by > additional two columns, compared to the beginning of the statement). [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.219.52 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (adam.sokolnicki[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid --089e01182c7ec934e604edf6a339 Content-Type: text/plain; charset=ISO-8859-1 >> When I'm breaking line on argument list it's >> because the line is too long. With indentation to the opened paren the >> line stays long despite breaking the line. > > Like Stefan suggests, if the opened paren is immediately followed by a > newline, the arguments will be indented less (but still indented by > additional two columns, compared to the beginning of the statement). I did not think about it before. It makes sense. >> I think this is how vim indents ruby code by default. > If that's true, could you point to: > > * Some other open source project or two using this style. > > * Some tutorial or step-by-step instruction for me to test this > indentation in Vim. Do I need to install anything apart from the > > base > distribution? > Suppose I have the snippet of code typed out. What do I press next? Actually that's not true. I was wrong. Sorry for the confusion. >> I you ask me emacs can only support the indentation to the beginning >> of the statement. > > I don't think it's sufficient, by itself. > > Take this example: > > current_user.statuses.find(params[:id]).update({ > user: current_user, > text: params[:status] > }) > > Suppose `update' accepted a second argument, and we wanted to pass it > here, on the next line after the hash. Which column would it be indented > to? 0? Yes it's not sufficient. --089e01182c7ec934e604edf6a339 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
 
>> When I'm breaking line o= n argument list it's >> because the line is too long. With indentation to the opened paren= the >> line stays long despite breaking the line. > > Like Stefan suggests, if the opened paren is immediately followed by a > newline, the arguments will be indented less (but still indented by > additional two columns, compared to the beginning of the statement). I did not think about it before. It makes sense. >> I think this is how vim indents ruby code by default. > If that's true, could you point to: > > * Some other open source project or two using this style. > > * Some tutorial or step-by-step instruction for me to test this > indentation in Vim. Do I need to install anything apart from the >= ; > base > distribution? > Suppose I have the snippet of code typed out. What do I press next? Actually that's not true. I was wrong. Sorry for the confusion. >> I you ask me emacs can only support the indentation to the beginni= ng >> of the statement. > > I don't think it's sufficient, by itself. > > Take this example: > > current_user.statuses.find(params[:id]).update({ > user: current_user, > text: params[:status] > }) > > Suppose `update' accepted a second argument, and we wanted to pass= it > here, on the next line after the hash. Which column would it be indent= ed > to? 0? Yes it's not sufficient.
=A0



--089e01182c7ec934e604edf6a339-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2013 15:47: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: To: Dmitry Gutov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Doppelt , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138755437922135 (code B ref 16182); Fri, 20 Dec 2013 15:47:02 +0000 Received: (at 16182) by debbugs.gnu.org; 20 Dec 2013 15:46:19 +0000 Received: from localhost ([127.0.0.1]:60343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu2HK-0005kv-SP for submit@debbugs.gnu.org; Fri, 20 Dec 2013 10:46:19 -0500 Received: from mail-ee0-f50.google.com ([74.125.83.50]:36901) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu2HH-0005kk-NO for 16182@debbugs.gnu.org; Fri, 20 Dec 2013 10:46:16 -0500 Received: by mail-ee0-f50.google.com with SMTP id c41so1127398eek.37 for <16182@debbugs.gnu.org>; Fri, 20 Dec 2013 07:46:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=z2UkRj3C6hrk3QxsaoCw30iBQDtj3+3c4ws3PQmgyNg=; b=lHKzWNGia4px3ZdwpK9VGnzGH9VqWxa/ukMeQApBwn+5fYkY8aoeuAD5o5we3GfEi/ D//lN5oU8wqLrD3DOoc0a9qK43cdGMkndtZ1owDA/28GI7+E4UjGYYiPq63VxL121KSu cNLHvMLpCrDkq6IVAlAYUd4QnUDC6uDVglNZa5kYmPNSZf8x/N3zwiYE57LLjesJ18t6 h6fBwWMKerAQXhJqUO4iBwJiKh7b0MYAbU78I5rR3QwuEcUekKo9emFevnoGFA3kQ5ao LKGuo39cEqgG8csYR9XSrUKt/KNhlqETEX8V7ZCx2Wi/oplX8wQb1Dydh7PWgaRwTsPT B+XQ== X-Received: by 10.14.149.139 with SMTP id x11mr5645505eej.35.1387554374778; Fri, 20 Dec 2013 07:46:14 -0800 (PST) Received: from [192.168.1.28] ([95.87.231.111]) by mx.google.com with ESMTPSA id 4sm19615129eed.14.2013.12.20.07.46.12 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Dec 2013 07:46:13 -0800 (PST) Date: Fri, 20 Dec 2013 17:46:10 +0200 From: Bozhidar Batsov Message-ID: <2B4249DE35244273B9602A8B72DB6C08@gmail.com> In-Reply-To: <52B4309D.8060502@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> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="52b46642_6a37288a_1c26" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --52b46642_6a37288a_1c26 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On =46riday, 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. > > =20 > =20 > =20 > It can be both (see =22expression statement=22). This way it's not =20 > ambiguous, because I'm really aligning to the statement: the containing= =20 > expression, which follows the bob or an =5Bimplicit=5D semicolon. > =20 > In Rubocop, you've chosen to align to just the parent expression. Maybe= =20 > we should find a realistic example where one would be different from th= e =20 > other. > =20 > =20 I don=E2=80=99t quite understand what you mean. =20 > =20 > > Maybe =60ruby-align-to-expr-keywords=E2=80=99 would be a more appropr= iate name for > > the option. > > =20 > =20 > =20 > I was thinking rather of =60ruby-align-to-statement'. A non-functional = =20 > change that may be easier to pronounce. > =20 > =20 Sounds reasonable. =20 > =20 > > Btw, I noticed this in the indent examples: > > =20 > > zoo > > .lose( > > q, p) > > =20 > > Shouldn=E2=80=99t it be: > > =20 > > zoo > > .lose( > > q, p) > > =20 > =20 > =20 > Maybe, but that's harder to do. Basically, we'd want to keep the =20 > additional indentation when and only when the parent token (.), or any = =20 > one of its siblings (in case of a chained method call) are at indentati= on. > =20 > Checking if the parent is at indentation is easy, but finding its =20 > siblings - not so much. > =20 > =20 I guess this can be ignored for now, since such code is not particularly = common. =20 --52b46642_6a37288a_1c26 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On =46= riday, December 20, 2013 at 1:57 PM, Dmitry Gutov wrote:
On 20.12.2013 11:51, Bozhidar Ba= tsov wrote:
Just a small nit= pick - everything that returns a value is actually an
expressio= n, not a statement.

It can be= both (see =22expression statement=22). This way it's not
ambi= guous, because I'm really aligning to the statement: the containing
expression, which follows the bob or an =5Bimplicit=5D semicolon.

In Rubocop, you've chosen to align to just the pa= rent expression. Maybe
we should find a realistic example wher= e one would be different from the
other.
I don=E2=80=99t quit= e understand what you mean. 

Maybe =60ruby-align-to-expr-keywords=E2=80=99 would be a = more appropriate name for
the option.
<= div>
I was thinking rather of =60ruby-align-to-statement'. = A non-functional
change that may be easier to pronounce.
=
Soun= ds reasonable. 

<= div>Btw, I noticed this in the indent examples:

= zoo
.lose(
q, p)

Shoul= dn=E2=80=99t it be:

zoo
.lose(
q, p)

Maybe, but t= hat's harder to do. Basically, we'd want to keep the
additiona= l indentation when and only when the parent token (.), or any
= one of its siblings (in case of a chained method call) are at indentation= .

Checking if the parent is at indentation is ea= sy, but finding its
siblings - not so much.
<= /span> =20 =20 =20 =20
=20
I guess this can be i= gnored for now, since such code is not particularly common.
--52b46642_6a37288a_1c26-- From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) 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: To: Bozhidar Batsov Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Doppelt , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13876398847390 (code B ref 16182); Sat, 21 Dec 2013 15:32:02 +0000 Received: (at 16182) by debbugs.gnu.org; 21 Dec 2013 15:31:24 +0000 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 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 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) 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) Message-ID: <52B5B442.3010908@yandex.ru> Date: Sat, 21 Dec 2013 17:31:14 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 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> In-Reply-To: <2B4249DE35244273B9602A8B72DB6C08@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Steve Purcell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2013 15:39: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: To: Dmitry Gutov Cc: Adam Sokolnicki , 16182@debbugs.gnu.org, Adam Doppelt , Bozhidar Batsov Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13876403328391 (code B ref 16182); Sat, 21 Dec 2013 15:39:02 +0000 Received: (at 16182) by debbugs.gnu.org; 21 Dec 2013 15:38:52 +0000 Received: from localhost ([127.0.0.1]:33371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuOdg-0002BG-0Z for submit@debbugs.gnu.org; Sat, 21 Dec 2013 10:38:52 -0500 Received: from h1189701.stratoserver.net ([85.214.32.38]:36029) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuOda-0002Ay-0d for 16182@debbugs.gnu.org; Sat, 21 Dec 2013 10:38:47 -0500 Received: from [192.168.1.112] (host109-158-248-123.range109-158.btcentralplus.com [109.158.248.123]) by h1189701.stratoserver.net (Postfix) with ESMTPSA id 4B103820018; Sat, 21 Dec 2013 16:38:43 +0100 (CET) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) From: Steve Purcell In-Reply-To: <52B5B442.3010908@yandex.ru> Date: Sat, 21 Dec 2013 15:38:40 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: 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> <52B5B442.3010908@yandex.ru> X-Mailer: Apple Mail (2.1827) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 21 Dec 2013, at 15:31, Dmitry Gutov wrote: > This example is indented just like Robocop master likes with = (AlignWith: variable): >=20 > b =3D a =3D if 3 =3D=3D 4 > 1 > else > 2 > end >=20 > puts a > puts b >=20 >=20 > 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=92. I wouldn=92t personally consider as reasonable *any* scheme which placed = related =93if=94, =93else=94 and =93end=94 keywords at differing levels = of indentation. To get less indentation in the above case, one should place the =93if=94 = on a new line IMO. Just my 2c. :-)= From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2013 15:55:01 +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: To: Steve Purcell Cc: Adam Sokolnicki , 16182@debbugs.gnu.org, Adam Doppelt , Bozhidar Batsov Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138764124910179 (code B ref 16182); Sat, 21 Dec 2013 15:55:01 +0000 Received: (at 16182) by debbugs.gnu.org; 21 Dec 2013 15:54:09 +0000 Received: from localhost ([127.0.0.1]:33388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuOsS-0002e1-4V for submit@debbugs.gnu.org; Sat, 21 Dec 2013 10:54:08 -0500 Received: from mail-ea0-f179.google.com ([209.85.215.179]:51396) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuOsP-0002dq-G3 for 16182@debbugs.gnu.org; Sat, 21 Dec 2013 10:54:06 -0500 Received: by mail-ea0-f179.google.com with SMTP id r15so1581593ead.24 for <16182@debbugs.gnu.org>; Sat, 21 Dec 2013 07:54:04 -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=749FCRrp3fNGTLLZvzYniMcaogVMjJ3Il00Caj1xykk=; b=JsPztIMNNlhzXj1C7RTXoQQm2XbLLkOYEWP7pWH4GJUz6GJP0gbu5WDqFf3qTKMsKQ SVIwGkYZ8s6ysYEItp4zUZUXzgRo3JDQXr4XDLsBJFmtSutZNWBhpobvlPGzf7E5FYar esDBxWM6c12wxnv7gE2dUeKRzbbmy///kkJa12tNRxtkywGC0RE9QcwWbyu9GKEa/Cb+ 3QC4ZWviy0ZsMlv/SFzxwhluCHasuTnMSQIvsJmFWtyTJYkoR3s1HXnzAJoD3bC+P1Jj QlCsQnawgj88QCxiqSv3oE3rd1LmjeHmSxoLbfzMiGHKoFqSQsD5KEX3W61DEVckGxko 5vhw== X-Received: by 10.14.32.132 with SMTP id o4mr12475213eea.14.1387641244531; Sat, 21 Dec 2013 07:54:04 -0800 (PST) Received: from [192.168.10.2] (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id j46sm28551185eew.18.2013.12.21.07.54.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 21 Dec 2013 07:54:01 -0800 (PST) Message-ID: <52B5B997.6070203@yandex.ru> Date: Sat, 21 Dec 2013 17:53:59 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 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> <52B5B442.3010908@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 21.12.2013 17:38, Steve Purcell wrote: > I wouldnt personally consider as reasonable *any* scheme which placed related if, else and end keywords at differing levels of indentation. You're not the target audience, then. :) Not to worry, this won't be the default. But this style or all over the Rails codebase. And, personally, I quite like this usage of `begin' (basically, one of Adam's examples): a ||= begin perform_long_lookup end Indenting `if' and friends similarly might be good for consistency, at least. (Again, this example is indented differently by default in ruby-mode.) From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Steve Purcell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2013 16:50:01 +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: To: Dmitry Gutov Cc: Adam Sokolnicki , 16182@debbugs.gnu.org, Adam Doppelt , Bozhidar Batsov Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.138764455116846 (code B ref 16182); Sat, 21 Dec 2013 16:50:01 +0000 Received: (at 16182) by debbugs.gnu.org; 21 Dec 2013 16:49:11 +0000 Received: from localhost ([127.0.0.1]:33422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuPjj-0004Ne-Ah for submit@debbugs.gnu.org; Sat, 21 Dec 2013 11:49:11 -0500 Received: from h1189701.stratoserver.net ([85.214.32.38]:36867) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuPjg-0004NS-3K for 16182@debbugs.gnu.org; Sat, 21 Dec 2013 11:49:09 -0500 Received: from [192.168.1.112] (host109-158-248-123.range109-158.btcentralplus.com [109.158.248.123]) by h1189701.stratoserver.net (Postfix) with ESMTPSA id 80744820018; Sat, 21 Dec 2013 17:49:05 +0100 (CET) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) From: Steve Purcell In-Reply-To: <52B5B997.6070203@yandex.ru> Date: Sat, 21 Dec 2013 16:49:03 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <14421E87-0959-4C82-BEFB-13018C97D5BB@sanityinc.com> 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> <52B5B442.3010908@yandex.ru> <52B5B997.6070203@yandex.ru> X-Mailer: Apple Mail (2.1827) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 21 Dec 2013, at 15:53, Dmitry Gutov wrote: > But this style or all over the Rails codebase. And, personally, I = quite like this usage of `begin' (basically, one of Adam's examples): >=20 > a ||=3D begin > perform_long_lookup > end >=20 > Indenting `if' and friends similarly might be good for consistency, at = least. >=20 > (Again, this example is indented differently by default in ruby-mode.) For some reason, that example doesn=92t look quite as ugly to me. Any = =93rescue=94 clause would presumably be aligned to match the =93end=94. Obviously my tastes are not self-consistent. From unknown Sat Sep 20 07:11:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Resent-From: Adam Doppelt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Dec 2013 19:33:01 +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: To: Dmitry Gutov Cc: Steve Purcell , 16182@debbugs.gnu.org, Bozhidar Batsov , Adam Sokolnicki Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13876543755063 (code B ref 16182); Sat, 21 Dec 2013 19:33:01 +0000 Received: (at 16182) by debbugs.gnu.org; 21 Dec 2013 19:32:55 +0000 Received: from localhost ([127.0.0.1]:33582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuSIA-0001Jb-V8 for submit@debbugs.gnu.org; Sat, 21 Dec 2013 14:32:55 -0500 Received: from mail-ie0-f178.google.com ([209.85.223.178]:42078) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuSI8-0001JT-Qm for 16182@debbugs.gnu.org; Sat, 21 Dec 2013 14:32:53 -0500 Received: by mail-ie0-f178.google.com with SMTP id lx4so4548694iec.37 for <16182@debbugs.gnu.org>; Sat, 21 Dec 2013 11:32:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=dZTZIpOEMwdUrRAQEBwS0uSBoKjSWCeqJAc+ZTJ9x3A=; b=Ns4Lk4rZ4Py+Vi+SX6AIQrxrQE9NfqOcp0CYLfwAz/BoB0l78Y3+wvQWXTr5QSmiKd mI4CAE+7fghVx4iINfTy6vQmqOEX8jqAXxavCbMDfn5I+Nmr1U5G5HVN8DB3CpqBM4z+ Ymnr05jd1DWO4U/MGN0BAW54RkE45EpgVitKicjnt2KTPyX8nq3oY1YZ5sVtHsu40g2o XcYcgZLrwKGtf3n/cDadWGjszpZLipxdje6Inw539O/a25GKkmJa/OgqO8VEEtXXEGmM uFm5qsW9bNMaVUFghljAy+Pt83J/AWQ2IcXSd4W5MP23zrdCppLtL9DM+eIEt9Ow3eQd b3HQ== X-Gm-Message-State: ALoCoQmhW/31h7F24MjPcF8KJiWYDL/LaWdtd52L6Y/e8r06fVB+HcHubCuK+oJjCGfyyankN5MQ MIME-Version: 1.0 X-Received: by 10.50.136.165 with SMTP id qb5mr14245081igb.2.1387654372015; Sat, 21 Dec 2013 11:32:52 -0800 (PST) Received: by 10.64.225.205 with HTTP; Sat, 21 Dec 2013 11:32:51 -0800 (PST) In-Reply-To: <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> <52B5B442.3010908@yandex.ru> Date: Sat, 21 Dec 2013 11:32:51 -0800 Message-ID: From: Adam Doppelt Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > This example is indented just like Robocop master likes with (AlignWith: variable): > > b = a = if 3 == 4 > 1 > else > 2 > end > > 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 right - ideally it would be formatted like so: b = a = if 3 == 4 1 else 2 end I think 'ruby-align-to-stmt-keywords' is a perfectly fine name, btw. From unknown Sat Sep 20 07:11:57 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dmitry Gutov Subject: bug#16182: closed (Re: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens)) Message-ID: References: <52B647E8.4000100@yandex.ru> <874n66byoo.fsf@yandex.ru> X-Gnu-PR-Message: they-closed 16182 X-Gnu-PR-Package: emacs Reply-To: 16182@debbugs.gnu.org Date: Sun, 22 Dec 2013 02:02:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1387677723-23194-1" This is a multi-part message in MIME format... ------------=_1387677723-23194-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #16182: 24.3.50; ruby-mode: Indentation style of multiline literals with ha= nging open paren inside other parens which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 16182@debbugs.gnu.org. --=20 16182: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16182 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1387677723-23194-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 16182-done) by debbugs.gnu.org; 22 Dec 2013 02:01:18 +0000 Received: from localhost ([127.0.0.1]:33809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuYM1-00060l-Ph for submit@debbugs.gnu.org; Sat, 21 Dec 2013 21:01:18 -0500 Received: from mail-ea0-f178.google.com ([209.85.215.178]:61910) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuYM0-00060d-6k for 16182-done@debbugs.gnu.org; Sat, 21 Dec 2013 21:01:16 -0500 Received: by mail-ea0-f178.google.com with SMTP id d10so1706227eaj.37 for <16182-done@debbugs.gnu.org>; Sat, 21 Dec 2013 18:01:15 -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=wKF9Eiyqi5MoIKxV+9O0kioVWAHDFceFTrGe87EMKMw=; b=eoZ51LYsuOZTiXDhlJZ47F12/vkWdeTWSteRIRji2x4+L30wphA6khwfJV1wfJ9Ss0 Vg02mFafLxK0/yuclL45tatzneOMWZEhGK5lainGRFvsfZL3R7QTOTSFeNi83lDSiEgf 4SqNtdC/p1TwXpq9RkrYu2TK12BzOGuw160nSNtEsZ6NyFiN5/scpcPcvvQ9cDKDtU/e O4ajlOnpXoJc6ob1fLqBzeMrEXbHIaKTnAQLWjXsyOZn4EsRiXE19dV4N6/7grVPwutR c1sEZYF+zrjZK0GUVZPpfcM7hDTELWbcCgBAkp9tAhmb/RzRrxMC6d9KizKtWb9KRKAm Kp2A== X-Received: by 10.14.2.73 with SMTP id 49mr13935333eee.15.1387677675351; Sat, 21 Dec 2013 18:01:15 -0800 (PST) Received: from [192.168.10.2] (93-2-98.netrun.cytanet.com.cy. [93.109.2.98]) by mx.google.com with ESMTPSA id v7sm32349785eel.2.2013.12.21.18.01.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 21 Dec 2013 18:01:14 -0800 (PST) Message-ID: <52B647E8.4000100@yandex.ru> Date: Sun, 22 Dec 2013 04:01:12 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Adam Doppelt Subject: Re: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) 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> <52B5B442.3010908@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16182-done Cc: Steve Purcell , 16182-done@debbugs.gnu.org, Bozhidar Batsov , Adam Sokolnicki X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 21.12.2013 21:32, Adam Doppelt wrote: > I think 'ruby-align-to-stmt-keywords' is a perfectly fine name, btw. Ah, okay then. Without an overwhelming support for a rename, the current name stays. Thanks everyone, I'm closing this bug now. It has veered off to the side, but for now the answer to the original question is no, with only one vote in favor. Let's maybe revisit it again sometime. ------------=_1387677723-23194-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Dec 2013 03:55:52 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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 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) 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) From: Dmitry Gutov To: bug-gnu-emacs@gnu.org Subject: 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> MIME-Version: 1.0 Content-Type: text/plain 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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. ------------=_1387677723-23194-1--