GNU bug report logs - #17213
24.3.50; ruby-mode: misindented continuation method calls inside parens

Previous Next

Package: emacs;

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

Date: Mon, 7 Apr 2014 02:47: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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17213 in the body.
You can then email your comments to 17213 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17213; Package emacs. (Mon, 07 Apr 2014 02:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 07 Apr 2014 02:47:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
 ruby-mode: misindented continuation method calls inside parens
Date: Mon, 07 Apr 2014 05:45:27 +0300
Example:

abc(foo
     .bar,
    tee
     .qux)

The lines with dots should be indented one column more.

Same if I move either dot to the end of the previous line, but keep the
called methods where they are.

I can fix that for the second method call with the patch at the bottom,
but the first one is unaffected. Not sure what would be the best fix for
it.

On a related note, it's worrisome that indentation of the these two
similar pieces of code in fairly similar positions is governed by
different logic.


=== modified file 'lisp/progmodes/ruby-mode.el'
--- lisp/progmodes/ruby-mode.el	2014-03-27 08:21:15 +0000
+++ lisp/progmodes/ruby-mode.el	2014-04-04 03:28:12 +0000
@@ -658,7 +658,7 @@
     (`(:before . ".")
      (if (smie-rule-sibling-p)
          (and ruby-align-chained-calls 0)
-       ruby-indent-level))
+       (smie-rule-parent ruby-indent-level)))
     (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure"))
      (smie-rule-parent))
     (`(:before . "when")





Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Sun, 13 Mar 2016 23:51:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Sun, 13 Mar 2016 23:51:02 GMT) Full text and rfc822 format available.

Message #10 received at 17213-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: 17213-done <at> debbugs.gnu.org
Subject: Re: bug#17213: Acknowledgement (24.3.50; ruby-mode: misindented
 continuation method calls inside parens)
Date: Mon, 14 Mar 2016 01:50:21 +0200
Pushed a workaround in 5b705bc97d3928e6550d271c415c54e00e020011 to emacs-25.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Apr 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 132 days ago.

Previous Next


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