GNU bug report logs - #60110
29.0.60; ruby-mode method parameter alignment

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Fri, 16 Dec 2022 05:05:01 UTC

Severity: normal

Found in version 29.0.60

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

Full log


Message #11 received at 60110 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Jensen <aaronjensen <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 60110 <at> debbugs.gnu.org
Subject: Re: bug#60110: 29.0.60; ruby-mode method parameter alignment
Date: Sun, 18 Dec 2022 17:53:25 -0500
On Sun, Dec 18, 2022 at 5:32 PM Dmitry Gutov <dgutov <at> yandex.ru> wrote:
>
> I'm assuming the difference in indentation between these posted cases is
> just an email/bug tracker bug. If they are sometimes different, please
> let me know. That would be another bug.

I think so, yeah.

>
> > I would prefer to be able to indent them like this:
> >
> > def some_method(
> >    some_arg,
> >    some_other_arg
> > )
> > end
> >
> > def self.some_method(
> >    some_arg,
> >    some_other_arg
> > )
> > end
>
> See the attached patch. (setq ruby-method-params-indent 0) should do it.

Works for me.

Next question is... is there an existing setting to change the
indentation of expressions like:

x = [3,4].
      map { |x| x * 2 }

Like everything else, I just want a 2 space indent, no alignment,
nothing clever:

x = [3,4].
  map { |x| x * 2 }

I can open another issue for this if there's no existing option and
you'd like me to.

Thanks,

Aaron




This bug report was last modified 2 years and 149 days ago.

Previous Next


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