GNU bug report logs -
#22098
25.0.50; visual-line-mode and invisible text causes cursor to jump
Previous Next
Reported by: dunni <at> gnu.org
Date: Sat, 5 Dec 2015 20:48:02 UTC
Severity: normal
Found in version 25.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22098 in the body.
You can then email your comments to 22098 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22098
; Package
emacs
.
(Sat, 05 Dec 2015 20:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
dunni <at> gnu.org
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 05 Dec 2015 20:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
emacs -Q output.txt
M-x visual-line-mode
;; Scroll just after the long line of text in the middle of the screen,
;; then position the cursor at the first character at that visual line.
C-M-: (add-text-properties (point) (1+ (point)) '(invisible t))
next-line
recenter-top-bottom
previous-line
The cursor should jump to the top of the screen. This isn't always the
case, as it sometimes moves to the bottom. It seems to only happen when
the window needs to be repositioned.
As you may be able to tell from the output below, I'm running from the
emacs-25 branch.
[output.txt (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.5)
of 2015-12-02
Repository revision: 4d10a7d467b6b0927036387c0d4849b2f40abcee
Windowing system distributor 'The X.Org Foundation', version 11.0.11800000
System Description: Parabola GNU/Linux-libre
Configured using:
'configure --prefix=/home/skolar/source/src'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Text
Minor modes in effect:
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
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
visual-line-mode: t
transient-mark-mode: t
Recent messages:
Wrote /home/skolar/.emacs.d/output.txt
Visual-Line mode enabled in current buffer
Undo!
t
0 (#o0, #x0, ?\C-@)
Saving file /home/skolar/.emacs.d/output.txt...
Wrote /home/skolar/.emacs.d/output.txt
Quit
Making completion list...
next-line: End of buffer
Load-path shadows:
None found.
Features:
(seq byte-opt gv bytecomp byte-compile cconv cl-extra wid-edit
descr-text pp shadow sort gnus-util mail-extr emacsbug message dired
format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib
mail-prsvr mail-utils time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core 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 charscript case-table epa-hook jka-cmpr-hook help
simple abbrev 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 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 91128 16179)
(symbols 48 19947 6)
(miscs 40 74 221)
(strings 32 15597 7343)
(string-bytes 1 469318)
(vectors 16 12823)
(vector-slots 8 432837 9867)
(floats 8 163 161)
(intervals 56 244 11)
(buffers 976 15)
(heap 1024 46195 1614))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22098
; Package
emacs
.
(Sun, 06 Dec 2015 03:43:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 22098 <at> debbugs.gnu.org (full text, mbox):
> From: dunni <at> gnu.org
> Date: Sat, 05 Dec 2015 15:47:00 -0500
>
> emacs -Q output.txt
> M-x visual-line-mode
> ;; Scroll just after the long line of text in the middle of the screen,
> ;; then position the cursor at the first character at that visual line.
> C-M-: (add-text-properties (point) (1+ (point)) '(invisible t))
> next-line
> recenter-top-bottom
> previous-line
>
> The cursor should jump to the top of the screen. This isn't always the
> case, as it sometimes moves to the bottom. It seems to only happen when
> the window needs to be repositioned.
I seem to be unable to reproduce this on my system. Maybe I didn't
understand the exact place where to put the invisible property. What
is the value of point there?
Also, is it really necessary to invoke the commands via M-x, or do you
see the same problem when you use C-n, C-l, and C-p instead?
Finally, your build is slightly outdated, so perhaps see if the
problem persists with the current emacs-25 branch.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22098
; Package
emacs
.
(Sun, 06 Dec 2015 05:30:04 GMT)
Full text and
rfc822 format available.
Message #11 received at 22098 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>
> I seem to be unable to reproduce this on my system. Maybe I didn't
> understand the exact place where to put the invisible property. What
> is the value of point there?
>
Move point to the start of logical line 19, then move point one visual
line up. Set that character to be invisible, then move point back to
the start of logical line 19. Re-position the window twice, then move
point up one visible line.
M-g M-g 19
C-p
C-M-: (add-text-properties (point) (1+ (point)) '(invisible t))
C-n
C-l C-l
C-p
> Also, is it really necessary to invoke the commands via M-x, or do you
> see the same problem when you use C-n, C-l, and C-p instead?
>
I try not to assume that everyone has the same key-bindings as me, so I
thought it might help to use the actual command names. As far as I can
tell, it makes no difference.
> Finally, your build is slightly outdated, so perhaps see if the
> problem persists with the current emacs-25 branch.
>
> Thanks.
I updated my build to the most recent version of the emacs-25 branch,
but the problem still persists. I forgot to mention in my original
report that this seems similar to bug #17047
(https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-03/msg00804.html).
It looks like the old bug addressed the problem with forward-char and
backward-char. I've checked with next-line, but I've never seen it
happen before. I only ever see this problem with previous-line.
Thanks for your quick response.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22098
; Package
emacs
.
(Sun, 06 Dec 2015 17:35:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 22098 <at> debbugs.gnu.org (full text, mbox):
> From: Ian Dunn <dunni <at> gnu.org>
> Cc: 22098 <at> debbugs.gnu.org
> Date: Sun, 06 Dec 2015 00:28:57 -0500
>
> M-g M-g 19
> C-p
> C-M-: (add-text-properties (point) (1+ (point)) '(invisible t))
> C-n
> C-l C-l
> C-p
Thanks. With this recipe, I do see some unusual behavior of the
cursor, but not the one you described. On my system, the cursor stays
at its position before the final C-p, then, a fraction of second
later, jumps to its correct position. It doesn't stay at the top line
of the window.
> > Also, is it really necessary to invoke the commands via M-x, or do you
> > see the same problem when you use C-n, C-l, and C-p instead?
>
> I try not to assume that everyone has the same key-bindings as me, so I
> thought it might help to use the actual command names.
Yes, but you should be aware that this might make a difference for
redisplay problems: typing M-x causes a mildly thorough redisplay, so
it might obscure some problems and cause some others. That's why I
asked.
> I forgot to mention in my original report that this seems similar to
> bug #17047
> (https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-03/msg00804.html).
> It looks like the old bug addressed the problem with forward-char
> and backward-char. I've checked with next-line, but I've never seen
> it happen before. I only ever see this problem with previous-line.
No, that's a different problem. The problem discussed here happens
because point moves outside the window to the place that's invisible.
By contrast, bug #17047 was about a situation where the goal position
was visible in the window at all times.
Anyway, I fixed the problem I see here in commit cca5629 on the
emacs-25 branch. Please see if your problem is solved by that change.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22098
; Package
emacs
.
(Thu, 10 Dec 2015 01:13:04 GMT)
Full text and
rfc822 format available.
Message #17 received at 22098 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> I try not to assume that everyone has the same key-bindings as me, so I
>> thought it might help to use the actual command names.
>
> Yes, but you should be aware that this might make a difference for
> redisplay problems: typing M-x causes a mildly thorough redisplay, so
> it might obscure some problems and cause some others. That's why I
> asked.
>
I did not know that. Thanks for the tip.
> Anyway, I fixed the problem I see here in commit cca5629 on the
> emacs-25 branch. Please see if your problem is solved by that change.
>
> Thanks.
Thanks once again for the quick response, and my apologies for my
sluggish response.
That fixed the problem in that sample I gave to you, but I noticed a
similar problem that I just figured out how to replicate:
emacs -Q output.txt
visual-line-mode
global-hl-line-mode
M-g M-g 19
C-p
C-M-: (add-text-properties (point) (1+ (point)) '(invisible t))
C-p
C-l C-l
C-n C-n
C-p
What I see happen is point jump to exactly half-way down the window.
This only seems to happen when the invisible text is on the second
visual line of the window, but the start of the line isn't the first.
To demonstrate this, here is what I see when I encounter the bug:
words are formatted and printed--emacs outshines all other editing software in approximately the same
way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes
everything else vanish.
I make the 'w' in "way" invisible (since making the 'e' in "everything"
invisible causes that word to jump to the previous visual line), and
re-position the window such that "words" is the first visible word in
the window (So those three lines are the first three visual lines of the
window). Then, I move point down two visual lines, and then try to move
it back up so it is over the word "ay" (way with an invisible "w").
When I do, the cursor (and I assume point) immediately jumps to one line
above the middle of the window. I verified this last bit by moving the
cursor in an adjacent window to the exact center, and comparing. The
cursor in the first window appears to be exactly one line above center.
Also, it only happens when global-hl-line-mode is also active.
If the involvement of global-hl-line-mode in this constitutes a separate
bug, then just let me know so I can file another report.
I updated output.txt with with additional (actual) text, so to verify
that we are in fact using the same file, I've attached it again.
Once again, thank you for your help.
Ian Dunn
[output.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22098
; Package
emacs
.
(Thu, 10 Dec 2015 01:14:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 22098 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>
> The evil hl-line-mode, sigh...
>
> Fixed in commit d75849e on the emacs-25 branch. Thanks for the
> recipe.
>
Fix verified. Thanks for all of your help, Eli.
Ian
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 10 Dec 2015 16:41:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
dunni <at> gnu.org
:
bug acknowledged by developer.
(Thu, 10 Dec 2015 16:41:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 22098-done <at> debbugs.gnu.org (full text, mbox):
> From: Ian Dunn <dunni <at> gnu.org>
> Cc: 22098 <at> debbugs.gnu.org
> Date: Wed, 09 Dec 2015 20:13:43 -0500
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >
> > The evil hl-line-mode, sigh...
> >
> > Fixed in commit d75849e on the emacs-25 branch. Thanks for the
> > recipe.
> >
>
> Fix verified. Thanks for all of your help, Eli.
Thanks, closing.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 08 Jan 2016 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.