* window-vscroll broken?
@ 2003-11-13 23:35 Greg Hill
0 siblings, 0 replies; 3+ messages in thread
From: Greg Hill @ 2003-11-13 23:35 UTC (permalink / raw)
I am trying to use the function window-vscroll in Emacs 21.2.2, and
all it ever returns is 0. Does anyone know if it is just broken, or
am I doing something wrong?
--Greg
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: window-vscroll broken?
[not found] <mailman.54.1068771069.399.help-gnu-emacs@gnu.org>
@ 2003-11-14 0:44 ` David Kastrup
2003-11-14 18:15 ` Greg Hill
0 siblings, 1 reply; 3+ messages in thread
From: David Kastrup @ 2003-11-14 0:44 UTC (permalink / raw)
Greg Hill <ghill@synergymicro.com> writes:
> I am trying to use the function window-vscroll in Emacs 21.2.2, and
> all it ever returns is 0. Does anyone know if it is just broken, or
> am I doing something wrong?
Why should it return anything else unless you have set it to a value
different from 0? It will only ever return something different from
0 if you have set it yourself (with set-window-vscroll) or if Emacs
has moved to the end of a buffer with a line at the top of the window
that is so tall that it can't be displayed completely.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: window-vscroll broken?
2003-11-14 0:44 ` window-vscroll broken? David Kastrup
@ 2003-11-14 18:15 ` Greg Hill
0 siblings, 0 replies; 3+ messages in thread
From: Greg Hill @ 2003-11-14 18:15 UTC (permalink / raw)
At 1:44 AM +0100 11/14/03, David Kastrup wrote:
>Greg Hill <ghill@synergymicro.com> writes:
>
>> I am trying to use the function window-vscroll in Emacs 21.2.2, and
>> all it ever returns is 0. Does anyone know if it is just broken, or
>> am I doing something wrong?
>
>Why should it return anything else unless you have set it to a value
>different from 0? It will only ever return something different from
>0 if you have set it yourself (with set-window-vscroll) or if Emacs
>has moved to the end of a buffer with a line at the top of the window
>that is so tall that it can't be displayed completely.
Have you tried using it? Or are you just taking it for granted that
I am a total moron?
I page down into a long buffer, so that the top line in the buffer is
maybe line 100, I execute window-vscroll, and I get 0. I execute
(set-window-vscroll nil 10) with the cursor on, say, the sixth line
in the window (line 106 in the buffer) and either nothing at all
happens or something weird happens like the current line moves to the
third line of the window. Then (window-vscroll) will return 10 for a
while, no matter how far up or down I scroll the page, until suddenly
it starts returning 0 again regardless of what buffer line is
currently in the first window line. The value returned by
(window-vscroll) never seems to have anything at all to do with what
line of the buffer currently appears in the top line of the window.
If that is not what happens on your platform, then perhaps there is
something wrong with my installation, which is:
GNU Emacs 21.2.2 (sparc-sun-solaris2.7, X toolkit)
Incidentally, I have found that (window-hscroll) and
(set-window-hscroll) behave exactly as I would expect them to, i.e.,
when I (set-window-hscroll nil 10), the tenth column of my buffer
moves to the first column of my window. Then if I use (scroll-left
1) or (scroll right 1), (window-hscroll) returns the number of the
buffer column that currently appears in the first column of the
window. I would expect (window-vscroll) and (set-window-vscroll) to
behave in an analagous fashion, except vertically, e.g. the value
returned by (window-vscroll) would change by 1 after I execute
(scroll-up 1) or (scroll-down 1) -- assuming of course that I was
not already at the top or bottom of the buffer so no scrolling
occurred -- but instead it changes back to 0, no matter what buffer
line is at the top of the window.
Has anyone else actually tried using these functions? If so, has
your experience been different from mine?
Thanks.
--Greg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-11-14 18:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.54.1068771069.399.help-gnu-emacs@gnu.org>
2003-11-14 0:44 ` window-vscroll broken? David Kastrup
2003-11-14 18:15 ` Greg Hill
2003-11-13 23:35 Greg Hill
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).