all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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
@ 2020-08-13  7:17 Yasuhiro KIMURA
  2020-08-22  0:26 ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Yasuhiro KIMURA @ 2020-08-13  7:17 UTC (permalink / raw)
  To: 42841

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
0006:
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 (source)...done
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:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS PDUMPER

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/28.0.50/lisp/md4
c:/Emacs-master/share/emacs/site-lisp/flim/hex-util hides c:/Emacs-master/share/emacs/28.0.50/lisp/hex-util
c:/Emacs-master/share/emacs/site-lisp/flim/sasl hides c:/Emacs-master/share/emacs/28.0.50/lisp/net/sasl
c:/Emacs-master/share/emacs/site-lisp/flim/sasl-ntlm hides c:/Emacs-master/share/emacs/28.0.50/lisp/net/sasl-ntlm
c:/Emacs-master/share/emacs/site-lisp/flim/sasl-digest hides c:/Emacs-master/share/emacs/28.0.50/lisp/net/sasl-digest
c:/Emacs-master/share/emacs/site-lisp/flim/sasl-cram hides c:/Emacs-master/share/emacs/28.0.50/lisp/net/sasl-cram
c:/Emacs-master/share/emacs/site-lisp/flim/ntlm hides c:/Emacs-master/share/emacs/28.0.50/lisp/net/ntlm
c:/Emacs-master/share/emacs/site-lisp/flim/hmac-md5 hides c:/Emacs-master/share/emacs/28.0.50/lisp/net/hmac-md5
c:/Emacs-master/share/emacs/site-lisp/flim/hmac-def hides c:/Emacs-master/share/emacs/28.0.50/lisp/net/hmac-def

Features:
(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))





^ permalink raw reply	[flat|nested] 6+ messages in thread

* 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
  2020-08-13  7:17 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 Yasuhiro KIMURA
@ 2020-08-22  0:26 ` Dmitry Gutov
  2020-08-22  2:17   ` Yasuhiro KIMURA
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2020-08-22  0:26 UTC (permalink / raw)
  To: Yasuhiro KIMURA, 42841

Hi!

On 13.08.2020 10:17, Yasuhiro KIMURA wrote:
> 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
> 0006:
> 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.

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* 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
  2020-08-22  0:26 ` Dmitry Gutov
@ 2020-08-22  2:17   ` Yasuhiro KIMURA
  2020-08-22 13:30     ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Yasuhiro KIMURA @ 2020-08-22  2:17 UTC (permalink / raw)
  To: dgutov; +Cc: 42841

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)
  ruby-move-to-block(1)
  ruby-end-of-block(1)
  funcall-interactively(ruby-end-of-block 1)
  call-interactively(ruby-end-of-block nil nil)
  command-execute(ruby-end-of-block)

---
Yasuhiro KIMURA





^ permalink raw reply	[flat|nested] 6+ messages in thread

* 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
  2020-08-22  2:17   ` Yasuhiro KIMURA
@ 2020-08-22 13:30     ` Dmitry Gutov
  2020-09-09  7:35       ` Yasuhiro KIMURA
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2020-08-22 13:30 UTC (permalink / raw)
  To: Yasuhiro KIMURA; +Cc: 42841-done

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)
>    ruby-move-to-block(1)
>    ruby-end-of-block(1)
>    funcall-interactively(ruby-end-of-block 1)
>    call-interactively(ruby-end-of-block nil nil)
>    command-execute(ruby-end-of-block)

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* 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
  2020-08-22 13:30     ` Dmitry Gutov
@ 2020-09-09  7:35       ` Yasuhiro KIMURA
  2020-09-11 10:12         ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Yasuhiro KIMURA @ 2020-09-09  7:35 UTC (permalink / raw)
  To: dgutov; +Cc: 42841-done

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 16:30:04 +0300

> 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.

Sorry for very late request, but would you please merge this commit to
emacs-27 branch?

Best Regards.

---
Yasuhiro KIMURA





^ permalink raw reply	[flat|nested] 6+ messages in thread

* 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
  2020-09-09  7:35       ` Yasuhiro KIMURA
@ 2020-09-11 10:12         ` Dmitry Gutov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2020-09-11 10:12 UTC (permalink / raw)
  To: Yasuhiro KIMURA; +Cc: 42841-done

Hi!

On 09.09.2020 10:35, Yasuhiro KIMURA wrote:
>> Commit 2725254ab5.
> Sorry for very late request, but would you please merge this commit to
> emacs-27 branch?

Have you tested that change? What's your impression?

We only merge 'safe' changes to the stable branch, because it will 
likely be used in the new minor release.

The change I made there has a significant potential for breakage (though 
I didn't find any), so we could only do that after some significant testing.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-11 10:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-13  7:17 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 Yasuhiro KIMURA
2020-08-22  0:26 ` Dmitry Gutov
2020-08-22  2:17   ` Yasuhiro KIMURA
2020-08-22 13:30     ` Dmitry Gutov
2020-09-09  7:35       ` Yasuhiro KIMURA
2020-09-11 10:12         ` Dmitry Gutov

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.