GNU bug report logs - #16182
24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Wed, 18 Dec 2013 03:56:02 UTC

Severity: minor

Found in version 24.3.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Bozhidar Batsov <bozhidar <at> batsov.com>
Cc: Steve Purcell <steve <at> sanityinc.com>, 16182 <at> debbugs.gnu.org, Adam Doppelt <amd <at> gurge.com>, Adam Sokolnicki <adam.sokolnicki <at> gmail.com>
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 13:57:17 +0200
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.




This bug report was last modified 11 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.