GNU bug report logs -
#148
[Bernardo Dal Seno]: scroll-margin and scroll-preserve-screen-position cause refresh problem
Previous Next
Reported by: Sven Joachim <svenjoac <at> gmx.de>
Date: Sat, 19 Apr 2008 07:25:04 UTC
Severity: normal
Found in versions 22.1, 22.2.50, 23.0.60
Done: Chong Yidong <cyd <at> stupidchicken.com>
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 148 in the body.
You can then email your comments to 148 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Sven Joachim <svenjoac <at> gmx.de>, Bernardo Dal Seno <dibbex <at> gmail.com>, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#148
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Sven Joachim <svenjoac <at> gmx.de>
:
New bug report received and forwarded. Copy sent to
Sven Joachim <svenjoac <at> gmx.de>, Bernardo Dal Seno <dibbex <at> gmail.com>, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Package: emacs
Version: 22.1, 22.2.50, 23.0.60
I received the attached message via the Debian bug tracking system. The
described redisplay problem is reproducible in both EMACS_22_BASE and
the trunk. While the scrollbar and the modeline are updated upon C-v,
the buffer window is not.
[Message part 2 (message/rfc822, inline)]
Package: emacs22
Version: 22.1+1-3
Severity: normal
With this very minimal '.emacs' file
---BEGIN---
(custom-set-variables
'(scroll-margin 2)
'(scroll-preserve-screen-position t)
)
---END---
hitting page-up and page-down (or C-v and M-v) in any order just after
having open an exiting file does not update the buffer view immediatly.
In other words, you open a file, and you hit page-down a couple of
times; the scroll bar and the status bar get updated immediatly, while
the content of the window is update only after some time, which could be
less than a second (but the delay is noticeable) or also a few seconds.
If you move the cursor using the arrow keys, the problem disappear. If
you move the cursor to the very first line of the buffer, though, and
then hit page-down, you'll see the problem again.
I'm using X. In a terminal window Emacs seems to work fine.
I've experienced this problem for a while, but only now I found the
cause. It's more apparent with files of a few hundred lines.
Best regards,
Bernardo
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.23 (PREEMPT)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages emacs22 depends on:
ii emacs22-bin-common 22.1+1-3 The GNU Emacs editor's shared, arc
ii libasound2 1.0.16-1 ALSA library
ii libc6 2.7-8 GNU C Library: Shared libraries
ii libice6 2:1.0.4-1 X11 Inter-Client Exchange library
ii libjpeg62 6b-14 The Independent JPEG Group's JPEG
ii libncurses5 5.6+20080203-1 Shared libraries for terminal hand
ii libpng12-0 1.2.15~beta5-3 PNG library - runtime
ii libsm6 2:1.0.3-1+b1 X11 Session Management library
ii libtiff4 3.8.2-7 Tag Image File Format (TIFF) libra
ii libx11-6 2:1.0.3-7 X11 client-side library
ii libxext6 2:1.0.4-1 X11 miscellaneous extension librar
ii libxmu6 2:1.0.4-1 X11 miscellaneous utility library
ii libxpm4 1:3.5.7-1 X11 pixmap library
ii libxt6 1:1.0.5-3 X11 toolkit intrinsics library
ii xaw3dg 1.5+E-15 Xaw3d widget set
ii zlib1g 1:1.2.3.3.dfsg-11 compression library - runtime
emacs22 recommends no packages.
-- no debconf information
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#148
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 148 <at> emacsbugs.donarmstrong.com (full text, mbox):
> I received the attached message via the Debian bug tracking system. The
> described redisplay problem is reproducible in both EMACS_22_BASE and
> the trunk. While the scrollbar and the modeline are updated upon C-v,
> the buffer window is not.
This behavior is not a bug in itself, it's just a symptom: it means that
redisplay was interrupted by user input before it had time
to terminate. See redisplay-dont-pause.
So, the problem you're reporting is that Emacs's redisplay is too slow
to keep up with the scrolling (which is indeed a problem). This may of
course depend on the file's content and the major-mode (since part of the
redisplay time might be used by font-locking, for example).
Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#148
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Sven Joachim <svenjoac <at> gmx.de>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 148 <at> emacsbugs.donarmstrong.com (full text, mbox):
On 2008-04-19 16:20 +0200, Stefan Monnier wrote:
> This behavior is not a bug in itself, it's just a symptom: it means that
> redisplay was interrupted by user input before it had time
> to terminate. See redisplay-dont-pause.
Okay, maybe the submitter of the Debian bug should set
redisplay-dont-pause to t to work around the problem.
> So, the problem you're reporting is that Emacs's redisplay is too slow
> to keep up with the scrolling (which is indeed a problem). This may of
> course depend on the file's content and the major-mode (since part of the
> redisplay time might be used by font-locking, for example).
Do you have an explanation why the combination of
(setq scroll-margin 2)
(setq scroll-preserve-screen-position)
slows down redisplay so much on C-v, especially if point is in the
middle of the window? I've never seen the problem in the default
settings.
Sven
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#148
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at 148 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> This behavior is not a bug in itself, it's just a symptom: it means that
>> redisplay was interrupted by user input before it had time
>> to terminate. See redisplay-dont-pause.
> Okay, maybe the submitter of the Debian bug should set
> redisplay-dont-pause to t to work around the problem.
Yes, that should work around the problem.
>> So, the problem you're reporting is that Emacs's redisplay is too slow
>> to keep up with the scrolling (which is indeed a problem). This may of
>> course depend on the file's content and the major-mode (since part of the
>> redisplay time might be used by font-locking, for example).
> Do you have an explanation why the combination of
> (setq scroll-margin 2)
> (setq scroll-preserve-screen-position)
> slows down redisplay so much on C-v, especially if point is in the
> middle of the window? I've never seen the problem in the default
> settings.
I do not have an explanation, no.
Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#148
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Bernardo Dal Seno" <dibbex <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #25 received at 148 <at> emacsbugs.donarmstrong.com (full text, mbox):
> This behavior is not a bug in itself, it's just a symptom: it means that
> redisplay was interrupted by user input before it had time
> to terminate. See redisplay-dont-pause.
I tried the following .emacs:
---BEGIN---
(custom-set-variables
'(scroll-margin 2)
'(scroll-preserve-screen-position t)
'(redisplay-dont-pause t)
)
---END---
and the bug appeared as before.
> This may of
> course depend on the file's content and the major-mode (since part of the
> redisplay time might be used by font-locking, for example).
In order to avoid font-locking and strange hooks, I copied a plain
text file to '/tmp/xxyyzz' and opened it with Emacs. Same problem.
Actually, the display isn't updated if I scroll the buffer when the
cursor is in the first two lines of the window. A partial work-around
I've found is adding this to .emacs:
---CUT---
(add-hook 'find-file-hook
(function (lambda ()
(goto-line (+ 1 scroll-margin))
)))
---CUT---
When I open a file I can scroll it immediately, as the cursor is on
the third line, but whenever I move the cursor to the beginning of the
buffer, the bug shows up again.
I don't know anything about Emacs internals, but it seems a very
strange behavior.
Bernardo
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#148
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #30 received at 148 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> This behavior is not a bug in itself, it's just a symptom: it means that
>> redisplay was interrupted by user input before it had time
>> to terminate. See redisplay-dont-pause.
> I tried the following .emacs:
> ---BEGIN---
> (custom-set-variables
> '(scroll-margin 2)
> '(scroll-preserve-screen-position t)
> '(redisplay-dont-pause t)
> )
> ---END---
> and the bug appeared as before.
> Actually, the display isn't updated if I scroll the buffer when the
> cursor is in the first two lines of the window. A partial work-around
Oh, indeed, I see something very odd going on, now. It's not just the
redisplay-dont-pause, it's a real bug: it looks like if the cursor starts
inside the `scroll-margin' (e.g. (point-min)) and we scroll a page
forward, the cursor is moved ans so is point, but the text is
not updated.
Stefan
Reply sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Sven Joachim <svenjoac <at> gmx.de>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #35 received at 148-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> With this very minimal '.emacs' file
>
> (custom-set-variables
> '(scroll-margin 2)
> '(scroll-preserve-screen-position t))
>
> hitting page-up and page-down (or C-v and M-v) in any order just after
> having open an exiting file does not update the buffer view immediatly.
I've just checked in a fix. Thanks.
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Wed, 03 Sep 2008 14:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 351 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.