unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Annoying recentering when scrolling down
@ 2008-08-21  1:06 Juanma Barranquero
  2008-08-21  2:00 ` Chong Yidong
  0 siblings, 1 reply; 18+ messages in thread
From: Juanma Barranquero @ 2008-08-21  1:06 UTC (permalink / raw)
  To: Emacs Dev [emacs-devel]

I have the following in my .emacs:

(setq scroll-preserve-screen-position 'always
      scroll-conservatively           most-positive-fixnum
      scroll-step                     0)

When moving down with next-line, this used to produce a nice
line-by-line scrolling, with no recentering. That has changed
recently; now I'm getting (very annoying) recentering every now and
then (curiously, this does not happen when scrolling up with
previous-line).

How can I get the old behavior back?

 Juanma




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

* Re: Annoying recentering when scrolling down
  2008-08-21  1:06 Annoying recentering when scrolling down Juanma Barranquero
@ 2008-08-21  2:00 ` Chong Yidong
  2008-08-22 11:33   ` Juanma Barranquero
  0 siblings, 1 reply; 18+ messages in thread
From: Chong Yidong @ 2008-08-21  2:00 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs Dev [emacs-devel]

"Juanma Barranquero" <lekktu@gmail.com> writes:

> I have the following in my .emacs:
>
> (setq scroll-preserve-screen-position 'always
>       scroll-conservatively           most-positive-fixnum
>       scroll-step                     0)
>
> When moving down with next-line, this used to produce a nice
> line-by-line scrolling, with no recentering. That has changed
> recently; now I'm getting (very annoying) recentering every now and
> then (curiously, this does not happen when scrolling up with
> previous-line).
>
> How can I get the old behavior back?

Could you try to pinpoint the checkin that introduced this change?




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

* Re: Annoying recentering when scrolling down
  2008-08-21  2:00 ` Chong Yidong
@ 2008-08-22 11:33   ` Juanma Barranquero
  2008-08-22 14:29     ` Chong Yidong
  2008-08-22 18:50     ` Chong Yidong
  0 siblings, 2 replies; 18+ messages in thread
From: Juanma Barranquero @ 2008-08-22 11:33 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Emacs Dev [emacs-devel]

On Thu, Aug 21, 2008 at 04:00, Chong Yidong <cyd@stupidchicken.com> wrote:

> Could you try to pinpoint the checkin that introduced this change?

The following change introduces the problem:

2008-08-06  Chong Yidong  <cyd@stupidchicken.com>

        * xdisp.c (try_scrolling): Use iterator to find the scroll margin,
        instead of window-end which does the wrong thing at eob.
        (try_cursor_movement): Minor optimization.
        (redisplay_window): If scroll margin is defined, don't assume
        window doesn't need scrolling.

http://cvs.savannah.gnu.org/viewvc/emacs/emacs/src/xdisp.c?r1=1.1242&r2=1.1243&pathrev=HEAD


 Juanma




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

* Re: Annoying recentering when scrolling down
  2008-08-22 11:33   ` Juanma Barranquero
@ 2008-08-22 14:29     ` Chong Yidong
  2008-08-22 18:50     ` Chong Yidong
  1 sibling, 0 replies; 18+ messages in thread
From: Chong Yidong @ 2008-08-22 14:29 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs Dev [emacs-devel]

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On Thu, Aug 21, 2008 at 04:00, Chong Yidong <cyd@stupidchicken.com> wrote:
>
>> Could you try to pinpoint the checkin that introduced this change?
>
> The following change introduces the problem:
>
> 2008-08-06  Chong Yidong  <cyd@stupidchicken.com>
>
>         * xdisp.c (try_scrolling): Use iterator to find the scroll margin,
>         instead of window-end which does the wrong thing at eob.
>         (try_cursor_movement): Minor optimization.
>         (redisplay_window): If scroll margin is defined, don't assume
>         window doesn't need scrolling.
>
> http://cvs.savannah.gnu.org/viewvc/emacs/emacs/src/xdisp.c?r1=1.1242&r2=1.1243&pathrev=HEAD

Thanks for finding this.

Do you have a scroll-margin set?  (This was not mentioned in your
original post.)

Is there a recipe for reproducing this?




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

* Re: Annoying recentering when scrolling down
  2008-08-22 11:33   ` Juanma Barranquero
  2008-08-22 14:29     ` Chong Yidong
@ 2008-08-22 18:50     ` Chong Yidong
  2008-08-22 20:11       ` Juanma Barranquero
  1 sibling, 1 reply; 18+ messages in thread
From: Chong Yidong @ 2008-08-22 18:50 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs Dev [emacs-devel]

"Juanma Barranquero" <lekktu@gmail.com> writes:

>> Could you try to pinpoint the checkin that introduced this change?
>
> The following change introduces the problem:
>
> 2008-08-06  Chong Yidong  <cyd@stupidchicken.com>
>
>         * xdisp.c (try_scrolling): Use iterator to find the scroll margin,
>         instead of window-end which does the wrong thing at eob.
>         (try_cursor_movement): Minor optimization.
>         (redisplay_window): If scroll margin is defined, don't assume
>         window doesn't need scrolling.

Thanks for finding the problem.

Could you check if you have scroll-margin on?  (This wasn't mentioned in
your original post)?

Also, is there a way to reproduce this problem?




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

* Re: Annoying recentering when scrolling down
  2008-08-22 18:50     ` Chong Yidong
@ 2008-08-22 20:11       ` Juanma Barranquero
  2008-08-22 21:32         ` Chong Yidong
  0 siblings, 1 reply; 18+ messages in thread
From: Juanma Barranquero @ 2008-08-22 20:11 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Emacs Dev [emacs-devel]

On Fri, Aug 22, 2008 at 20:50, Chong Yidong <cyd@stupidchicken.com> wrote:

> Could you check if you have scroll-margin on?  (This wasn't mentioned in
> your original post)?

Because it is at the default value, 0.

> Also, is there a way to reproduce this problem?

In my setup, it is 100% repeatable.

I start Emacs with the following .emacs:

;;;; .emacs starts here
(setq scroll-preserve-screen-position 'always
      scroll-conservatively           most-positive-fixnum
      scroll-step                     0)
;;;; .emacs ends here

then I visit NEWS with C-h C-n, press <down> and keep it so. At first
it scrolls line by line; after a while it starts recentering.

   Juanma




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

* Re: Annoying recentering when scrolling down
  2008-08-22 20:11       ` Juanma Barranquero
@ 2008-08-22 21:32         ` Chong Yidong
  2008-08-23  2:13           ` Chong Yidong
  0 siblings, 1 reply; 18+ messages in thread
From: Chong Yidong @ 2008-08-22 21:32 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs Dev [emacs-devel]

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On Fri, Aug 22, 2008 at 20:50, Chong Yidong <cyd@stupidchicken.com> wrote:
>
>> Could you check if you have scroll-margin on?  (This wasn't mentioned in
>> your original post)?
>
> Because it is at the default value, 0.
>
>> Also, is there a way to reproduce this problem?
>
> In my setup, it is 100% repeatable.
>
> I start Emacs with the following .emacs:
>
> ;;;; .emacs starts here
> (setq scroll-preserve-screen-position 'always
>       scroll-conservatively           most-positive-fixnum
>       scroll-step                     0)
> ;;;; .emacs ends here
>
> then I visit NEWS with C-h C-n, press <down> and keep it so. At first
> it scrolls line by line; after a while it starts recentering.

Looks like this value of scroll-conservatively is causing an integer
overflow in scroll_conservatively, due to different maximum sizes of
EMACS_INT and int.  Bleah.  I'll take a look.




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

* Re: Annoying recentering when scrolling down
  2008-08-22 21:32         ` Chong Yidong
@ 2008-08-23  2:13           ` Chong Yidong
  2008-08-23 10:47             ` Juanma Barranquero
  0 siblings, 1 reply; 18+ messages in thread
From: Chong Yidong @ 2008-08-23  2:13 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs Dev [emacs-devel]

Chong Yidong <cyd@stupidchicken.com> writes:

>> ;;;; .emacs starts here
>> (setq scroll-preserve-screen-position 'always
>>       scroll-conservatively           most-positive-fixnum
>>       scroll-step                     0)
>> ;;;; .emacs ends here
>>
>> then I visit NEWS with C-h C-n, press <down> and keep it so. At first
>> it scrolls line by line; after a while it starts recentering.
>
> Looks like this value of scroll-conservatively is causing an integer
> overflow in scroll_conservatively, due to different maximum sizes of
> EMACS_INT and int.  Bleah.  I'll take a look.

I've checked in a fix.




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

* Re: Annoying recentering when scrolling down
  2008-08-23  2:13           ` Chong Yidong
@ 2008-08-23 10:47             ` Juanma Barranquero
  2008-08-23 11:48               ` martin rudalics
  0 siblings, 1 reply; 18+ messages in thread
From: Juanma Barranquero @ 2008-08-23 10:47 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Emacs Dev [emacs-devel]

On Sat, Aug 23, 2008 at 04:13, Chong Yidong <cyd@stupidchicken.com> wrote:

> I've checked in a fix.

It does not fix the unwanted recentering.

   Juanma




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

* Re: Annoying recentering when scrolling down
  2008-08-23 10:47             ` Juanma Barranquero
@ 2008-08-23 11:48               ` martin rudalics
  2008-08-23 11:59                 ` Juanma Barranquero
  0 siblings, 1 reply; 18+ messages in thread
From: martin rudalics @ 2008-08-23 11:48 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Chong Yidong, Emacs Dev [emacs-devel]

 > It does not fix the unwanted recentering.

Are your sure it's not due to redisplay lagging behind?





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

* Re: Annoying recentering when scrolling down
  2008-08-23 11:48               ` martin rudalics
@ 2008-08-23 11:59                 ` Juanma Barranquero
  2008-08-23 12:17                   ` martin rudalics
  0 siblings, 1 reply; 18+ messages in thread
From: Juanma Barranquero @ 2008-08-23 11:59 UTC (permalink / raw)
  To: martin rudalics; +Cc: Chong Yidong, Emacs Dev [emacs-devel]

On Sat, Aug 23, 2008 at 13:48, martin rudalics <rudalics@gmx.at> wrote:

> Are your sure it's not due to redisplay lagging behind?

I don't know what is the cause.

I do know that once Jason fixed several bugs with the new font
backend, redisplay was able to keep up with line-by-line scrolling
until Chong committed the change I've mentioned in a previous message.
So if redisplay is suddenly lagging behind, that's a regression.

   Juanma




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

* Re: Annoying recentering when scrolling down
  2008-08-23 11:59                 ` Juanma Barranquero
@ 2008-08-23 12:17                   ` martin rudalics
  2008-08-23 12:47                     ` Juanma Barranquero
  0 siblings, 1 reply; 18+ messages in thread
From: martin rudalics @ 2008-08-23 12:17 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Chong Yidong, Emacs Dev [emacs-devel]

 > I do know that once Jason fixed several bugs with the new font
 > backend, redisplay was able to keep up with line-by-line scrolling
 > until Chong committed the change I've mentioned in a previous message.
 > So if redisplay is suddenly lagging behind, that's a regression.

Redisplay is still awfully slow here even with Jason's changes.  When I
have a

  -------
|   |   |
|-------|
|       |
  -------

window-layout, dragging the horizontal divider with the mouse has the
contents of the upper right window flicker amazingly.  The only way to
find out seems to apply Chong's changes to Emacs 22 and check there.





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

* Re: Annoying recentering when scrolling down
  2008-08-23 12:17                   ` martin rudalics
@ 2008-08-23 12:47                     ` Juanma Barranquero
  2008-08-23 15:03                       ` Chong Yidong
  2008-08-23 17:45                       ` Chong Yidong
  0 siblings, 2 replies; 18+ messages in thread
From: Juanma Barranquero @ 2008-08-23 12:47 UTC (permalink / raw)
  To: martin rudalics; +Cc: Chong Yidong, Emacs Dev [emacs-devel]

On Sat, Aug 23, 2008 at 14:17, martin rudalics <rudalics@gmx.at> wrote:

> Redisplay is still awfully slow here even with Jason's changes.  When I
> have a
>
>  -------
> |   |   |
> |-------|
> |       |
>  -------
>
> window-layout, dragging the horizontal divider with the mouse has the
> contents of the upper right window flicker amazingly.

I do not see much flicker.

> The only way to
> find out seems to apply Chong's changes to Emacs 22 and check there.

I don't see how would that change the fact that rev 1.1243 of xdisp.c
introduces a regression.

  Juanma




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

* Re: Annoying recentering when scrolling down
  2008-08-23 12:47                     ` Juanma Barranquero
@ 2008-08-23 15:03                       ` Chong Yidong
  2008-08-25 15:20                         ` Juanma Barranquero
  2008-08-23 17:45                       ` Chong Yidong
  1 sibling, 1 reply; 18+ messages in thread
From: Chong Yidong @ 2008-08-23 15:03 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: martin rudalics, Emacs Dev [emacs-devel]

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On Sat, Aug 23, 2008 at 14:17, martin rudalics <rudalics@gmx.at> wrote:
>
>> Redisplay is still awfully slow here even with Jason's changes.  When I
>> have a
>>
>>  -------
>> |   |   |
>> |-------|
>> |       |
>>  -------
>>
>> window-layout, dragging the horizontal divider with the mouse has the
>> contents of the upper right window flicker amazingly.
>
> I do not see much flicker.
>
>> The only way to
>> find out seems to apply Chong's changes to Emacs 22 and check there.
>
> I don't see how would that change the fact that rev 1.1243 of xdisp.c
> introduces a regression.

Could you try something: set scroll-conservatively to 5000, not
most-positive-fixnum.  Do you still have problems with that?




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

* Re: Annoying recentering when scrolling down
  2008-08-23 12:47                     ` Juanma Barranquero
  2008-08-23 15:03                       ` Chong Yidong
@ 2008-08-23 17:45                       ` Chong Yidong
  2008-08-24  0:24                         ` Juanma Barranquero
  1 sibling, 1 reply; 18+ messages in thread
From: Chong Yidong @ 2008-08-23 17:45 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: martin rudalics, Emacs Dev [emacs-devel]

"Juanma Barranquero" <lekktu@gmail.com> writes:

> I do not see much flicker.
>
>> The only way to
>> find out seems to apply Chong's changes to Emacs 22 and check there.
>
> I don't see how would that change the fact that rev 1.1243 of xdisp.c
> introduces a regression.

Does changing scroll-conservatively from most-posititve-fixnum to, say,
5000 do anything?




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

* Re: Annoying recentering when scrolling down
  2008-08-23 17:45                       ` Chong Yidong
@ 2008-08-24  0:24                         ` Juanma Barranquero
  0 siblings, 0 replies; 18+ messages in thread
From: Juanma Barranquero @ 2008-08-24  0:24 UTC (permalink / raw)
  To: Chong Yidong; +Cc: martin rudalics, Emacs Dev [emacs-devel]

On Sat, Aug 23, 2008 at 19:45, Chong Yidong <cyd@stupidchicken.com> wrote:

> Does changing scroll-conservatively from most-posititve-fixnum to, say,
> 5000 do anything?

No. It still recenters.

  Juanma




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

* Re: Annoying recentering when scrolling down
  2008-08-23 15:03                       ` Chong Yidong
@ 2008-08-25 15:20                         ` Juanma Barranquero
  2008-08-25 15:41                           ` Chong Yidong
  0 siblings, 1 reply; 18+ messages in thread
From: Juanma Barranquero @ 2008-08-25 15:20 UTC (permalink / raw)
  To: Chong Yidong; +Cc: martin rudalics, Emacs Dev [emacs-devel]

On Sat, Aug 23, 2008 at 17:03, Chong Yidong <cyd@stupidchicken.com> wrote:

> Could you try something: set scroll-conservatively to 5000, not
> most-positive-fixnum.  Do you still have problems with that?

http://lists.gnu.org/archive/html/emacs-devel/2008-08/msg01057.html

  Juanma




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

* Re: Annoying recentering when scrolling down
  2008-08-25 15:20                         ` Juanma Barranquero
@ 2008-08-25 15:41                           ` Chong Yidong
  0 siblings, 0 replies; 18+ messages in thread
From: Chong Yidong @ 2008-08-25 15:41 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: martin rudalics, Emacs Dev [emacs-devel]

"Juanma Barranquero" <lekktu@gmail.com> writes:

> On Sat, Aug 23, 2008 at 17:03, Chong Yidong <cyd@stupidchicken.com> wrote:
>
>> Could you try something: set scroll-conservatively to 5000, not
>> most-positive-fixnum.  Do you still have problems with that?
>
> http://lists.gnu.org/archive/html/emacs-devel/2008-08/msg01057.html

Looks like a mailer glitch; I already sent this message before.  Sorry
for the noise.




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

end of thread, other threads:[~2008-08-25 15:41 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21  1:06 Annoying recentering when scrolling down Juanma Barranquero
2008-08-21  2:00 ` Chong Yidong
2008-08-22 11:33   ` Juanma Barranquero
2008-08-22 14:29     ` Chong Yidong
2008-08-22 18:50     ` Chong Yidong
2008-08-22 20:11       ` Juanma Barranquero
2008-08-22 21:32         ` Chong Yidong
2008-08-23  2:13           ` Chong Yidong
2008-08-23 10:47             ` Juanma Barranquero
2008-08-23 11:48               ` martin rudalics
2008-08-23 11:59                 ` Juanma Barranquero
2008-08-23 12:17                   ` martin rudalics
2008-08-23 12:47                     ` Juanma Barranquero
2008-08-23 15:03                       ` Chong Yidong
2008-08-25 15:20                         ` Juanma Barranquero
2008-08-25 15:41                           ` Chong Yidong
2008-08-23 17:45                       ` Chong Yidong
2008-08-24  0:24                         ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).