unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: help-gnu-emacs@gnu.org
Subject: Re: scroll buffer so that current line becomes first visible line
Date: Fri, 24 Apr 2009 18:28:58 +0300	[thread overview]
Message-ID: <8763gugjet.fsf@kobe.laptop> (raw)
In-Reply-To: mailman.5917.1240539505.31690.help-gnu-emacs@gnu.org

On Thu, 23 Apr 2009 21:18:20 -0500, Will Willis <will.willis@gmail.com> wrote:
> Hello, Is there a command/key binding to scroll my buffer so that the
> current line (the one with my cursor) becomes the first visible line
> in the window. This is akin to C-l, but instead of centering to the
> point, sticking the current line at the top of the window. I'm _not_
> looking to move the point to the first line (M-0 M-r).
>
> I'm not sure how this would work for shorter files, say only a few
> lines long, would a buffer who's length is shorter than the window
> height be able to scroll?

`C-l' works with a prefix too, so you can type `C-u 0 C-l' to redisplay
the buffer with the current line on top, or `C-u 30 C-l' to redisplay
everything and move the current line at line 30.



  parent reply	other threads:[~2009-04-24 15:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5917.1240539505.31690.help-gnu-emacs@gnu.org>
2009-04-24  8:35 ` scroll buffer so that current line becomes first visible line Tim X
2009-04-24 11:17   ` Will Willis
2009-04-24 14:01   ` Drew Adams
2009-04-24 15:28 ` Giorgos Keramidas [this message]
2009-04-24  2:18 Will Willis
2009-04-24  2:49 ` Xiao-Yong Jin
2009-04-24  8:38   ` Nikolaj Schumacher

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=8763gugjet.fsf@kobe.laptop \
    --to=keramida@ceid.upatras.gr \
    --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).