From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Whittaker Newsgroups: gmane.emacs.bugs Subject: bug#3512: Interaction between scroll variables, scroll-up, scroll-down, and redisplay. Date: Tue, 9 Jun 2009 12:47:10 +0100 Message-ID: <899a68410906090447y13b26230rb35836335c7a5795@mail.gmail.com> Reply-To: Paul Whittaker , 3512@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001636c5ba67484242046be8ebb9 X-Trace: ger.gmane.org 1244559503 10005 80.91.229.12 (9 Jun 2009 14:58:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Jun 2009 14:58:23 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 09 16:58:20 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ME2mF-00068g-OW for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jun 2009 16:58:20 +0200 Original-Received: from localhost ([127.0.0.1]:58445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ME2mF-00030q-45 for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jun 2009 10:58:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDzxI-0008H3-5J for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2009 07:57:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDzxD-000872-CD for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2009 07:57:26 -0400 Original-Received: from [199.232.76.173] (port=49917 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDzxD-00086O-6j for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2009 07:57:23 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41751) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MDzxC-000501-FH for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2009 07:57:22 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n59BvJV2019814; Tue, 9 Jun 2009 04:57:19 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n59Bt5DX019234; Tue, 9 Jun 2009 04:55:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Paul Whittaker Original-Sender: mail.pdw.org.uk@googlemail.com Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 09 Jun 2009 11:55:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 3512 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124454805518488 (code B ref -1); Tue, 09 Jun 2009 11:55:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 9 Jun 2009 11:47:35 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n59BlQ0f018483 for ; Tue, 9 Jun 2009 04:47:28 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDzna-0002HM-6j for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2009 07:47:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDznU-0002E8-G6 for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2009 07:47:24 -0400 Original-Received: from [199.232.76.173] (port=60327 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDznU-0002E3-7f for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2009 07:47:20 -0400 Original-Received: from mail-bw0-f212.google.com ([209.85.218.212]:42459) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDznT-0003HQ-5F for bug-gnu-emacs@gnu.org; Tue, 09 Jun 2009 07:47:19 -0400 Original-Received: by bwz8 with SMTP id 8so2101797bwz.42 for ; Tue, 09 Jun 2009 04:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=OotTYqUslHGgE/hseUINC34zJ0RVM8ZSRJaKgVNyHSE=; b=gy+Z6HXQZ+SWs6G0CPKCu0QiID5FW64CM+JJ7p3F/IHj7hKtbh+woXOAuOmN6+n16m UfBAGFaMrUCFuEWBYsSzw5OenSkAaVWRkLFvHFOWWNKB7SEm9BkDnXJ73btRW5LK2qGK iNxNOGvoOBrw/pqrBpcDO+d6f1sywUH2U4eUc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=RW5W3Bq0kOoXz2EtC/M+x6z9el8cKjCf4it4LTfOYTUPS8s7uc+BzYhAUbrPyx+opl J1EAEIujhx3XAGYEeBY9oIrexBLYIaiiC7QApdXc98rPLCT+eJ6FpFWySOJphVpCpGju 1ZyvMNhW33nUPJfVbaCNZBp0K30cuvZGQK6Wo= Original-Received: by 10.204.53.143 with SMTP id m15mr17180bkg.119.1244548030808; Tue, 09 Jun 2009 04:47:10 -0700 (PDT) X-Google-Sender-Auth: f23a95540144c6f1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Tue, 09 Jun 2009 07:57:26 -0400 X-Mailman-Approved-At: Tue, 09 Jun 2009 10:57:55 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28584 Archived-At: --001636c5ba67484242046be8ebb9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit There appears to be a bug under the following conditions: - Emacs is running in graphical (X11) mode, without the -nw flag; - scroll-margin is set to a value greater than 0; - scroll-preserve-screen-position is set to a non-nil, non-t value; - Point is at or near the start of the buffer (any line <= scroll-margin); - An attempt is made to scroll the window using scroll-up; which leads to: - Window contents are not updated correctly. Less tersely, I have experienced the following sequence of events, on both Ubuntu 8.10 and Fedora 10 systems. - Start emacs with -Q option to launch a fresh Emacs window on the desktop. Set the variables scroll-margin to (say) 5, and scroll-preserve-screen-position to 1. (Setting the latter to 'always also works.) - Populate the buffer with many lines of input. I normally use the output of "ls -R /" and use head to keep only the first couple of hundred lines of it. The exact nature of the content appears not to be important, as I have also loaded in files, or used M-: (dolist ..... (insert ....)) to populate the buffer. - Ensure that point is at the start of the buffer. - Attempt to view text that is currently off the bottom of the window by pressing Page Down once or more to run the scroll-up command. - At this point, the cursor moves to roughly the middle of the window, the (GTK) scroll bar moves downwards, but the window contents remain the same (i.e. the same text is visible as was before pressing Page Down). - Further presses of Page Down do not move point visibly, do not update the visisble window contents, but *do* move the GTK scroll bar. This makes me believe that (internally) everything is working correctly, but the normal text update routines are not being called. - Using scroll-down (i.e. pressing Page Up) maintains this behaviour: the scroll bar moves back in the opposite direction, but the window contents are not updated. The scroll bar can be moved back and forth at will using sequences of scroll-up and scroll-down commands in this manner. - Getting point close to either end of the buffer, or using any other command (such as next-line), causes the window contents to be updated correctly. This can lead to a significant apparent jump in the position of point. The location displayed appears to be consistent with the number of times that the scroll-down and scroll-up commands were used. - If the point is moved back to the start of the buffer, e.g. with M-<, this behaviour can be repeated as often as desired. - Running Emacs with the -nw flag (i.e. running inside an XTerm) does not exhibit this behaviour for me. If you need any more details, please let me know. Best regards, and happy hunting, Paul. PS The Emacs I'm running this on does not have mail set up, so I have cut and pasted the content into my webmail session. If for some reason this has caused a problem, again, let me know. [Content generated automatically by M-x report-emacs-bug follows:] In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.14.1) of 2008-09-05 on vernadsky, modified by Ubuntu Windowing system distributor `The X.Org Foundation', version 11.0.10502000 configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: M-x s e t - v a r i a b l e s c r o l l - m a r g i n 5 M-x s e t - v a r i a b l e s c r o l l - p r e s e r v e - s c r e e n - p o s i t i o n 1 C-u M-! l s SPC - R SPC / SPC | S-SPC h e a d SPC - 2 0 0 M-x r e p o r t - e m a c s - b u g Recent messages: ("emacs" "-Q") For information about GNU Emacs and the GNU system, type C-h C-a. Loading help-fns...done Loading easymenu...done Loading pp...done Loading emacsbug... Loading regexp-opt...done Loading emacsbug...done [End of automatically-generated content.] --001636c5ba67484242046be8ebb9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
There appears to be a bug under the following conditions:

=C2=A0= - Emacs is running in graphical (X11) mode, without the -nw flag;
=C2=A0= - scroll-margin is set to a value greater than 0;
=C2=A0- scroll-preserv= e-screen-position is set to a non-nil, non-t value;
=C2=A0- Point is at or near the start of the buffer (any line <=3D scrol= l-margin);
=C2=A0- An attempt is made to scroll the window using scroll-= up;

which leads to:

=C2=A0- Window contents are not updated c= orrectly.


Less tersely, I have experienced the following sequence of events, = on
both Ubuntu 8.10 and Fedora 10 systems.

=C2=A0- Start emacs wi= th -Q option to launch a fresh Emacs window on the
=C2=A0=C2=A0 desktop.= =C2=A0 Set the variables scroll-margin to (say) 5, and
=C2=A0=C2=A0 scroll-preserve-screen-position to 1.=C2=A0 (Setting the latte= r to
=C2=A0=C2=A0 'always also works.)

=C2=A0- Populate the b= uffer with many lines of input.=C2=A0 I normally use the
=C2=A0=C2=A0 ou= tput of "ls -R /" and use head to keep only the first couple of =C2=A0=C2=A0 hundred lines of it.=C2=A0 The exact nature of the content app= ears not
=C2=A0=C2=A0 to be important, as I have also loaded in files, o= r used M-:
=C2=A0=C2=A0 (dolist ..... (insert ....)) to populate the buf= fer.

=C2=A0- Ensure that point is at the start of the buffer.

=C2=A0- Attempt to view text that is currently off the bottom of the wi= ndow
=C2=A0=C2=A0 by pressing Page Down once or more to run the scroll-u= p command.

=C2=A0- At this point, the cursor moves to roughly the mi= ddle of the
=C2=A0=C2=A0 window, the (GTK) scroll bar moves downwards, b= ut the window
=C2=A0=C2=A0 contents remain the same (i.e. the same text is visible as was=
=C2=A0=C2=A0 before pressing Page Down).

=C2=A0- Further presses= of Page Down do not move point visibly, do not
=C2=A0=C2=A0 update the = visisble window contents, but *do* move the GTK scroll
=C2=A0=C2=A0 bar.=C2=A0 This makes me believe that (internally) everything = is working
=C2=A0=C2=A0 correctly, but the normal text update routines a= re not being
=C2=A0=C2=A0 called.

=C2=A0- Using scroll-down (i.e.= pressing Page Up) maintains this behaviour:
=C2=A0=C2=A0 the scroll bar moves back in the opposite direction, but the w= indow
=C2=A0=C2=A0 contents are not updated.=C2=A0 The scroll bar can be= moved back and
=C2=A0=C2=A0 forth at will using sequences of scroll-up = and scroll-down commands
=C2=A0=C2=A0 in this manner.

=C2=A0- Getting point close to either end of the buffer, or using any o= ther
=C2=A0=C2=A0 command (such as next-line), causes the window content= s to be
=C2=A0=C2=A0 updated correctly.=C2=A0 This can lead to a signifi= cant apparent jump in
=C2=A0=C2=A0 the position of point.=C2=A0 The loca= tion displayed appears to be
=C2=A0=C2=A0 consistent with the number of times that the scroll-down and=C2=A0=C2=A0 scroll-up commands were used.

=C2=A0- If the point is= moved back to the start of the buffer, e.g. with
=C2=A0=C2=A0 M-<, t= his behaviour can be repeated as often as desired.

=C2=A0- Running Emacs with the -nw flag (i.e. running inside an XTerm) = does
=C2=A0=C2=A0 not exhibit this behaviour for me.

If you need = any more details, please let me know.

Best regards, and happy huntin= g,

Paul.

PS The Emacs I'm running this on does not have mail set up, so I ha= ve
cut and pasted the content into my webmail session.=C2=A0 If for some=
reason this has caused a problem, again, let me know.


[Conte= nt generated automatically by M-x report-emacs-bug follows:]

In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.14.1)
=C2=A0o= f 2008-09-05 on vernadsky, modified by Ubuntu
Windowing system distribut= or `The X.Org Foundation', version 11.0.10502000
configured using `c= onfigure=C2=A0 '--build=3Di486-linux-gnu' '--host=3Di486-linux-= gnu' '--prefix=3D/usr' '--sharedstatedir=3D/var/lib' &#= 39;--libexecdir=3D/usr/lib' '--localstatedir=3D/var' '--inf= odir=3D/usr/share/info' '--mandir=3D/usr/share/man' '--with= -pop=3Dyes' '--enable-locallisppath=3D/etc/emacs22:/etc/emacs:/usr/= local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/shar= e/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/lei= m' '--with-x=3Dyes' '--with-x-toolkit=3Dgtk' 'build= _alias=3Di486-linux-gnu' 'host_alias=3Di486-linux-gnu' 'CFL= AGS=3D-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=3D5000 -g -O2' 'LDFLAGS=3D= -g -Wl,--as-needed' 'CPPFLAGS=3D''

Important settings:
=C2=A0 value of $LC_ALL: nil
=C2=A0 value of = $LC_COLLATE: nil
=C2=A0 value of $LC_CTYPE: nil
=C2=A0 value of $LC_M= ESSAGES: nil
=C2=A0 value of $LC_MONETARY: nil
=C2=A0 value of $LC_NU= MERIC: nil
=C2=A0 value of $LC_TIME: nil
=C2=A0 value of $LANG: en_GB.UTF-8
=C2=A0 locale-coding-system: utf-8=C2=A0 default-enable-multibyte-characters: t

Major mode: Lisp Inte= raction

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 t= ool-bar-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global= -font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode:= t
=C2=A0 unify-8859-on-encoding-mode: t
=C2=A0 utf-translate-cjk-mod= e: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t

Recent input:
M-x s e t - v a r i a b = l e <return> s c r o l l -
m a r g i n <return> 5 <retur= n> M-x s e t - v a r i
a b l e <return> s c r o l l - p r e s = e r v e - s
c r e e n - p o s i t i o n <return> 1 <return> C-u
M-! l s= SPC - R SPC / SPC | S-SPC h e a d SPC - 2 0
0 <return> <next&= gt; <next> <next> M-x r e p o r t - e
m a c s - b u g <r= eturn>

Recent messages:
("emacs" "-Q")
For informati= on about GNU Emacs and the GNU system, type C-h C-a.
Loading help-fns...= done
Loading easymenu...done
Loading pp...done
Loading emacsbug...=
Loading regexp-opt...done
Loading emacsbug...done


[End of aut= omatically-generated content.]

--001636c5ba67484242046be8ebb9--