[Top][All Lists]

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

bug#42841: closed (28.0.50; [ruby-mode] ruby-{beginning,end}-of-block do

From: GNU bug Tracking System
Subject: bug#42841: closed (28.0.50; [ruby-mode] ruby-{beginning,end}-of-block doesn't work as is exepected if arguments of method is divided into multi line)
Date: Sat, 22 Aug 2020 13:31:02 +0000

Your message dated Sat, 22 Aug 2020 16:30:04 +0300
with message-id <f2b35d4a-47fb-c6c1-2342-9c2697ac2aae@yandex.ru>
and subject line Re: bug#42841: 28.0.50; [ruby-mode] 
ruby-{beginning,end}-of-block doesn't work as is exepected if arguments of 
method is divided into multi line
has caused the debbugs.gnu.org bug report #42841,
regarding 28.0.50; [ruby-mode] ruby-{beginning,end}-of-block doesn't work as is 
exepected if arguments of method is divided into multi line
to be marked as done.

(If you believe you have received this mail in error, please contact

42841: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42841
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.0.50; [ruby-mode] ruby-{beginning,end}-of-block doesn't work as is exepected if arguments of method is divided into multi line Date: Thu, 13 Aug 2020 16:17:22 +0900 (JST)
ruby-{beginning,end}-of-block doesn't work as is exepected if
arguments of method is divided into multi line. Following is a sample
code to reproduce the issue.

0001: class A
0002:   def foo
0003:     puts("aaa", "bbb")
0004:   end
0005: end
0007: class B
0008:   def foo
0009:     puts("aaa",
0010:          "bbb")
0011:   end
0012: end

At first let me assume point is on line 1 column 1. If I type 'C-M-n'
in this situmation, then point moves to line 5 column 1. And if I type
'C-M-p' then point moves back to line 1 column 1. This is just
expected behavior.

Next let me assume point is on line 7 column 1 and I type 'C-M-n'. The
expected behavior is that point moves to line 12 column 1. But what
really happens is that point moves to line 10 column 1 and following
error message is displayed in minibuffer.

Wrong type argument: number-or-marker-p, nil

In GNU Emacs 28.0.50 (build 1, x86_64-w64-mingw32)
 of 2020-08-13 built on ROLLING
Repository revision: d089c4fbfc8be432dc3015a99b4044dab0a0de97
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.18363
System Description: Microsoft Windows 10 Enterprise (v10.0.1909.18363.1016)

Recent messages:
Loading mime-setup...
Loading mail-mime-setup...done
gnus-mime-setup is not found.
emh-setup is not found.
Loading mime-setup...done
Loading uniquify...done
Turning on magit-auto-revert-mode...done
Loading c:/Emacs-master/share/emacs/site-lisp/magit/magit-version.el 
For information about GNU Emacs and the GNU system, type C-h C-a.
Package cl is deprecated

Configured using:
 'configure --prefix=/c/Emacs-master --without-dbus'

Configured features:

Important settings:
  value of $LANG: JPN
  locale-coding-system: cp932

Major mode: Fundamental

Minor modes in effect:
  global-magit-file-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
c:/Emacs-master/share/emacs/site-lisp/flim/md4 hides 
c:/Emacs-master/share/emacs/site-lisp/flim/hex-util hides 
c:/Emacs-master/share/emacs/site-lisp/flim/sasl hides 
c:/Emacs-master/share/emacs/site-lisp/flim/sasl-ntlm hides 
c:/Emacs-master/share/emacs/site-lisp/flim/sasl-digest hides 
c:/Emacs-master/share/emacs/site-lisp/flim/sasl-cram hides 
c:/Emacs-master/share/emacs/site-lisp/flim/ntlm hides 
c:/Emacs-master/share/emacs/site-lisp/flim/hmac-md5 hides 
c:/Emacs-master/share/emacs/site-lisp/flim/hmac-def hides 

(shadow mew-varsx mew-win32 mew-w3m w3m doc-view jka-compr image-mode
exif timezone w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-favicon
w3m-image tab-line w3m-proc w3m-util mew-auth mew-config mew-imap2
mew-imap mew-nntp2 mew-nntp mew-pop mew-smtp mew-ssl mew-ssh mew-net
mew-highlight mew-sort mew-fib mew-ext mew-refile mew-demo mew-attach
mew-draft mew-message mew-thread mew-virtual mew-summary4 mew-summary3
mew-summary2 mew-summary mew-search mew-pick mew-passwd mew-scan
mew-syntax mew-bq mew-smime mew-pgp mew-header mew-exec mew-mark
mew-mime mew-edit mew-decode mew-encode mew-cache mew-minibuf
mew-complete mew-addrbook mew-local mew-vars3 mew-vars2 mew-vars
mew-env mew-lang-jp mew-mule3 mew-mule mew-gemacs mew-key mew-func
mew-blvs mew-const mew emacsbug sendmail magit-version yaml-mode
mime-setup mail-mime-setup alist semi-setup path-util poe pym static
apel-ver product semi-def psvn advice edmacro kmacro wid-edit cl pp
elp ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init
ediff-util 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 sgml-mode dom nxml-util nxml-enc xmltok magit-submodule
magit-obsolete magit-blame magit-stash magit-bisect magit-push
magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-collab ghub-graphql treepy pcase gsexp
ghub url-http url-gw nsm url-auth url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
let-alist gnutls magit-files magit-refs magit-status magit package
browse-url url-handlers url-parse auth-source json map url-vars
magit-repos magit-apply magit-wip magit-log which-func imenu
magit-diff smerge-mode diff diff-mode magit-core magit-autorevert
autorevert filenotify magit-process magit-margin magit-mode git-commit
magit-git magit-section eieio eieio-core cl-macs eieio-loaddefs
magit-utils magit-popup format-spec crm log-edit easy-mmode message
rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa
derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date subr-x mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log
with-editor cl-extra help-mode seq byte-opt bytecomp byte-compile
cconv cl-seq shell pcomplete comint ansi-color ring server dash gv
cl-loaddefs cl-lib gitignore-mode gitconfig-mode conf-mode rx
gitattributes-mode thingatpt easymenu japan-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32
ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded 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
threads w32notify w32 multi-tty make-network-process emacs)

Memory information:
((conses 16 235298 9345)
 (symbols 48 24665 45)
 (strings 32 77463 2455)
 (string-bytes 1 2319270)
 (vectors 16 36327)
 (vector-slots 8 544019 21728)
 (floats 8 131 29)
 (intervals 56 864 403)
 (buffers 992 12))

--- End Message ---
--- Begin Message --- Subject: Re: bug#42841: 28.0.50; [ruby-mode] ruby-{beginning,end}-of-block doesn't work as is exepected if arguments of method is divided into multi line Date: Sat, 22 Aug 2020 16:30:04 +0300 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
Version: 28.1

On 22.08.2020 05:17, Yasuhiro KIMURA wrote:
From: Dmitry Gutov <dgutov@yandex.ru>
Subject: Re: bug#42841: 28.0.50; [ruby-mode] ruby-{beginning,end}-of-block 
doesn't work as is exepected if arguments of method is divided into multi line
Date: Sat, 22 Aug 2020 03:26:15 +0300

I can't seem to reproduce this. Even after some intensive testing.

Wrong type argument: number-or-marker-p, nil

Could you perhaps provide a backtrace?

Type M-x toggle-debug-on-error, then trigger the error again.

I started emacs with '-Q' option and got following backtrace.

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
   funcall-interactively(ruby-end-of-block 1)
   call-interactively(ruby-end-of-block nil nil)

Oh, okay, I see it now. Couldn't reproduce it before because my config contains this line:

  (setq ruby-deep-indent-paren (delete ?\( ruby-deep-indent-paren))

Which logically shouldn't have any effect because we're not doing any indentation, but unfortunately does.

So I'm going to go ahead and try to fix it by removing the offending code. From some moderate testing, this doesn't seem to have any actual effect on indentation (the non-SMIE variant), and fixes the error. Let's see whether we get any breakage reports later.

Commit 2725254ab5.

--- End Message ---

reply via email to

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