bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60186: 29.0.60; ruby-mode indentation of multi-line expressions


From: Dmitry Gutov
Subject: bug#60186: 29.0.60; ruby-mode indentation of multi-line expressions
Date: Fri, 30 Dec 2022 17:02:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

Hi Aaron,

On 30/12/2022 00:59, Aaron Jensen wrote:
On Wed, Dec 28, 2022 at 4:24 PM Dmitry Gutov<dgutov@yandex.ru>  wrote:
On 28/12/2022 14:47, Dmitry Gutov wrote:
I guess that particular trend started with ruby-method-params-indent,
where I haven't managed to choose better names for the var, or the values.
Semantics aside (I suppose we could go back and revise the naming a
little later), could you test this new revision of the patch?

I think I got the implementation simple enough now.

The number of options has grown, though:

(setq ruby-after-operator-indent nil
        ruby-block-indent nil
        ruby-method-call-indent nil
        ruby-parenless-call-arguments-indent nil)
I'll give it a shot some more, but these appear problematic:

fixture(
EntityProjection::Fixtures::Projection,
projection,
deleted
) do|projection|
   projection.assert_attributes_copied([
     { :document_id => :id }
                                       ])
end

Should be:

fixture(
   EntityProjection::Fixtures::Projection,
   projection,
   deleted
) do|projection|
   projection.assert_attributes_copied([
     { :document_id => :id }
   ])
end

This example is for https://debbugs.gnu.org/60321, I think. Which we split off and postponed a little.

The last patch was the latest revision of the changes for https://debbugs.gnu.org/60186.

As long as this example is unchanged (indented the same as the current version of ruby-mode), it's good enough. It looks like this on my machine, though:

  fixture(
    EntityProjection::Fixtures::Projection,
    projection,
    deleted
  ) do |projection|
    projection.assert_attributes_copied([
                                          { :document_id => :id }
                                        ])
  end

Could you please give the v6 patch a good run soon-ish: we have a good chance of getting it into Emacs 29 (together with ruby-ts-mode, which should reuse some or most of the options), as I've just found out.

The deadline for checking all this in is pretty near, alas: 1-2 days.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]