From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: scroll buffer so that current line becomes first visible line Date: Fri, 24 Apr 2009 07:01:55 -0700 Message-ID: <001a01c9c4e5$3c114750$0200a8c0@us.oracle.com> References: <87iqku1mb6.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1240582241 598 80.91.229.12 (24 Apr 2009 14:10:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Apr 2009 14:10:41 +0000 (UTC) To: "'Tim X'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 24 16:12:00 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 1LxM0Y-0000wW-J2 for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Apr 2009 16:04:02 +0200 Original-Received: from localhost ([127.0.0.1]:54480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LxLz9-0005hq-EC for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Apr 2009 10:02:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LxLyp-0005hl-SE for help-gnu-emacs@gnu.org; Fri, 24 Apr 2009 10:02:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LxLyl-0005hW-CB for help-gnu-emacs@gnu.org; Fri, 24 Apr 2009 10:02:15 -0400 Original-Received: from [199.232.76.173] (port=48429 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LxLyl-0005hS-9t for help-gnu-emacs@gnu.org; Fri, 24 Apr 2009 10:02:11 -0400 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:28744) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LxLyk-0007mN-IF for help-gnu-emacs@gnu.org; Fri, 24 Apr 2009 10:02:10 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n3OE28w3010269 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 Apr 2009 14:02:09 GMT Original-Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n3OE1xlA008295; Fri, 24 Apr 2009 14:02:01 GMT Original-Received: from dradamslap1 (/98.210.250.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 24 Apr 2009 07:01:57 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87iqku1mb6.fsf@lion.rapttech.com.au> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 thread-index: AcnEuF/5YJG1wn7YRA+GXZ4BPtGZBwALA8Pw X-Source-IP: acsmt700.oracle.com [141.146.40.70] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010202.49F1C65B.005D:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:64005 Archived-At: > 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? Yes, this is originally from my code, and it is available for Emacs 22,21, 20 here: http://www.emacswiki.org/emacs/misc-cmds.el. So, to move the current line to the top, use C-l C-l. To move it to the bottom, use C-l C-l C-l.