unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* erratic scrolling on incomplete lines
@ 2005-02-04 10:31 Sébastien Kirche
  2005-02-06 13:39 ` Jan D.
  0 siblings, 1 reply; 9+ messages in thread
From: Sébastien Kirche @ 2005-02-04 10:31 UTC (permalink / raw)


Hi,

since  a moment I  have sometimes  an erratic  scrolling when  pressing PgUp
(that is bounded  to scroll-down), and i think i managed  to figured it out.
(I am  currently on OSX/Aqua  but IIRC i  have also seen  that in X11  in my
GNU/Linux system)

Problem seems to be  that the frame is dimensioned such as  the last line of
the buffer (except the minibuffer)  is truncated vertically. I though it was
not possible  as Emacs only sizes  by character dimensions  increment (i use
the 6x12 font).

Then if, when scrolling the buffer, the cursor is positioning on a line that
would be the  last but incomplete if displaying the buffer  from the top (at
this moment my cursor is centered vertically) :
1) the next scroll-down step displays the buffer from the top with the cursor
  on the last line
2) another scroll-down redisplays the  buffer with the cursor centered (point
  doesn't move). Any further scroll-down will cycle to the 1)

I hope that my description is clear enough...

Regards.

-- 
Sébastien Kirche

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

* Re: erratic scrolling on incomplete lines
  2005-02-04 10:31 erratic scrolling on incomplete lines Sébastien Kirche
@ 2005-02-06 13:39 ` Jan D.
  2005-02-06 21:00   ` Miles Bader
  2005-02-11 21:01   ` Sébastien Kirche
  0 siblings, 2 replies; 9+ messages in thread
From: Jan D. @ 2005-02-06 13:39 UTC (permalink / raw)
  Cc: emacs-devel

> Hi,
>
> since  a moment I  have sometimes  an erratic  scrolling when  
> pressing PgUp
> (that is bounded  to scroll-down), and i think i managed  to figured 
> it out.
> (I am  currently on OSX/Aqua  but IIRC i  have also seen  that in X11  
> in my
> GNU/Linux system)
>
> Problem seems to be  that the frame is dimensioned such as  the last 
> line of
> the buffer (except the minibuffer)  is truncated vertically. I though 
> it was
> not possible  as Emacs only sizes  by character dimensions  increment 
> (i use
> the 6x12 font).

Can you give a step-by-step description of how to get to this situation 
(vertically truncated line)?  Preferrably starting from emacs -Q.  I'd 
imagine you could try setting font with -fn and geometry with -g and 
see if this comes up.  As you say, it should not happen.

	Jan D.

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

* Re: erratic scrolling on incomplete lines
  2005-02-06 13:39 ` Jan D.
@ 2005-02-06 21:00   ` Miles Bader
  2005-02-06 21:12     ` Jan D.
  2005-02-11 21:01   ` Sébastien Kirche
  1 sibling, 1 reply; 9+ messages in thread
From: Miles Bader @ 2005-02-06 21:00 UTC (permalink / raw)
  Cc: Sébastien Kirche, emacs-devel

On Sun, 6 Feb 2005 14:39:58 +0100, Jan D. <jan.h.d@swipnet.se> wrote:
> Can you give a step-by-step description of how to get to this situation
> (vertically truncated line)?  Preferrably starting from emacs -Q.  I'd
> imagine you could try setting font with -fn and geometry with -g and
> see if this comes up.  As you say, it should not happen.

Huh?  Of course it can happen, indeed it's pretty common.  Any easy
way to cause it is to use a non-default mode-line face (e.g., a border
of size other than -1, or a different font), or include some fonts in
the buffer that have a height different than the default font-size
(e.g., just look at the HELLO buffer with `C-h h').

Emacs is generally quite flaky in this circumstance too.  I avoid
leaving my cursor in the last line because Emacs has a bad tendency to
scroll/jump randomly when it's there.

-Miles
-- 
Do not taunt Happy Fun Ball.

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

* Re: erratic scrolling on incomplete lines
  2005-02-06 21:00   ` Miles Bader
@ 2005-02-06 21:12     ` Jan D.
  2005-02-06 21:47       ` Miles Bader
  0 siblings, 1 reply; 9+ messages in thread
From: Jan D. @ 2005-02-06 21:12 UTC (permalink / raw)
  Cc: Sébastien Kirche, emacs-devel

> On Sun, 6 Feb 2005 14:39:58 +0100, Jan D. <jan.h.d@swipnet.se> wrote:
>> Can you give a step-by-step description of how to get to this 
>> situation
>> (vertically truncated line)?  Preferrably starting from emacs -Q.  I'd
>> imagine you could try setting font with -fn and geometry with -g and
>> see if this comes up.  As you say, it should not happen.
>
> Huh?  Of course it can happen, indeed it's pretty common.

I was under the impression he only used the 6x12 font.

	Jan D.

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

* Re: erratic scrolling on incomplete lines
  2005-02-06 21:12     ` Jan D.
@ 2005-02-06 21:47       ` Miles Bader
  0 siblings, 0 replies; 9+ messages in thread
From: Miles Bader @ 2005-02-06 21:47 UTC (permalink / raw)
  Cc: emacs-devel, Sébastien Kirche, miles

On Sun, 6 Feb 2005 22:12:07 +0100, Jan D. <jan.h.d@swipnet.se> wrote:
> > Huh?  Of course it can happen, indeed it's pretty common.
> 
> I was under the impression he only used the 6x12 font.

I think it's not so important -- there are various ways the
line-heights can be perturbed (e.g. a foreign character in a different
font, widget buttons in a custom buffer, etc).

The critical thing is to make Emacs handle this case correctly.

Thanks,

-Miles
-- 
Do not taunt Happy Fun Ball.

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

* Re: erratic scrolling on incomplete lines
  2005-02-06 13:39 ` Jan D.
  2005-02-06 21:00   ` Miles Bader
@ 2005-02-11 21:01   ` Sébastien Kirche
  2005-02-21 22:52     ` Kim F. Storm
  1 sibling, 1 reply; 9+ messages in thread
From: Sébastien Kirche @ 2005-02-11 21:01 UTC (permalink / raw)


Le 6 fév 2005, Jan D. s'est exprimé ainsi :

> Can you give a step-by-step description of how to get to this
> situation (vertically truncated line)?  Preferrably starting from
> emacs -Q.  I'd imagine you could try setting font with -fn and
> geometry with -g and see if this comes up.  As you say, it should not
> happen.

Sorry for the  delay, i wanted to make some screenshots  to show the problem
and i did had time at work until today.

I use the 6x12 display with OSX.

Here is my display with Gnus when displaying a message :
http://sebastien.kirche.free.fr/emacs_stuff/scroll-1.png

You can  notice in the  message buffer that  the 29th line is  not complete.
Indeed as Miles mentioned I have a special boxing face for the subject line.
Maybe it is the cause of the problem ?

Anyway, if  i am scrolling  down the message  i may arrive at  the situation
where the point is  on line 29 (the one that is  truncated in the first pic)
and display centered on that line :
http://sebastien.kirche.free.fr/emacs_stuff/scroll-2.png 
The modeline shows line 29, 17% to the top of the file

Then  if i  press the  Pg_up key  to scroll  up one  screen, i  am  with the
following display : http://sebastien.kirche.free.fr/emacs_stuff/scroll-3.png
Now i can see the beginning of the  file but the cursor is still on the 29th
truncated line.

If i press again Pg_up i am back to the display with 29th line centered. And
i can repeat indefinitely...

I can make the same test both on Aqua Emacs/OSX and Gtk2/GNU/Linux.

-- 
Sébastien Kirche

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

* Re: erratic scrolling on incomplete lines
  2005-02-11 21:01   ` Sébastien Kirche
@ 2005-02-21 22:52     ` Kim F. Storm
  2005-02-22 10:40       ` Sébastien Kirche
  2005-02-23  4:19       ` Miles Bader
  0 siblings, 2 replies; 9+ messages in thread
From: Kim F. Storm @ 2005-02-21 22:52 UTC (permalink / raw)
  Cc: emacs-devel

Sébastien Kirche <sebastien.kirche.no@spam.free.fr.invalid> writes:

> Then  if i  press the  Pg_up key  to scroll  up one  screen, i  am  with the
> following display : http://sebastien.kirche.free.fr/emacs_stuff/scroll-3.png
> Now i can see the beginning of the  file but the cursor is still on the 29th
> truncated line.
>
> If i press again Pg_up i am back to the display with 29th line centered. And
> i can repeat indefinitely...

I just installed a fix which I think will fix this problem.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: erratic scrolling on incomplete lines
  2005-02-21 22:52     ` Kim F. Storm
@ 2005-02-22 10:40       ` Sébastien Kirche
  2005-02-23  4:19       ` Miles Bader
  1 sibling, 0 replies; 9+ messages in thread
From: Sébastien Kirche @ 2005-02-22 10:40 UTC (permalink / raw)


Le 21 Feb 2005, Kim F. Storm vraute :

> I just installed a fix which I think will fix this problem.

I  confirm that  when  the  point is  on  the line  that  is truncated  when
displayed  from  the top,  a  pg_up press  redisplays  the  buffer from  the
beginning with the point vertically centered.

It seems ok. Thanks :^)

-- 
Sébastien Kirche

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

* Re: erratic scrolling on incomplete lines
  2005-02-21 22:52     ` Kim F. Storm
  2005-02-22 10:40       ` Sébastien Kirche
@ 2005-02-23  4:19       ` Miles Bader
  1 sibling, 0 replies; 9+ messages in thread
From: Miles Bader @ 2005-02-23  4:19 UTC (permalink / raw)
  Cc: Sébastien Kirche, emacs-devel

On Mon, 21 Feb 2005 23:52:50 +0100, Kim F. Storm <storm@cua.dk> wrote:
> I just installed a fix which I think will fix this problem.

Hmmm, scrolling with partial-width lines definitely seems better now.

There are still a few glitches I've noticed, to do with the last line in
the buffer:

 (a) If the last line has no terminating newline, the cursor can still be
     displayed on the last line (and then run afoul of the asynchronous
     recentering problem previously noted).

     An example:

      (0) Set up your mode-line face or something so that the last line in
	  the window can be partial-height.

      (1) Make a buffer containing more lines than the screen height, and
	  make sure the last line doesn't have a final newline.

      (2) Position the cursor at the end of the last line.

      (3) Move the text in the window down line by line using `C-u -1 C-v'

      (4) When the line containing the curso reaches the end of the
	  window, the next one-line scroll will indeed move the cursor --
	  but to the beginning of the last [non-newline-terminated] line,
	  which is now partial-height.

 (b) Maybe a related problem, if the cursor is positioned at the end of
     the buffer, when there _is_ a final newline (so the cursor is just
     after that final newline on an "empty" line), if you do
     line-by-line scrolls (as above in case (a)) to move the cursor past
     the bottom edge of the window, it will relocate point, not to the
     previous line, but to the previous-previous-line, so that [after
     scrolling] it's not located on the bottom-most full anymore, but on
     the line above that.

Thanks,

-Miles
-- 
Do not taunt Happy Fun Ball.

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

end of thread, other threads:[~2005-02-23  4:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-04 10:31 erratic scrolling on incomplete lines Sébastien Kirche
2005-02-06 13:39 ` Jan D.
2005-02-06 21:00   ` Miles Bader
2005-02-06 21:12     ` Jan D.
2005-02-06 21:47       ` Miles Bader
2005-02-11 21:01   ` Sébastien Kirche
2005-02-21 22:52     ` Kim F. Storm
2005-02-22 10:40       ` Sébastien Kirche
2005-02-23  4:19       ` Miles Bader

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).