unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 16182@debbugs.gnu.org
Subject: bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens
Date: Thu, 19 Dec 2013 06:57:29 +0200	[thread overview]
Message-ID: <87ob4dv3nq.fsf@yandex.ru> (raw)
In-Reply-To: <jwvk3f2l4ez.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Wed, 18 Dec 2013 07:42:27 -0500")

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>   Status.create!({
>>     user: current_user,
>>     text: params[:status]
>>   })
>
> This looks fine.

This is not hard to support (add some `skip-syntax-forward' before the
relevant `smie-indent--hanging-p' call), but does it make sense to
indent this call one way, and when the first argument does not start
with a hanging paren (like `self', in the example below), do it
differently?

>>   methods.each do |method|
>>     route_set.add_route(self, {
>>       path_info: route.route_compiled,
>>       request_method: method,
>>     }, route_info: route)
>>   end

> But this looks confusing to me.  If (as a coder) I wanted to keep the
> code "not too deeply indented", I'd use something like:
>
>    methods.each do |method|
>      route_set.add_route(
>        self,
>        { path_info: route.route_compiled,
>          request_method: method, },
>        route_info: route)
>    end

I agree it makes sense, but this change could be not entirely obvious to
users not familiar with Emacs indentation engines.

> But that's just me (and I haven't checked to see if the current
> indenter would get this right).

It does now.





  reply	other threads:[~2013-12-19  4:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  3:55 bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens Dmitry Gutov
     [not found] ` <handler.16182.B.138733895212351.ack@debbugs.gnu.org>
2013-12-18  4:05   ` bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens) Dmitry Gutov
2013-12-18 10:31     ` Bozhidar Batsov
2013-12-19  4:35       ` Dmitry Gutov
2013-12-19  9:08         ` Bozhidar Batsov
2013-12-19 12:54           ` Bozhidar Batsov
2013-12-19 17:15             ` Dmitry Gutov
2013-12-19 20:33               ` Bozhidar Batsov
2013-12-19 20:42                 ` Steve Purcell
2013-12-20  5:21                 ` Dmitry Gutov
2013-12-20  9:51                   ` Bozhidar Batsov
2013-12-20 11:57                     ` Dmitry Gutov
2013-12-20 15:46                       ` Bozhidar Batsov
2013-12-21 15:31                         ` Dmitry Gutov
2013-12-21 15:38                           ` Steve Purcell
2013-12-21 15:53                             ` Dmitry Gutov
2013-12-21 16:49                               ` Steve Purcell
2013-12-21 19:32                           ` Adam Doppelt
2013-12-22  2:01                             ` Dmitry Gutov
2013-12-19 13:47           ` Dmitry Gutov
2013-12-18 12:42 ` bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens Stefan Monnier
2013-12-19  4:57   ` Dmitry Gutov [this message]
2013-12-19 13:47     ` Stefan Monnier
2013-12-18 17:57 ` bug#16182: Adam Sokolnicki
2013-12-19  4:48   ` bug#16182: Dmitry Gutov
2013-12-19 18:39 ` bug#16182: Adam Doppelt
2013-12-20 12:44 ` bug#16182: Adam Sokolnicki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ob4dv3nq.fsf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=16182@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).