From unknown Sat Jun 14 03:53:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16996: 24.3.50; [ruby-mode] Incorrect indentation for implicit hash arguments Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Mar 2014 10:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16996 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 16996@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139462167730806 (code B ref -1); Wed, 12 Mar 2014 10:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Mar 2014 10:54:37 +0000 Received: from localhost ([127.0.0.1]:33921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNgnz-00080k-4m for submit@debbugs.gnu.org; Wed, 12 Mar 2014 06:54:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49421) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNgns-00080J-23 for submit@debbugs.gnu.org; Wed, 12 Mar 2014 06:54:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNgnj-00046N-1v for submit@debbugs.gnu.org; Wed, 12 Mar 2014 06:54:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:48687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNgni-00046H-UQ for submit@debbugs.gnu.org; Wed, 12 Mar 2014 06:54:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNgna-0006WL-82 for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 06:54:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNgnQ-00043B-4R for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 06:54:10 -0400 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]:33946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNgnP-00042k-Hr for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 06:54:00 -0400 Received: by mail-ea0-f170.google.com with SMTP id g15so4842277eak.15 for ; Wed, 12 Mar 2014 03:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:message-id:subject:mime-version:content-type; bh=70u6bcTnxLY4P0GVAWdL57veLZUisFvNPt7ywv19wlM=; b=Y2vuDiTEMmetCDKvNNruPg5zwxNH7OonMFMgiaSkeMjBTkgtt5GCMfPyEDgOLvxhY2 GwF6bnrhOwIz1Fq3EoWc434qdT6+J8wGY90QXa31fuDkKmkNfax5hS5reTUq67hjnH08 Smgj18aAvcovo+ARKdlGb1jNveTfKurbtTx12puyhVcLmMEA0GpH1Ox7eLwupd4kqTMv KL+MxHHsn3BR1D/F+Clv5ePZbUrdfKWBCFib+o908qaSjz6TFljr4jqemP0o/SIyTm7T HBZ2J3lCmOULddL2XQ0zDp90s+lb5CFeref/7pylxDEjD+7YrbGNpJ6qOm7pxOOYqfds HPOw== X-Received: by 10.15.53.135 with SMTP id r7mr2065795eew.102.1394621638151; Wed, 12 Mar 2014 03:53:58 -0700 (PDT) Received: from [10.0.1.2] (93-152-182-45.ddns.onlinedirect.bg. [93.152.182.45]) by mx.google.com with ESMTPSA id o5sm68563580eeg.8.2014.03.12.03.53.56 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 12 Mar 2014 03:53:57 -0700 (PDT) Date: Wed, 12 Mar 2014 12:53:57 +0200 From: Bozhidar Batsov Message-ID: <0CEC46C2A06B4B8DB6502F39A05D5E45@gmail.com> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="53203cc5_3b0fd379_22b" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --53203cc5_3b0fd379_22b Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline The following code is indented properly: top(x, { a: 1, b: 2 }) Removing the hash literal curly braces, however, breaks the indentation: top(1, a: 1, b: 2) Ideally the code would be indented like this for consistency's sake: top(1, a: 1, b: 2) I'm not sure, however, that we can do this for the Ruby 1.9 syntax, because a and b might very well be keyword args. On the other hand there's no ambiguity when using =>: top(1, :a => 1, :b => 2) top(1, :a => 1, :b => 2) In GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00) of 2014-03-04 on bozhidar-home.local Windowing system distributor `Apple', version 10.3.1265 Configured using: `configure --prefix=/usr/local/Cellar/emacs/HEAD --without-dbus --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --without-gnutls --with-ns --disable-ns-self-contained' Important settings: locale-coding-system: utf-8-unix Major mode: Ruby Minor modes in effect: subword-mode: t ruby-tools-mode: t inf-ruby-minor-mode: t diff-auto-refine-mode: t guru-mode: t erc-truncate-mode: t erc-spelling-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t global-flycheck-mode: t flycheck-mode: t which-function-mode: t flx-ido-mode: t ido-ubiquitous-mode: t winner-mode: t global-undo-tree-mode: t undo-tree-mode: t whitespace-mode: t global-anzu-mode: t anzu-mode: t projectile-global-mode: t projectile-mode: t flyspell-mode: t shell-dirtrack-mode: t volatile-highlights-mode: t global-hl-line-mode: t recentf-mode: t savehist-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-mode: t global-auto-revert-mode: t delete-selection-mode: t prelude-global-mode: t prelude-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-f C-f C-f C-f C-f C-f C-f C-k S t r i n g s-/ s-/ s-/ C s-/ t o s _ s SPC w i t h SPC a r g u m e n t s SPC s h o u l d SPC n o t SPC t r i g g e r SPC a n SPC o f e n f e n s e . SPC C-a C-f C-f C-f C-f C-f C-e C-c C-c P P l l q C-h C-a q s-r t e s t C-n C-n C-n C-n C-a C-k C-k C-k C-k C-k C-k C-k t o p ( , 1 , SPC 2 , SPC 3 , SPC : : a b : a : SPC 1 , C-j : b : SPC 2 C-e C-p C-p C-n C-e C-b C-b C-b C-b C-d SPC = > C-n C-b C-b C-b SPC = > C-a C-p C-p C-n C-n C-p C-p C-n C-e C-b C-b C-b C-b C-b C-b C-b C-b C-f { C-d C-SPC SPC SPC C-n C-b SPC } C-p C-p C-n C-a C-f C-f C-f C-f C-f C-f C-f C-d C-d C-d C-d C-d C-d C-n C-y C-a C-SPC C-e M-w C-p C-p C-p C-b C-b C-b a a : N C-n C-f C-f C-f C-f b : SPC 2 C-e C-e M-x r e p o r t e m a c s Recent messages: Reverting buffer `cider/README.md'. [3 times] Saving file /Users/bozhidar/projects/test.rb... Wrote /Users/bozhidar/projects/test.rb Mark set Indenting region...done Mark activated Source files should end with a newline (\n). Auto-saving...done Saving file /Users/bozhidar/projects/test.rb... Wrote /Users/bozhidar/projects/test.rb Load-path shadows: /Users/bozhidar/.emacs.d/elpa/flycheck-20140107.305/.dir-locals hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/gnus/.dir-locals /Users/bozhidar/.emacs.d/elpa/tabulated-list-20120406.2251/tabulated-list hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/emacs-lisp/tabulated-list Features: (shadow sort mail-extr emacsbug sendmail hippie-exp superword subword ruby-tools inf-ruby ruby-mode-expansions smartparens-ruby ruby-mode smie jka-compr rst eieio-opt speedbar sb-image ezimage dframe yaml-mode ffap url-parse url-vars executable misearch multi-isearch mule-util magit-key-mode magit view epa derived epg epg-config diff-mode git-rebase-mode git-commit-mode server log-edit message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log vc-git markdown-mode noutline outline rainbow-mode color rainbow-delimiters elisp-slime-nav guru-mode prelude-key-chord key-chord prelude-xml nxml-mode-expansions html-mode-expansions smartparens-html rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok prelude-scheme prelude-ruby prelude-perl prelude-org prelude-js prelude-erc erc-truncate erc-autoaway erc-spelling erc-notify erc-log erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track erc-match erc-button erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat prelude-emacs-lisp prelude-css prelude-common-lisp slime-autoloads prelude-clojure prelude-lisp prelude-c prelude-programming flycheck help-mode rx f which-func imenu prelude-ido smex flx-ido flx ido-ubiquitous warnings ido prelude-osx exec-path-from-shell prelude-global-keybindings prelude-editor winner undo-tree diff esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util re-builder whitespace browse-kill-ring midnight ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff dired-x dired anzu projectile pkg-info find-func grep compile s bookmark pp expand-region text-mode-expansions er-basic-expansions expand-region-custom expand-region-core flyspell ispell tramp tramp-compat auth-source gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color format-spec etags ring volatile-highlights hl-line windmove recentf tree-widget wid-edit savehist saveplace diminish smartparens-config smartparens autorevert filenotify delsel prelude-mode easy-mmode edmacro kmacro prelude-core epl advice help-fns dash thingatpt prelude-ui zenburn-theme prelude-packages finder-inf ace-jump-mode-autoloads ack-and-a-half-autoloads diminish-autoloads elisp-slime-nav-autoloads flx-autoloads eieio byte-opt bytecomp byte-compile cconv eieio-core grizzl-autoloads ido-ubiquitous-autoloads key-chord-autoloads logito-autoloads info easymenu move-text-autoloads rainbow-delimiters-autoloads rainbow-mode-autoloads request-autoloads cl-macs gv caml-autoloads volatile-highlights-autoloads yaml-mode-autoloads package cl cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs) --53203cc5_3b0fd379_22b Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

The following code is indented pr= operly:

top(x, =7B a: 1,
   =      b: 2 =7D)

Removing the hash= literal curly braces, however, breaks the indentation:

top(1, a: 1,
    b: 2)

Ideally the code would be indented like this for consistency's sake:

top(1, a: 1,
       = ;b: 2)

I'm not sure, however, that we can do thi= s for the Ruby 1.9 syntax,
because a and b might very well be k= eyword args. On the other hand
there's no ambiguity when using = =3D>:

top(1, :a =3D> 1,
  &= nbsp; :b =3D> 2)

top(1, :a =3D> 1,
       :b =3D> 2)


=

In GNU Emacs 24.3.50.1 (x86=5F64-apple-darwin13= .0.0, NS apple-appkit-1265.00)
 of 2014-03-04 on bozhidar-= home.local
Windowing system distributor =60Apple', version 10.3= .1265
Configured using:
 =60configure --prefix=3D= /usr/local/Cellar/emacs/HEAD --without-dbus
 --enable-loca= llisppath=3D/usr/local/share/emacs/site-lisp
 --infodir=3D= /usr/local/Cellar/emacs/HEAD/share/info/emacs
 --without-g= nutls --with-ns --disable-ns-self-contained'

Imp= ortant settings:
  locale-coding-system: utf-8-unix
<= div>
Major mode: Ruby

Minor modes = in effect:
  subword-mode: t
  ruby-tools-m= ode: t
  inf-ruby-minor-mode: t
  diff-auto= -refine-mode: t
  guru-mode: t
  erc-trunca= te-mode: t
  erc-spelling-mode: t
  erc-lis= t-mode: t
  erc-menu-mode: t
  erc-autojoin= -mode: t
  erc-ring-mode: t
  erc-networks-= mode: t
  erc-pcomplete-mode: t
  erc-track= -mode: t
  erc-match-mode: t
  erc-button-m= ode: t
  erc-fill-mode: t
  erc-stamp-mode:= t
  erc-netsplit-mode: t
  erc-irccontrols= -mode: t
  erc-noncommands-mode: t
  erc-mo= ve-to-prompt-mode: t
  erc-readonly-mode: t
&nbs= p; global-flycheck-mode: t
  flycheck-mode: t
&n= bsp; which-function-mode: t
  flx-ido-mode: t
&n= bsp; ido-ubiquitous-mode: t
  winner-mode: t
&nb= sp; global-undo-tree-mode: t
  undo-tree-mode: t
  whitespace-mode: t
  global-anzu-mode: t
  anzu-mode: t
  projectile-global-mode: t
  projectile-mode: t
  flyspell-mode: t
&n= bsp; shell-dirtrack-mode: t
  volatile-highlights-mode: t<= /div>
  global-hl-line-mode: t
  recentf-mode: t<= /div>
  savehist-mode: t
  show-smartparens-globa= l-mode: t
  show-smartparens-mode: t
  smar= tparens-mode: t
  global-auto-revert-mode: t
&nb= sp; delete-selection-mode: t
  prelude-global-mode: t
  prelude-mode: t
  tooltip-mode: t
&= nbsp; electric-indent-mode: t
  mouse-wheel-mode: t
<= div>  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t=
  auto-composition-mode: t
  auto-encrypti= on-mode: t
  auto-compression-mode: t
  siz= e-indication-mode: t
  column-number-mode: t
&nb= sp; line-number-mode: t
  transient-mark-mode: t

Recent input:
C-f C-f C-f C-f C-f C-f C-f C-k S= t r i n g s-/ s-/
s-/ <backspace> C s-/ <return> &= lt;return> t o s <backspace>
=5F s SPC w i t h SPC a r= g u m e n t s SPC s h o u l
d SPC n o t SPC t r i g g e r SPC = a n SPC o f e n <backspace>
<backspace> f e n s e .= SPC <backspace> C-a C-f C-f
C-f C-f C-f C-e C-c C-c P P = l l q <help-echo> <help-echo>
<help-echo> <= ;help-echo> <down-mouse-1> <mouse-1> C-h
C-a q s= -r t e s t <return> C-n C-n C-n C-n C-a C-k
C-k C-k C-k C= -k C-k C-k <return> <return> t o p ( ,
<backspac= e> 1 , SPC 2 , SPC 3 , SPC : <backspace> :
a <backs= pace> <backspace> b <backspace> : <backspace>
<= div>a : SPC 1 , C-j <tab> : <backspace> b : SPC 2 <tab>=
C-e C-p C-p C-n C-e C-b C-b C-b C-b C-d SPC =3D > C-n
=
C-b C-b C-b <backspace> SPC =3D > C-a <tab> C-p C-p C= -n
C-n <tab> C-p C-p C-n C-e C-b C-b C-b C-b C-b C-b C-b<= /div>
C-b C-f =7B C-d C-SPC SPC SPC C-n <tab> C-b SPC =7D <t= ab>
C-p C-p C-n C-a C-f C-f C-f C-f C-f C-f C-f C-d C-d
C-d C-d C-d C-d C-n <tab> <help-echo> <help-echo>= <help-echo>
<help-echo> <help-echo> <down= -mouse-1> <mouse-1> <return>
C-y C-a C-SPC C-e M= -w C-p C-p C-p C-b C-b C-b <backspace>
<backspace> = <backspace> <backspace> a <backspace> a
: N &= lt;backspace> C-n C-f C-f C-f C-f <backspace> <backspace><= /div>
<backspace> <backspace> <backspace> <backs= pace> <backspace>
b : SPC 2 <tab> C-e C-e <he= lp-echo> <help-echo> <down-mouse-1>
<drag-mou= se-1> <down-mouse-1> <mouse-1> M-x r e p o
r t e= m a c s <return>

Recent messages:
Reverting buffer =60cider/README.md'. =5B3 times=5D
Saving f= ile /Users/bozhidar/projects/test.rb...
Wrote /Users/bozhidar/p= rojects/test.rb
Mark set
Indenting region...done
Mark activated
Source files should end with a newline (=5C= n).
Auto-saving...done
Saving file /Users/bozhidar/pr= ojects/test.rb...
Wrote /Users/bozhidar/projects/test.rb
<= div>
Load-path shadows:
/Users/bozhidar/.emacs.d/= elpa/flycheck-20140107.305/.dir-locals hides /usr/local/Cellar/emacs/HEAD= /share/emacs/24.3.50/lisp/gnus/.dir-locals
/Users/bozhidar/.ema= cs.d/elpa/tabulated-list-20120406.2251/tabulated-list hides /usr/local/Ce= llar/emacs/HEAD/share/emacs/24.3.50/lisp/emacs-lisp/tabulated-list
<= div>
=46eatures:
(shadow sort mail-extr emacsbug = sendmail hippie-exp superword subword
ruby-tools inf-ruby ruby-= mode-expansions smartparens-ruby ruby-mode smie
jka-compr rst e= ieio-opt speedbar sb-image ezimage dframe yaml-mode ffap
url-pa= rse url-vars executable misearch multi-isearch mule-util
magit-= key-mode magit view epa derived epg epg-config diff-mode
git-re= base-mode git-commit-mode server log-edit message rfc822 mml
mm= l-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util a= dd-log
vc-git markdown-mode noutline outline rainbow-mode color=
rainbow-delimiters elisp-slime-nav guru-mode prelude-key-chord= key-chord
prelude-xml nxml-mode-expansions html-mode-expansion= s smartparens-html
rng-nxml rng-valid rng-loc rng-uri rng-parse= nxml-parse rng-match rng-dt
rng-util rng-pttrn nxml-ns nxml-mo= de nxml-outln nxml-rap nxml-util
nxml-glyph nxml-enc xmltok pre= lude-scheme prelude-ruby prelude-perl
prelude-org prelude-js pr= elude-erc erc-truncate erc-autoaway
erc-spelling erc-notify erc= -log erc-list erc-menu erc-join erc-ring
erc-networks erc-pcomp= lete erc-track erc-match erc-button erc-fill
erc-stamp erc-nets= plit erc-goodies erc erc-backend erc-compat
prelude-emacs-lisp = prelude-css prelude-common-lisp slime-autoloads
prelude-clojure= prelude-lisp prelude-c prelude-programming flycheck
help-mode = rx f which-func imenu prelude-ido smex flx-ido flx
ido-ubiquito= us warnings ido prelude-osx exec-path-from-shell
prelude-global= -keybindings prelude-editor winner undo-tree diff esh-var
esh-i= o esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell
<= div>esh-module esh-mode esh-util re-builder whitespace browse-kill-ring
midnight ediff-merg ediff-wind ediff-diff ediff-mult ediff-help<= /div>
ediff-init ediff-util ediff dired-x dired anzu projectile pkg-i= nfo
find-func grep compile s bookmark pp expand-region text-mod= e-expansions
er-basic-expansions expand-region-custom expand-re= gion-core flyspell
ispell tramp tramp-compat auth-source gnus-u= til mm-util mail-prsvr
password-cache tramp-loaddefs trampver s= hell pcomplete comint ansi-color
format-spec etags ring volatil= e-highlights hl-line windmove recentf
tree-widget wid-edit save= hist saveplace diminish smartparens-config
smartparens autoreve= rt filenotify delsel prelude-mode easy-mmode edmacro
kmacro pre= lude-core epl advice help-fns dash thingatpt prelude-ui
zenburn= -theme prelude-packages finder-inf ace-jump-mode-autoloads
ack-= and-a-half-autoloads diminish-autoloads elisp-slime-nav-autoloads
flx-autoloads eieio byte-opt bytecomp byte-compile cconv eieio-core
grizzl-autoloads ido-ubiquitous-autoloads key-chord-autoloads
logito-autoloads info easymenu move-text-autoloads
rainb= ow-delimiters-autoloads rainbow-mode-autoloads request-autoloads
cl-macs gv caml-autoloads volatile-highlights-autoloads
yaml-= mode-autoloads package cl cl-loaddefs cl-lib time-date tooltip
= electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win
=
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomme= nt
lisp-mode prog-mode register page menu-bar rfn-eshadow timer= select
scroll-bar mouse jit-lock font-lock syntax facemenu fon= t-core frame cham
georgian utf-8-lang misc-lang vietnamese tibe= tan thai tai-viet lao
korean japanese hebrew greek romanian slo= vak czech european ethiopic
indian cyrillic chinese case-table = epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice lo= addefs button faces cus-face macroexp files
text-properties ove= rlay sha1 md5 base64 format env code-pages mule
custom widget h= ashtable-print-readable backquote make-network-process
cocoa ns= multi-tty emacs)

--53203cc5_3b0fd379_22b-- From unknown Sat Jun 14 03:53:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16996: 24.3.50; [ruby-mode] Incorrect indentation for implicit hash arguments Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Mar 2014 15:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16996 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Bozhidar Batsov Cc: 16996@debbugs.gnu.org Received: via spool by 16996-submit@debbugs.gnu.org id=B16996.13946374967185 (code B ref 16996); Wed, 12 Mar 2014 15:19:02 +0000 Received: (at 16996) by debbugs.gnu.org; 12 Mar 2014 15:18:16 +0000 Received: from localhost ([127.0.0.1]:34778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNkv9-0001rn-9M for submit@debbugs.gnu.org; Wed, 12 Mar 2014 11:18:15 -0400 Received: from mail-ea0-f175.google.com ([209.85.215.175]:44523) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNkv6-0001rd-Ml for 16996@debbugs.gnu.org; Wed, 12 Mar 2014 11:18:13 -0400 Received: by mail-ea0-f175.google.com with SMTP id d10so4984609eaj.20 for <16996@debbugs.gnu.org>; Wed, 12 Mar 2014 08:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=0unalGJWwTgMtuZjPy41813xBCaEhs9kaS5ppDStTeg=; b=YFX2T+pEoT4i9X+Hk+WcN+hzC7Qg3MY5r0HTWu/eYWlzYR34t3JU6D1dFhA67I6Zq/ BT0+mk7nl5zthaTdapwUPiC7XjRLWDUijL0Gh4dqcd/LK+Uh/vLziNI5QYgq3/bRHqle lsSZtq/N6lxjAbxbhIDsFBRZ6+ugmuFmFl8IThAWUywHcaFT+hGIdtIT++91LLI2aRyF P/Gs0O8/5xOPBkV2Nt9KtgKNj1pLs4kKN15KknN+lcEYQZ1qxZ4Sy/adcZih9Oz08vrK gIkvSBEt+z2V4nul3aQEWnxoFXKEgPvQ8nohUPseb4vg8ciP1c/6xO1736BKPmbM0nrG +e4g== X-Received: by 10.14.207.68 with SMTP id m44mr4434882eeo.79.1394637491810; Wed, 12 Mar 2014 08:18:11 -0700 (PDT) Received: from axl (83-12-07.netrunf.cytanet.com.cy. [83.168.12.7]) by mx.google.com with ESMTPSA id 43sm70960640eeh.13.2014.03.12.08.18.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Mar 2014 08:18:10 -0700 (PDT) From: Dmitry Gutov References: <0CEC46C2A06B4B8DB6502F39A05D5E45@gmail.com> Date: Wed, 12 Mar 2014 17:18:01 +0200 In-Reply-To: <0CEC46C2A06B4B8DB6502F39A05D5E45@gmail.com> (Bozhidar Batsov's message of "Wed, 12 Mar 2014 12:53:57 +0200") Message-ID: <87eh278mza.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Bozhidar Batsov writes: > top(1, :a => 1, > :b => 2) > > top(1, :a => 1, > :b => 2) This looks like something that would be pretty gnarly to implement. I'm not sure if we want to. Here's another example: top(1, { :a => 1, :b => 2 }) If we remove the braces, would you still indent :a and :b like if the braces were present? From unknown Sat Jun 14 03:53:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16996: 24.3.50; [ruby-mode] Incorrect indentation for implicit hash arguments Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2021 08:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16996 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 16996@debbugs.gnu.org, Bozhidar Batsov Received: via spool by 16996-submit@debbugs.gnu.org id=B16996.162227851729099 (code B ref 16996); Sat, 29 May 2021 08:56:02 +0000 Received: (at 16996) by debbugs.gnu.org; 29 May 2021 08:55:17 +0000 Received: from localhost ([127.0.0.1]:55978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmukW-0007ZG-OM for submit@debbugs.gnu.org; Sat, 29 May 2021 04:55:16 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmukS-0007Yk-Qq for 16996@debbugs.gnu.org; Sat, 29 May 2021 04:55:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=le3t4LtgCOa1Cb5jmdst9DMP3S3eOCAlwSVduDPYQBU=; b=APdwWTmBtKtGXdywqEAORr6mR2 qlTtHqi0LPRQ9HuMxi5wiQ0yiHAnkxFGXzmQpvBec3fmcqdYwaUwAaMSQMhXfB4QxdUM4K/KgAN8s ornHFRWgwmiSZ1HiVPJeNX3unUiEuGdFtGdAAaUKIsUYLJUXS6OS+/Y+3d//V0lybCh0=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmukJ-0003lh-Ld; Sat, 29 May 2021 10:55:06 +0200 From: Lars Ingebrigtsen References: <0CEC46C2A06B4B8DB6502F39A05D5E45@gmail.com> <87eh278mza.fsf@yandex.ru> X-Now-Playing: Joni Mitchell's _Mingus_: "A Chair In The Sky" Date: Sat, 29 May 2021 10:55:02 +0200 In-Reply-To: <87eh278mza.fsf@yandex.ru> (Dmitry Gutov's message of "Wed, 12 Mar 2014 17:18:01 +0200") Message-ID: <87zgwd7wd5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: > Bozhidar Batsov writes: > >> top(1, :a => 1, >> :b => 2) >> >> top(1, :a => 1, >> :b => 2) > > This looks like something that would be pretty gnarly to implement. I'm > not sur [...] Content analysis details: (-1.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 URIBL_SBL_A Contains URL's A record listed in the Spamhaus SBL blocklist [URIs: batsov.com] 1.0 URIBL_SBL Contains an URL's NS IP listed in the Spamhaus SBL blocklist [URIs: batsov.com] X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Dmitry Gutov writes: > Bozhidar Batsov writes: > >> top(1, :a => 1, >> :b => 2) >> >> top(1, :a => 1, >> :b => 2) > > This looks like something that would be pretty gnarly to implement. I'm > not sure if we want to. Here's another example: > > top(1, { > :a => 1, > :b => 2 > }) > > If we remove the braces, would you still indent :a and :b like if the > braces were present? The current indentation in Ruby here seems pretty natural to me, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat May 29 04:55:21 2021 Received: (at control) by debbugs.gnu.org; 29 May 2021 08:55:21 +0000 Received: from localhost ([127.0.0.1]:55980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmuka-0007ZW-Vd for submit@debbugs.gnu.org; Sat, 29 May 2021 04:55:21 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmukW-0007Yy-C3 for control@debbugs.gnu.org; Sat, 29 May 2021 04:55:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+tBLs3PfQi/sG87duyR5D00nma0rOjwfWvZUwSzVfoE=; b=p4E8RqCvLCZbyyFGbznODkstUz 8n5yNwIMHNcR4iZmLnuGD00BlCgQS/5zwycusMoCHjCjfws47tRIq3V7l3O1hL+YVGAjOe4pEQubb Bk5P7E0OPzHYn8XgoKzi8m+/p9GRRdiiXDpDPRpnZbEclGKq3RhK0EdsYEOlX3nDpbyM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmukO-0003lt-ST for control@debbugs.gnu.org; Sat, 29 May 2021 10:55:10 +0200 Date: Sat, 29 May 2021 10:55:08 +0200 Message-Id: <87y2bx7wcz.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #16996 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 16996 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 16996 quit From unknown Sat Jun 14 03:53:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16996: 24.3.50; [ruby-mode] Incorrect indentation for implicit hash arguments Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2021 18:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16996 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 16996@debbugs.gnu.org, Bozhidar Batsov Received: via spool by 16996-submit@debbugs.gnu.org id=B16996.162231273113740 (code B ref 16996); Sat, 29 May 2021 18:26:01 +0000 Received: (at 16996) by debbugs.gnu.org; 29 May 2021 18:25:31 +0000 Received: from localhost ([127.0.0.1]:57709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln3eN-0003ZY-Li for submit@debbugs.gnu.org; Sat, 29 May 2021 14:25:31 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:36821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln3eM-0003ZM-VI for 16996@debbugs.gnu.org; Sat, 29 May 2021 14:25:31 -0400 Received: by mail-wm1-f46.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so6343443wmk.1 for <16996@debbugs.gnu.org>; Sat, 29 May 2021 11:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Q0r1D8NT+E5/prrT8hA/D4yRhJbRZOwCzM0RNUWSfLU=; b=XuYoLRI4WVgltV/Q5noslj9bbYUZfg02evrutdYc/fPr9IsVEv0QJnAxhVu/cvlzB/ s7nDlhOzj4hvmXN947X0EphCSPK76jjMvPXCO61nFmr/munLCX2RUmikuG0+GDrDJtT/ +A25FZJRkxNLMPDU8oPok75SqzeXjky+rl9uvVTMU4kLEnCJjTwXlapo4+1+MIZrEAgq 1xIf/Aafy0HZwXAZglukJw+162N3wiZXkARM9AM8x0EfcH13QX0CimvBXTLHlBsSEyJv 9V8XHnn7I9eVNNxnE3prfxcNGZWVeA/k+ZM/sXtsLnBP0WwI1gmCDwfzP8fJDRWNe85+ evcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Q0r1D8NT+E5/prrT8hA/D4yRhJbRZOwCzM0RNUWSfLU=; b=Zfggr6zXEKoX8E7gbiYyKAMw+k2lCEVAmveZ0sEuVhFClOGFEED+Ze7iG8MZ8iljrr ux2pwaw0D0dMA0UCqybhEBQrcJbT1rREjTFpBAFX5wql20Q+ls9tUgBHnlWTGDyWJkR+ W3Pq8O1j6fOME5NOKk4nQ1qwcMgTZfqTDAtfyP88FZiKjWM2rJDQCnkRItg1d/ztk+nI QqkRTjiBsDOt7Tdfa6bAc4y6IRbDpcHuCJHl+rEgvj3XMUJuHDmWtPNSemjbPr+XiesP Td5NNYY2T81QCUETTRp9Uu5rkIK5M5cb6uvJdHhclnzEHv6udTYpv6ooO9J0EU2vEu4o DoZA== X-Gm-Message-State: AOAM530x+pNaWLoBU9NalixG1tJdelrgIHBMUnfg6VblFKZjE/CTNMHP HItr3L9o6T+TuJ8y9XYldb2HETGpuKE= X-Google-Smtp-Source: ABdhPJxJW1AevL/+ddQTENZfPQp8sSJIFsAxrZu0GGK87gwJi1H+8+39OivwRJVeP2eF8HeKgLa9+A== X-Received: by 2002:a05:600c:1910:: with SMTP id j16mr13503983wmq.39.1622312724921; Sat, 29 May 2021 11:25:24 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id v15sm17990984wmj.39.2021.05.29.11.25.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 May 2021 11:25:24 -0700 (PDT) References: <0CEC46C2A06B4B8DB6502F39A05D5E45@gmail.com> <87eh278mza.fsf@yandex.ru> <87zgwd7wd5.fsf@gnus.org> From: Dmitry Gutov Message-ID: Date: Sat, 29 May 2021 21:25:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87zgwd7wd5.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 29.05.2021 11:55, Lars Ingebrigtsen wrote: > The current indentation in Ruby here seems pretty natural to me, so I'm > closing this bug report. We should probably reopen it. It's not very urgent (as the bug creation date will confirm), but I wanted to get around to this someday. Bozhidar, could you confirm it's still needed (or good to have)? I wanted to find some style guide or other solid description of this style, but haven't managed to. Ruby Style Guide strategically avoids this example, and https://www.rubydoc.info/gems/rubocop/0.83.0/RuboCop/Cop/Layout/HashAlignment and https://www.rubydoc.info/gems/rubocop/0.83.0/RuboCop/Cop/Layout/ArgumentAlignment do that too. Despite that, I actually have to deal with this implicit recommendation on a regular basis at work, because when both cops are enabled, Rubocop will frown on top(1, :a => 1, :b => 2 and top 1, a: 1, b: 2 I do remember style like top(1, :a => 1, :b => 2) being popular back in the day, but AFAICT a lot of editors now (like Atom and VS Code) don't support it either. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 30 08:16:30 2021 Received: (at control) by debbugs.gnu.org; 30 Jun 2021 12:16:30 +0000 Received: from localhost ([127.0.0.1]:56646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZ8o-00061T-9x for submit@debbugs.gnu.org; Wed, 30 Jun 2021 08:16:30 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZ8l-000613-Tq for control@debbugs.gnu.org; Wed, 30 Jun 2021 08:16:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lKPj85tI+vK56YMSRdNhzn8h47WVjdPo6O2BeemTyI0=; b=b1WcYIphHoWUDcb2dGpHUCb15p /prtbe5Z0fEzdKM/SWVWVb9N6LnYj2Qcuj2NE/Yy2EZTfezmuymld5SB+wh336pQOZ6UunO40tATM EXoUBan6nTKt+etU3aGtVEcSlPTQF7vbDHoy8n7sJ4hTqJNdqww3DlTc+K2A4v9MO+dM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyZ8e-0001T1-HX for control@debbugs.gnu.org; Wed, 30 Jun 2021 14:16:22 +0200 Date: Wed, 30 Jun 2021 14:16:20 +0200 Message-Id: <877dib8s4r.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #16996 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: unarchive 16996 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) unarchive 16996 quit From unknown Sat Jun 14 03:53:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16996: 24.3.50; [ruby-mode] Incorrect indentation for implicit hash arguments Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jul 2021 01:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16996 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Bozhidar Batsov Cc: 16996@debbugs.gnu.org, Lars Ingebrigtsen Received: via spool by 16996-submit@debbugs.gnu.org id=B16996.162657033528092 (code B ref 16996); Sun, 18 Jul 2021 01:06:02 +0000 Received: (at 16996) by debbugs.gnu.org; 18 Jul 2021 01:05:35 +0000 Received: from localhost ([127.0.0.1]:54906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4vFO-0007J1-Vb for submit@debbugs.gnu.org; Sat, 17 Jul 2021 21:05:35 -0400 Received: from mail-ed1-f52.google.com ([209.85.208.52]:41751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4vFN-0007Io-Hm for 16996@debbugs.gnu.org; Sat, 17 Jul 2021 21:05:34 -0400 Received: by mail-ed1-f52.google.com with SMTP id w14so18148347edc.8 for <16996@debbugs.gnu.org>; Sat, 17 Jul 2021 18:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=u7BjtEEEMeFtoGG5q+8JaWZQDZb0SlK/06o8EDrakWY=; b=MdE+daE3GHWxaQD0ArUYbUEJ0cz0kz1l0n2gIlzxjTzMMjZECZ4FCV9BxFhIEwsj+J HtitUcyjNlPJlMHIaMo5iEqAX7SfHe/PusuHNYejduuqMAhnoKurYpM4J2vzromzDHTR rLNiVVI2XCaHr741Y7z9BNIAfIVN144KBGD2JJBpu8UqbA8ot38L8a51kt1aaXGifd98 Xo0i+DF7A42j8x7XGcNtQgiNC6WsAFnycthXgkEmhItS4a2XmfQ4wiw7fPVGm8vDCr+N n/MhFo/FJQG/T8IT8K+lOazhGsSHPoKRNFcFtCMyF2kSPFpi0/6tEgco2SdcApjExI0S e/jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=u7BjtEEEMeFtoGG5q+8JaWZQDZb0SlK/06o8EDrakWY=; b=JmMn2a9bOh+ovBqO1ODtLa9oxrbbYvrraG6xPYQO+kX0urOH5Jsqa3YUQhbQtBMB6+ VvR0j3wD+9Bz51/pxjMV+BkQ1ghxW/ARhTloUytIDZHjXmqQd4Mi89nNlO2PEUpy78zN qlP0wkE4g/uLQ4Sxwm67bGT8EOOzx5QJ28lAQODkqyN9w0Q3lwjAGLzjiEi8ONRZcsf4 Q9Uwb6i2rh2yr4G+7DePc/gGS9DCvQYqG2MNLOi+ToQm9li7ZcY2b/FkO1pzhmGhGGIe jFL0OXLoYTF+8ytglZvnFcVcAqTuY4G3eHtZsH8HkaMzAxgk3K1eCmwZPOyE9zqm0pgs JITg== X-Gm-Message-State: AOAM533AwmB23fD+FI6R5lcOLWMRC/CE3bbNG2Id90b4XMiYchRrtZmT 9KVyi18rP6kAyW9vzJ96Uq4gZMi3Js0= X-Google-Smtp-Source: ABdhPJwEwjjbjBlICLiX/SNPXFnEZI3upSXOrvyj4sKfQGTIuh9SF6YluLYNWBt/6UYx96UYHf6j/g== X-Received: by 2002:a05:6402:144f:: with SMTP id d15mr25056865edx.27.1626570327764; Sat, 17 Jul 2021 18:05:27 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id v11sm4361562ejx.104.2021.07.17.18.05.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 17 Jul 2021 18:05:26 -0700 (PDT) References: <0CEC46C2A06B4B8DB6502F39A05D5E45@gmail.com> <87eh278mza.fsf@yandex.ru> <87zgwd7wd5.fsf@gnus.org> From: Dmitry Gutov Message-ID: <3d615d6e-9848-cb11-6257-25f3a15bfd95@yandex.ru> Date: Sun, 18 Jul 2021 04:05:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 30.06.2021 11:25, Bozhidar Batsov wrote: > Sorry for the slow responses. Same. :-( > On Sat, 29 May 2021 at 21:25, Dmitry Gutov > wrote: > > On 29.05.2021 11:55, Lars Ingebrigtsen wrote: > > The current indentation in Ruby here seems pretty natural to me, > so I'm > > closing this bug report. > > We should probably reopen it. It's not very urgent (as the bug creation > date will confirm), but I wanted to get around to this someday. > > Bozhidar, could you confirm it's still needed (or good to have)? > > I wanted to find some style guide or other solid description of this > style, but haven't managed to. > > > Perhaps we should first discuss our options there and adjust ruby-mode > afterwards? It's always a bit painful to discuss indentation issues over > email. :D I'm happy to do that anywhere. You can ping me on Discord too. > Ruby Style Guide strategically avoids this example, and > https://www.rubydoc.info/gems/rubocop/0.83.0/RuboCop/Cop/Layout/HashAlignment > > > and > https://www.rubydoc.info/gems/rubocop/0.83.0/RuboCop/Cop/Layout/ArgumentAlignment > > > do that too. > > > Most likely that's just an oversight. People tend to focus on the most > common scenarios. I was also thinking that perhaps you had been unfortunately biased toward not explicitly recommending a style which ruby-mode cannot support. :( > Despite that, I actually have to deal with this implicit recommendation > on a regular basis at work, because when both cops are enabled, Rubocop > will frown on > >    top(1, :a => 1, >      :b => 2 > > and > >    top 1, a: 1, >        b: 2 > > > You get those offenses for fixed indentation? For align that seems like > an offense indeed, but for fixed it seems quite natural. What's a "fixed indentation"? In both of the above cases I get complaints from the Layout/HashAlignment cop. I think we're using its default config. > I do remember style like > >    top(1, :a => 1, >           :b => 2) > > being popular back in the day, but AFAICT a lot of editors now (like > Atom and VS Code) don't support it either. > > > I have to admit that I always stick to: > >  top(1, >        :a => 1, >        :b => 2) Likewise, if only out of necessity. > Still, the second option seems somewhat reasonable if you're into mixing > argument types on the same line, although probably aligning on the hash > keys would be better for the readability of the code. Probably > your example makes even more sense for keyword arguments. Sure. Depending on the code, or particular invocation, I could see either style being more reasonable than the other.