Nevin Kapur <nevin(a)jhu.edu> writes:
[I see weird behavior of SPC with a particular window
configuration.]
ShengHuo ZHU <zsh(a)cs.rochester.edu> writes:
> Nevin Kapur <nevin(a)jhu.edu> writes:
>
>> Here is the original article:
>>
http://www.mts.jhu.edu/~kapur/SPACE_bug/space-1.png
>> Now I press SPC:
>>
http://www.mts.jhu.edu/~kapur/SPACE_bug/space-2.png
>> Now I press BS:
>>
http://www.mts.jhu.edu/~kapur/SPACE_bug/space-3.png
>>
>> Notice that the last screen of article never showed up.
>> I'm using XEmacs 21.4.3.
> I can't reproduce this bug. Anyone?
I can trigger this at will. It seems to be happen when the length of
the article is just a little more that 1 screen but less than 2
screens. For all other articles I don't see this bug.
Here is the experiment I tried:
I was looking at your response (<2n3d7hopgj.fsf(a)piglet.jia.vnet>) to
my post. With a screen geometry of 80x50 I see the bug. If I reduce it
to 80x25, I don't see the bug. By regression, I can trigger it at
around 80x36 or 80x37. I guess the exact value depends on what headers
one has showing.
> How about other version of XEmacs?
I just built a fresh 21.1.14 and see exactly the same behavior. I was
using an almost bare .xemacs.
OK, so I think I know what's causing it. Here's the minimal code that
you need to reproduce it:
(gnus-add-configuration
'(article
(horizontal 1.0
(vertical 25 (group 1.0))
(vertical 1.0
(summary 0.16 point)
(article 1.0)))))
(setq gnus-always-force-window-configuration t)
(setq gnus-treat-display-xface 'head)
Is there any reason not to use these 3 options together?
I found there is a bug in window-displayed-height in XEmacs. Maybe
the combination of these 3 options trigger the bug. First, the
article configuration and g-a-f-w-c resized the frame, but the article
window is not redisplayed. Second, the article buffer contains an
X-face which causes the actual displayed height is less than the
normal height. But because the article window is not redisplayed,
window-displayed-height returns a wrong value (my assumption), which
results that move-to-window-line in gnus-article-next-page to a wrong
point.
A workaround is putting redisplay-frame before move-to-window-line,
i.e.
(defun gnus-article-next-page (&optional lines)
"Show the next page of the current article.
If end of article, return non-nil. Otherwise return nil.
Argument LINES specifies lines to be scrolled up."
(interactive "p")
(redisplay-frame)
(move-to-window-line -1)
(if (save-excursion
But I think it is better to make window-displayed-height return the
actual value.
ShengHuo