unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: scroll buffer so that current line becomes first visible line
Date: Fri, 24 Apr 2009 18:35:25 +1000	[thread overview]
Message-ID: <87iqku1mb6.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: mailman.5917.1240539505.31690.help-gnu-emacs@gnu.org

Will Willis <will.willis@gmail.com> writes:

> 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?
>
maybe of no real help, but....

Emacs 23 (CVS emacs) has re-worked C-l. When you press it the first
time, it centers (old behavior). Press it again and the line is put  at
the top of the buffer, hit it a third time and it goes to the
bottom. I've found it really useful. 

It may be possible to retro-fit it to emacs 22?

Tim


-- 
tcross (at) rapttech dot com dot au


       reply	other threads:[~2009-04-24  8:35 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 ` Tim X [this message]
2009-04-24 11:17   ` scroll buffer so that current line becomes first visible line Will Willis
2009-04-24 14:01   ` Drew Adams
2009-04-24 15:28 ` Giorgos Keramidas
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=87iqku1mb6.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --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).