GNU bug report logs -
#32496
27.0.50; Strange indentation when ruby-align-chained-calls is t
Previous Next
Reported by: bruce.connor.am <at> gmail.com
Date: Wed, 22 Aug 2018 11:37:01 UTC
Severity: minor
Found in version 27.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Bozhidar Batsov <bozhidar <at> batsov.com> writes:
> Sorry for the radio silence - I've been super busy lately.
>
> It's hard for me to understand the indentation in the examples in the email
> (as it seems the same to me). Very simply put - the idea is to align multi-line
> chained calls on the `.`, as opposed to just nest them under the root receiver
> as we'd normally do.
>
> I think Dmitry implemented this great and it's behaving just as it's supposed
> to be behaving. Perhaps you misunderstood how this was supposed to
> behave? What's the indentation you expected?
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
The examples were in HTML mail, so they were difficult to understand.
Emacs (with (setq ruby-align-chained-calls t)) currently aligns like
this:
some_variable.where
.not(x: nil)
.where(y: 2)
Which is correct. However, when there's a mixture of keeping things on
one line and breaking, we get this:
some_variable.where.not(x: nil)
.where(y: 2)
I think the bug reporter wants:
some_variable.where.not(x: nil)
.where(y: 2)
I.e., align multiline chained calls on the first dot, not the last?
(I don't know Ruby, so I have no opinion here.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.