From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Scrolling the screen vertically
Date: Wed, 04 Jul 2012 23:20:43 +0300 [thread overview]
Message-ID: <834npn46sk.fsf@gnu.org> (raw)
In-Reply-To: <CAM8kQFy5qbcsqxhhO+1EMjwy4=1BSy4xvk7rt50NdZ5OJy=37g@mail.gmail.com>
> Date: Wed, 4 Jul 2012 21:19:08 +0300
> From: Valera Rozuvan <valera.rozuvan@gmail.com>
>
> 1.) move to the column X + ((80 / 2) - 2) (scroll by half the screen's
> width to the right, with an overlap of 2 columns)
> 2.) move to the column X - ((80 / 2) - 2) (scroll by half the screen's
> width to the left, with an overlap of 2 columns)
> 3.) move the cursor to Y - 2, where Y is the right-most column visible
> on the screen
> 4.) move the cursor to Z + 2, where Z is the left-most column visible
> on the screen
>
> Note that cases 1 and 3 are not the same, because the cursor can be
> positioned anywhere (for example X = Y - 2). Same with cases 2 and 4.
>
> So I need functions to determine X, Y, Z, and the screen's width. Then
> I can write a function which will move the cursor forward and backward
> by a calculated number of characters.
Look at window-width and window-hscroll, I think they give you all you
need. The functions to actually scroll are those bound to the keys I
mentioned, and you can control by how much to scroll by giving them an
argument (see their doc strings).
next prev parent reply other threads:[~2012-07-04 20:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-04 18:19 Scrolling the screen vertically Valera Rozuvan
2012-07-04 20:20 ` Eli Zaretskii [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-06 15:38 Valera Rozuvan
2012-07-04 14:29 Valera Rozuvan
2012-07-04 15:34 ` Eli Zaretskii
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=834npn46sk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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).