From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Berkan Eskikaya Newsgroups: gmane.emacs.bugs Subject: bug#31875: 27.0.50; setting display-line-numbers to 'visual breaks next-/previous-line Date: Mon, 18 Jun 2018 01:12:23 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008cb1f7056edf6bab" X-Trace: blaine.gmane.org 1529281148 22896 195.159.176.226 (18 Jun 2018 00:19:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Jun 2018 00:19:08 +0000 (UTC) To: 31875@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 18 02:19:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUhst-0005mF-Dw for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jun 2018 02:19:03 +0200 Original-Received: from localhost ([::1]:56769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUhuy-0006sC-VH for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jun 2018 20:21:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUhuq-0006s6-0G for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 20:21:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUhuo-00051X-Ew for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 20:21:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUhuo-00051O-9p for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 20:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fUhuo-0002ai-3u for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 20:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Berkan Eskikaya Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jun 2018 00:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15292812399916 (code B ref -1); Mon, 18 Jun 2018 00:21:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Jun 2018 00:20:39 +0000 Original-Received: from localhost ([127.0.0.1]:54175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUhuR-0002Zr-1e for submit@debbugs.gnu.org; Sun, 17 Jun 2018 20:20:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUhmf-0002OL-JD for submit@debbugs.gnu.org; Sun, 17 Jun 2018 20:12:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUhmY-0001y2-Jn for submit@debbugs.gnu.org; Sun, 17 Jun 2018 20:12:32 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57963) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fUhmY-0001xy-FJ for submit@debbugs.gnu.org; Sun, 17 Jun 2018 20:12:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUhmW-0005zo-Jv for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 20:12:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUhmU-0001x0-St for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 20:12:28 -0400 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:40636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUhmU-0001wc-HI for bug-gnu-emacs@gnu.org; Sun, 17 Jun 2018 20:12:26 -0400 Original-Received: by mail-wm0-x22d.google.com with SMTP id n5-v6so12298673wmc.5 for ; Sun, 17 Jun 2018 17:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=yHylECY1KET37GmCJrjHnf2wroSHta+4AwrpfyaMS7k=; b=sQ8Vn3quXyUFdDnNXysV5+VzrbLhSRjIP4H0IWxe2n5jY06bDnYEAvUH3pxwYm6/R2 qZgFXHXDGc/CCB6qW1woT5qqJwYtKgpJlaaf1Ci1IwUJbWYRqJ3MJrvw21abWn1uzGfR Q2jfl/kWLliBLhrMwXBKaOo4hK+nelSO7RLKv06nJgH/4+MNbfZaqZrpgUt8mjidWok5 Gialvf3ISBHVIyvjMogLo+wJr80KpCtHP5Ih+Zrb0CCGgPWjfx7F5A6rd0lVjgF+nJGl 9k0QWQTgZ9vcLSGk1lf7q7ewMBsbnVbrkONNTG+P5X5+YIFbwVo29bYe+pQg0EaAWw7c TgsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=yHylECY1KET37GmCJrjHnf2wroSHta+4AwrpfyaMS7k=; b=HxP7eor8a5aSSvRUgng+i/mgn7RYq//5qD/4IrABThlurjuzp6RTCrAEvqq+0r9zcR jm8xH6b4RHXCgSSRh80Wo3REBxF4+qGWU+bJPo1oezwyNhJoR1rMcZMM0TEV0YyoTixs pyZgjrIHp2T8kUa87b1xSfd8jhvxAbEh2LG+27cjO6UPm+Ru89TFxdYaxkyjigte1opC aJCSpmr+xECzPC/xNWinsPHLpwKvm21WBWmhCHGZr5S6iiDw44JSPBuz58M9E4QRfwEu 4nMjGs2IjKIz/O6rNIQbef3cBYVt50H50yj12eF9uUM+FRyFsfqdJWXrGIE0WX+5OJaD CW5A== X-Gm-Message-State: APt69E0MuMoOW8HztrqyH7sa5Kkvg1kcaFHsdQWHjavxcjD3pJSttUae rhwZbUtciwiWMsW+Qd6w72NbPuqQiv0MMwd8z2umEw== X-Google-Smtp-Source: ADUXVKI/FuhtyJKeDO2GXIK+yNAQlFDV9dCb3gtWEgTTw/P6MmSVUTSqliT6kDgoXx2n/aKx5mC4yAWi9voPKQj9/rs= X-Received: by 2002:a1c:b745:: with SMTP id h66-v6mr6835989wmf.151.1529280744696; Sun, 17 Jun 2018 17:12:24 -0700 (PDT) Original-Received: by 2002:a1c:97c3:0:0:0:0:0 with HTTP; Sun, 17 Jun 2018 17:12:23 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Sun, 17 Jun 2018 20:20:37 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147588 Archived-At: --0000000000008cb1f7056edf6bab Content-Type: text/plain; charset="UTF-8" $ emacs -Q M-x eval-expression Eval: (setq display-line-numbers 'visual) ;; now, enter three identical number rows into the scratch buffer 123456789 RET 123456789 RET 123456789 C-r 5 RET ; go to number 5 on the third line C-p ; try to move one line up.. the cursor will jump back 4 places, to number 1 on the second line C-e ; go to the end of the second line C-n ; try to move one line down.. again, the cursor will jump back 4 places, to number 6 on the third line C-p ; try to move one line up.. the cursor will successfully move to number 6 on the second line C-p ; cursor on 6 on the first line, as expected C-n ; cursor on 6 on the second line, as expected C-f ; move the cursor forward to number 7 C-n ; cursor will be on the third line, on number 3 (having jumped back 4 places again) In general, the first C-n/-p (next-/previous-line) after a horizontal move (eg, C-e, C-f, C-b) will make the cursor jump 4 places back. The subsequent vertical moves will behave as expected, until another horizontal move. This behaviour only happens when display-line-numbers is set to 'visual -- the absolute or relative modes do not trigger this. Many thanks Berkan In GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-06-17 built on lgw01-amd64-050 Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.4 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. user-error: Beginning of history; no preceding item read--expression: End of file during parsing Entering debugger... Back to top level visual Configured using: 'configure --build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib --program-suffix=-snapshot --with-modules=yes --with-x=yes --with-x-toolkit=gtk3 --with-xwidgets=yes 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS XWIDGETS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t 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 font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu cl-print debug cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame 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 minibuffer 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 97325 10072) (symbols 48 20347 1) (miscs 40 34 113) (strings 32 28836 1792) (string-bytes 1 762757) (vectors 16 15089) (vector-slots 8 511362 9590) (floats 8 50 255) (intervals 56 254 0) (buffers 992 12) (heap 1024 38073 1028)) --0000000000008cb1f7056edf6bab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
$ emacs -Q

M-x eval-expressi= on

Eval: (setq display-line-numbers 'visual)= =C2=A0

;; now, enter three identical number rows i= nto the scratch buffer

123456789 RET
123= 456789 RET
123456789

C-r 5 RET ; go to n= umber 5 on the third line

C-p ; try to move one li= ne up.. the cursor will jump back 4 places, to number 1 on the second line<= /div>

C-e ; go to the end of the second line
<= br>
C-n ; try to move one line down.. again, the cursor will jump= back 4 places, to number 6 on the third line

C-p = ; try to move one line up.. the cursor will successfully move to
= number 6 on the second line

C-p ; cursor on 6 on t= he first line, as expected

C-n ; cursor on 6 on th= e second line, as expected

C-f ; move the cursor f= orward to number 7

C-n ; cursor will be on the thi= rd line, on number 3 (having jumped back
4 places again)

In general, the first C-n/-p (next-/previous-line) after a= horizontal move (eg, C-e, C-f, C-b) will make the cursor jump 4 places bac= k. The subsequent vertical moves will behave as expected, until another hor= izontal move.

This behaviour only happens when dis= play-line-numbers is set to 'visual -- the absolute or relative modes d= o not trigger this.

Many thanks
Berkan


In GNU Emacs 27.0.50 (build 2, x86_6= 4-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-06-17 built on lgw01-amd64-050=
Windowing system distributor 'The X.Org Foundation', ver= sion 11.0.11804000
System Description: Ubuntu 16.04.4 LTS

Recent messages:
For information about GNU Emac= s and the GNU system, type C-h C-a.
user-error: Beginning of hist= ory; no preceding item
read--expression: End of file during parsi= ng
Entering debugger...
Back to top level
vis= ual

Configured using:
=C2=A0'configu= re --build=3Dx86_64-linux-gnu --prefix=3D/usr
=C2=A0'--includ= edir=3D${prefix}/include' '--mandir=3D${prefix}/share/man'
=C2=A0'--infodir=3D${prefix}/share/info' --sysconfdir=3D/etc = --localstatedir=3D/var
=C2=A0--disable-silent-rules '--libdir= =3D${prefix}/lib/x86_64-linux-gnu'
=C2=A0'--libexecdir=3D= ${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode
=C2= =A0--disable-dependency-tracking --prefix=3D/usr --sharedstatedir=3D/var/li= b
=C2=A0--program-suffix=3D-snapshot --with-modules=3Dyes --with-= x=3Dyes
=C2=A0--with-x-toolkit=3Dgtk3 --with-xwidgets=3Dyes '= CFLAGS=3D-g -O2
=C2=A0-fstack-protector-strong -Wformat -Werror= =3Dformat-security'
=C2=A0'CPPFLAGS=3D-Wdate-time -D_FORT= IFY_SOURCE=3D2'
=C2=A0'LDFLAGS=3D-Wl,-Bsymbolic-functions= -Wl,-z,relro''

Configured features:
=
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY= LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL= _BARS GTK3 X11 MODULES THREADS XWIDGETS LIBSYSTEMD LCMS2

Important settings:
=C2=A0 value of $LANG: en_GB.UTF-8
=C2=A0 value of $XMODIFIERS: @im=3Dnone
=C2=A0 locale-codi= ng-system: utf-8-unix

Major mode: Lisp Interaction=

Minor modes in effect:
=C2=A0 tooltip-m= ode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t=
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode= : t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mo= de: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode= : t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encrypt= ion-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line= -number-mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
None found.

Fea= tures:
(shadow sort mail-extr emacsbug message rmc puny seq byte-= opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-sp= ec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util r= mail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailab= brev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-= prsvr mail-utils help-mode easymenu cl-print debug
cl-loaddefs cl= -lib elec-pair time-date mule-util tooltip eldoc electric
uniquif= y ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
ter= m/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
t= abulated-list replace newcomment text-mode elisp-mode lisp-mode
p= rog-mode register page menu-bar rfn-eshadow isearch timer select
= scroll-bar mouse jit-lock font-lock syntax facemenu font-core
ter= m/tty-colors frame 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 minibuffer cl-preloaded nadvice loaddefs b= utton faces cus-face macroexp files text-properties overlay sha1 md5 base64= format env code-pages mule custom widget hashtable-print-readable backquot= e dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-se= tting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-= process emacs)

Memory information:
((con= ses 16 97325 10072)
=C2=A0(symbols 48 20347 1)
=C2=A0(m= iscs 40 34 113)
=C2=A0(strings 32 28836 1792)
=C2=A0(st= ring-bytes 1 762757)
=C2=A0(vectors 16 15089)
=C2=A0(ve= ctor-slots 8 511362 9590)
=C2=A0(floats 8 50 255)
=C2= =A0(intervals 56 254 0)
=C2=A0(buffers 992 12)
=C2=A0(h= eap 1024 38073 1028))

--0000000000008cb1f7056edf6bab--