From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Will Willis Newsgroups: gmane.emacs.help Subject: Re: scroll buffer so that current line becomes first visible line Date: Fri, 24 Apr 2009 06:17:23 -0500 Message-ID: <6ee1e6090904240417od298ad0vb00c2c02ff2b27e9@mail.gmail.com> References: <87iqku1mb6.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1240571890 30106 80.91.229.12 (24 Apr 2009 11:18:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Apr 2009 11:18:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 24 13:19:29 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LxJRB-0007aJ-Vl for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Apr 2009 13:19:22 +0200 Original-Received: from localhost ([127.0.0.1]:42535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LxJPm-0007D1-NW for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Apr 2009 07:17:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LxJPO-0007Ck-LP for help-gnu-emacs@gnu.org; Fri, 24 Apr 2009 07:17:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LxJPJ-0007CX-3v for help-gnu-emacs@gnu.org; Fri, 24 Apr 2009 07:17:29 -0400 Original-Received: from [199.232.76.173] (port=35586 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LxJPI-0007CU-U2 for help-gnu-emacs@gnu.org; Fri, 24 Apr 2009 07:17:24 -0400 Original-Received: from mail-qy0-f116.google.com ([209.85.221.116]:61747) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LxJPI-000278-Lu for help-gnu-emacs@gnu.org; Fri, 24 Apr 2009 07:17:24 -0400 Original-Received: by qyk14 with SMTP id 14so2036146qyk.14 for ; Fri, 24 Apr 2009 04:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=83iFMq7ftfz0FvKN9VktAchEk+mF/rPLLo3N+7Laarw=; b=acc/OTMePbjr3fqdHvqxo0x7uvHqbzQ2820Xt+ACPiYMo5Xj7HK0P6dgfwlt0tSiSO WEoD3kCS3Nq0oOyWMKqenSrxbHFPl1wwKMNdlGkWxJOTSapnQbTJt11KDhwE/uQ8IEWX OqSq+eHNjWDgxyK7cKFmaRQNpVWeuUZzcu0U8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=gQYLBHCa14zlzft4HdVqRCJpluGlzsYsFG4tuZT4dnLGooiyqPG1YYWS294nkCS6xX Ohdi1dE9lZDlP0/yOV/cU8my7kf1Ok6evPwFmn0ZfgCBUWmhlypNhP50mJn4etyRQfGv Il7TI/RY2Mq5QS7RoaCU/XPAcWawMWnRd4drM= Original-Received: by 10.224.28.66 with SMTP id l2mr2546804qac.52.1240571843584; Fri, 24 Apr 2009 04:17:23 -0700 (PDT) In-Reply-To: <87iqku1mb6.fsf@lion.rapttech.com.au> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64004 Archived-At: Thank you all for the help!! -Will On Fri, Apr 24, 2009 at 3:35 AM, Tim X wrote: > Will Willis 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 =A0at > 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 >