GNU bug report logs - #12927
24.2; global-hl-line-mode and "scroll-conservatively=1000" take jump up-down the text when hold DOWN key (in *info* buffer).

Previous Next

Package: emacs;

Reported by: Oleksandr Gavenko <gavenkoa <at> gmail.com>

Date: Sun, 18 Nov 2012 21:15:01 UTC

Severity: normal

Found in version 24.2

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 12927 in the body.
You can then email your comments to 12927 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12927; Package emacs. (Sun, 18 Nov 2012 21:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleksandr Gavenko <gavenkoa <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 18 Nov 2012 21:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2; global-hl-line-mode and "scroll-conservatively=1000" take jump
	up-down the text when hold DOWN key (in *info* buffer).
Date: Sun, 18 Nov 2012 23:13:22 +0200
As usual:

  $ emacs -Q

then:

  (setq scroll-conservatively 1000)
  (global-hl-line-mode 1)

and "C-h i". I press and hold DOWN key. After some time cursor reach end of
frame and then text scroll up but sometimes it seems as text jump down! And I
get fill that text moving have jerks.

I make record of this actions:

  $ cvlc screen:// --screen-fps=60 --no-sout-audio --sout "#transcode{venc=x264,quality:100,scale=1,fps=60}:duplicate{dst=std{access=file,mux=mp4,dst=desktop.ogg}}}"

To download (less then 1 MiB) this record:

  $ wget http://gavenkoa.users.sf.net/desktop.ogg

If slow down speed in video viewer you can see that sometimes point jump over
1 line (so move to the second line, without visiting next), so it lost smooth
scrolling. But on video it look better then in real screen. And I can't
describe it better as non naive English speaker...

Without (global-hl-line-mode 1) text only scroll up as desired (smooth,
without abrupt jumps).

In GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-09 on trouble, modified by Debian

-- 
Best regards!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12927; Package emacs. (Mon, 19 Nov 2012 16:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 12927 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Oleksandr Gavenko <gavenkoa <at> gmail.com>
Cc: 12927 <at> debbugs.gnu.org
Subject: Re: bug#12927: 24.2;
	global-hl-line-mode and "scroll-conservatively=1000" take
	jump	up-down the text when hold DOWN key (in *info* buffer).
Date: Mon, 19 Nov 2012 18:43:40 +0200
> From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
> Date: Sun, 18 Nov 2012 23:13:22 +0200
> 
>   (setq scroll-conservatively 1000)
>   (global-hl-line-mode 1)
> 
> and "C-h i". I press and hold DOWN key. After some time cursor reach end of
> frame and then text scroll up but sometimes it seems as text jump down! And I
> get fill that text moving have jerks.

This is some bad interaction between scroll-conservatively and
window-vscroll, it somehow succeeds to activate code paths that I
never before saw in action.

As a temporary work-around, set auto-window-vscroll to nil.  I will
try to find a better solution when I have time.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12927; Package emacs. (Tue, 20 Nov 2012 17:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 12927 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: gavenkoa <at> gmail.com
Cc: 12927 <at> debbugs.gnu.org
Subject: Re: bug#12927: 24.2;
	global-hl-line-mode and "scroll-conservatively=1000"
	take	jump	up-down the text when hold DOWN key (in *info* buffer).
Date: Tue, 20 Nov 2012 19:46:08 +0200
> Date: Mon, 19 Nov 2012 18:43:40 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 12927 <at> debbugs.gnu.org
> 
> > From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
> > Date: Sun, 18 Nov 2012 23:13:22 +0200
> > 
> >   (setq scroll-conservatively 1000)
> >   (global-hl-line-mode 1)
> > 
> > and "C-h i". I press and hold DOWN key. After some time cursor reach end of
> > frame and then text scroll up but sometimes it seems as text jump down! And I
> > get fill that text moving have jerks.
> 
> This is some bad interaction between scroll-conservatively and
> window-vscroll, it somehow succeeds to activate code paths that I
> never before saw in action.
> 
> As a temporary work-around, set auto-window-vscroll to nil.  I will
> try to find a better solution when I have time.

Should be fixed in revision 110927 on the emacs-24 branch.  Please
test.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12927; Package emacs. (Tue, 20 Nov 2012 20:39:01 GMT) Full text and rfc822 format available.

Message #14 received at 12927 <at> debbugs.gnu.org (full text, mbox):

From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12927 <at> debbugs.gnu.org
Subject: Re: bug#12927: 24.2;
	global-hl-line-mode and "scroll-conservatively=1000"
	take	jump	up-down the text when hold DOWN key (in *info* buffer).
Date: Tue, 20 Nov 2012 22:36:58 +0200
On 2012-11-20, Eli Zaretskii wrote:

>> Date: Mon, 19 Nov 2012 18:43:40 +0200
>> From: Eli Zaretskii <eliz <at> gnu.org>
>> Cc: 12927 <at> debbugs.gnu.org
>> 
>> > From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
>> > Date: Sun, 18 Nov 2012 23:13:22 +0200
>> > 
>> >   (setq scroll-conservatively 1000)
>> >   (global-hl-line-mode 1)
>> > 
>> > and "C-h i". I press and hold DOWN key. After some time cursor reach end of
>> > frame and then text scroll up but sometimes it seems as text jump down! And I
>> > get fill that text moving have jerks.
>> 
>> This is some bad interaction between scroll-conservatively and
>> window-vscroll, it somehow succeeds to activate code paths that I
>> never before saw in action.
>> 
>> As a temporary work-around, set auto-window-vscroll to nil.  I will
>> try to find a better solution when I have time.
>
> Should be fixed in revision 110927 on the emacs-24 branch.  Please
> test.

I don't familiar with bzr:

  $ bzr up
  $ bzr info -v
  Repository checkout (format: 2a)
  Location:
    repository checkout root: .
          checkout of branch: bzr://bzr.savannah.gnu.org/emacs/trunk/
           shared repository: /home/user/devel/emacs/emacs-bzr

  Related branches:
    parent branch: bzr://bzr.savannah.gnu.org/emacs/trunk/
    submit branch: bzr://bzr.savannah.gnu.org/emacs/trunk/

  In the working tree:
        3541 unchanged
           0 modified
           0 added
           0 removed
           0 renamed
           2 unknown
        1514 ignored
         128 versioned subdirectories

  Branch history:
      110963 revisions
       10078 days old
     first revision: Thu 1985-04-18 00:48:29 +0000
    latest revision: Tue 2012-11-20 14:05:20 -0500

  Repository:
      123726 revisions

If that OK I perform clean build and test this build.

As previously:

  $ _dist/bin/emacs-24.3.50 -Q

  (setq scroll-conservatively 1000)
  (global-hl-line-mode 1)

"C-h i", then hold DOWN key - visually text scrolls up and some times jerks
down/up.

When I look to what happen with text I found some interesting thing which is
based on space between text boundary and window top/bottom (so info menu or
mode line hide of part text).

When (global-hl-line-mode -1) - text aligned to top of window. With "+1" text
some times make align to bottom of window so scroll down on less then half of
font weight pixels (and this happen when we move down and text must scroll
up!!).

So it needn't to hold DOWN, just  (setq scroll-conservatively 1000) and move
point to end of dir info buffer and press several times DOWN.

Sorry for my bad English. I expect you mostly understand that I try to say))

================================================================

Also I found that "(global-hl-line-mode 1)" slow down scrolling in CC-mode
enabled buffers in two or more times. Do I need report a bug?

-- 
Best regards!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12927; Package emacs. (Tue, 20 Nov 2012 20:50:01 GMT) Full text and rfc822 format available.

Message #17 received at 12927 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Oleksandr Gavenko <gavenkoa <at> gmail.com>
Cc: 12927 <at> debbugs.gnu.org
Subject: Re: bug#12927: 24.2;
	global-hl-line-mode and "scroll-conservatively=1000"
	take	jump	up-down the text when hold DOWN key (in *info* buffer).
Date: Tue, 20 Nov 2012 22:47:56 +0200
> From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
> Cc: 12927 <at> debbugs.gnu.org
> Date: Tue, 20 Nov 2012 22:36:58 +0200
> 
> > Should be fixed in revision 110927 on the emacs-24 branch.  Please
> > test.
> 
> I don't familiar with bzr:
> 
>   $ bzr up
>   $ bzr info -v
>   Repository checkout (format: 2a)
>   Location:
>     repository checkout root: .
>           checkout of branch: bzr://bzr.savannah.gnu.org/emacs/trunk/
>            shared repository: /home/user/devel/emacs/emacs-bzr

This is the trunk, not the emacs-24 branch.  I committed the fix to
the emacs-24 branch.  You can wait until the changes from the branch
are merged onto the trunk, and test then.  Or you can checkout the
branch, like so:

  $ cd /home/user/devel/emacs/emacs-bzr
  $ bzr branch bzr://bzr.savannah.gnu.org/emacs/emacs-24

This will create an emacs-24 directory under
/home/user/devel/emacs/emacs-bzr, and you can then build it and try
the fix.

> Also I found that "(global-hl-line-mode 1)" slow down scrolling in CC-mode
> enabled buffers in two or more times. Do I need report a bug?

No, this is expected.  hl-line-mode adds itself to post-command-hook,
and moves its overlay after each command that changes the current
line.  What this does is completely disable the redisplay
optimizations used when only the cursor moves without any other
changes to the text, because moving an overlay requires a thorough
redisplay of the window, which is more expensive.

The only bug report that I can think of is a feature request to move
hl-line-mode into the display engine, because the display engine
knowns very well where's the current line (when it decides where to
display the cursor), and can do this highlighting better and much more
efficiently.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12927; Package emacs. (Wed, 21 Nov 2012 13:53:01 GMT) Full text and rfc822 format available.

Message #20 received at 12927 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12927 <at> debbugs.gnu.org, Oleksandr Gavenko <gavenkoa <at> gmail.com>
Subject: Re: bug#12927: 24.2;
	global-hl-line-mode and "scroll-conservatively=1000"
	take	jump	up-down the text when hold DOWN key (in *info* buffer).
Date: Wed, 21 Nov 2012 08:51:23 -0500
>   $ cd /home/user/devel/emacs/emacs-bzr
>   $ bzr branch bzr://bzr.savannah.gnu.org/emacs/emacs-24
> This will create an emacs-24 directory under
> /home/user/devel/emacs/emacs-bzr, and you can then build it and try
> the fix.

He can also just "bzr switch bzr://bzr.savannah.gnu.org/emacs/emacs-24"
If he doesn't have a shared repository, this will be a lot more efficient.

        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12927; Package emacs. (Wed, 21 Nov 2012 22:16:02 GMT) Full text and rfc822 format available.

Message #23 received at 12927 <at> debbugs.gnu.org (full text, mbox):

From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12927 <at> debbugs.gnu.org
Subject: Re: bug#12927: 24.2;
	global-hl-line-mode and "scroll-conservatively=1000"
	take	jump	up-down the text when hold DOWN key (in *info* buffer).
Date: Thu, 22 Nov 2012 00:14:15 +0200
On 2012-11-20, Eli Zaretskii wrote:

>> From: Oleksandr Gavenko
>> 
>> > Should be fixed in revision 110927 on the emacs-24 branch.  Please
>> > test.
>> 
>> I don't familiar with bzr:
>> 
>>   $ bzr up
>>   $ bzr info -v
>>           checkout of branch: bzr://bzr.savannah.gnu.org/emacs/trunk/
>>            shared repository: /home/user/devel/emacs/emacs-bzr
>
> This is the trunk, not the emacs-24 branch.  I committed the fix to
> the emacs-24 branch.  You can wait until the changes from the branch
> are merged onto the trunk, and test then.  Or you can checkout the
> branch, like so:
>
>   $ cd /home/user/devel/emacs/emacs-bzr
>   $ bzr branch bzr://bzr.savannah.gnu.org/emacs/emacs-24
>
I test on 'emacs-24' branch (based on your instruction) and confirm that bug
go away!

>> Also I found that "(global-hl-line-mode 1)" slow down scrolling in CC-mode
>> enabled buffers in two or more times. Do I need report a bug?
>
> No, this is expected.  hl-line-mode adds itself to post-command-hook,
> and moves its overlay after each command that changes the current
> line.  What this does is completely disable the redisplay
> optimizations used when only the cursor moves without any other
> changes to the text, because moving an overlay requires a thorough
> redisplay of the window, which is more expensive.
>
> The only bug report that I can think of is a feature request to move
> hl-line-mode into the display engine, because the display engine
> knowns very well where's the current line (when it decides where to
> display the cursor), and can do this highlighting better and much more
> efficiently.

OK. I would like to see hl-line-mode into the display engine. I would make
appropriate a bug report...

-- 
Best regards!




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 22 Nov 2012 03:47:02 GMT) Full text and rfc822 format available.

Notification sent to Oleksandr Gavenko <gavenkoa <at> gmail.com>:
bug acknowledged by developer. (Thu, 22 Nov 2012 03:47:02 GMT) Full text and rfc822 format available.

Message #28 received at 12927-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Oleksandr Gavenko <gavenkoa <at> gmail.com>
Cc: 12927-done <at> debbugs.gnu.org
Subject: Re: bug#12927: 24.2;
	global-hl-line-mode and "scroll-conservatively=1000"
	take	jump	up-down the text when hold DOWN key (in *info* buffer).
Date: Thu, 22 Nov 2012 05:45:07 +0200
> From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
> Cc: 12927 <at> debbugs.gnu.org
> Date: Thu, 22 Nov 2012 00:14:15 +0200
> 
> I test on 'emacs-24' branch (based on your instruction) and confirm that bug
> go away!

Thanks for testing.  I'm closing the bug.

> OK. I would like to see hl-line-mode into the display engine. I would make
> appropriate a bug report...

There's one already...




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 20 Dec 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.