unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Greg Hill <ghill@synergymicro.com>
Subject: Re: window-vscroll  broken?
Date: Fri, 14 Nov 2003 10:15:23 -0800	[thread overview]
Message-ID: <p06002002bbdac1d40557@[198.17.100.22]> (raw)
In-Reply-To: <x58ymj4w43.fsf@lola.goethe.zz>

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

  reply	other threads:[~2003-11-14 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2003-11-13 23:35 Greg Hill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='p06002002bbdac1d40557@[198.17.100.22]' \
    --to=ghill@synergymicro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).