From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.bugs Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Date: Fri, 20 Dec 2013 11:51:57 +0200 Message-ID: <1174B6D834D54E1C83E139525AB3C6C3@gmail.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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="52b4133d_64af49b_1c26" X-Trace: ger.gmane.org 1387533196 22581 80.91.229.3 (20 Dec 2013 09:53:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Dec 2013 09:53:16 +0000 (UTC) Cc: Steve Purcell , 16182@debbugs.gnu.org, Adam Doppelt , Adam Sokolnicki To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 20 10:53:21 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vtwlk-0006eL-Oo for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Dec 2013 10:53:20 +0100 Original-Received: from localhost ([::1]:48576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtwlk-0002nt-F3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Dec 2013 04:53:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtwlZ-0002mz-A6 for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 04:53:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtwlT-00020B-2j for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 04:53:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtwlS-000205-UH for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 04:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VtwlS-0001kd-DL for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 04:53:02 -0500 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 16182-submit@debbugs.gnu.org id=B16182.13875331266654 (code B ref 16182); Fri, 20 Dec 2013 09:53:02 +0000 Original-Received: (at 16182) by debbugs.gnu.org; 20 Dec 2013 09:52:06 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: <52B3D3E6.8060409@yandex.ru> X-Mailer: sparrow 1.6.4 (build 1178) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82272 Archived-At: --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--