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))

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 22 Dec 2013 02:02:03 +0000

Your bug report

#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging 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 [email-masked].

-- 
16182: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16182
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens)
From: Dmitry Gutov <[email-masked]>
To: Adam Doppelt <[email-masked]>
Cc: Steve Purcell <[email-masked]>, [email-masked], Bozhidar Batsov <[email-masked]>, Adam Sokolnicki <[email-masked]>
Date: Sun, 22 Dec 2013 04:01:12 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

Subject: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens
From: Dmitry Gutov <[email-masked]>
To: [email-masked]
Date: Wed, 18 Dec 2013 05:55:19 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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.