From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: How to move the cursor to the bottom of the screen? Date: Thu, 10 Jan 2008 10:32:43 +0100 Message-ID: <87ir22rpok.fsf@dell.linuxdev.us.dell.com> References: <47851D69.8010101@gmail.com> <20080110081546.GA1360@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199957603 19875 80.91.229.12 (10 Jan 2008 09:33:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2008 09:33:23 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Ye ilho To: Alan Mackenzie Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 10 10:33:38 2008 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 1JCtn7-0003vE-2n for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2008 10:33:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCtmj-0006lH-Cz for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2008 04:33:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCtmL-0006iI-UD for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 04:32:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCtmK-0006hE-Sv for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 04:32:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCtmK-0006h1-LI for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 04:32:48 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.158]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JCtmK-0001rz-7G for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 04:32:48 -0500 Original-Received: by fg-out-1718.google.com with SMTP id d23so1180248fga.30 for ; Thu, 10 Jan 2008 01:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references:face:date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=bSZ2N2dQmtmHJ5G602oH0+YybFKS7Wh3srLPRqGJ5dg=; b=maUc7msaTL4pVWThj8VK6fCK6FZQvEdPqJd46gqrOteuYWqxA/8DhlLUwGaU8Jfx9hI0IoZacYhaVEeZK3KghnlhYW9dMz0zRDf+CBLHXw40r0m8lmWuxMfxFeg0ziwK/Gqjh7D0kq7BDNPIwwFPObozUlhWxs2BGXa5V9Ti/94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:face:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=sqVDzkUIXIjpf+LQRd+vtMmDyYU2X2nJxEeOA3Njk1zkYWucqIbn0uP93yR38SCh8UBD+ZsQtQwTEe5yxY45KLyKT2evRwj5MKCa/fG7oqr3/x1CMoOKbGMN3061kxXlYJJrQtXlhVk4+sQk9+hCflvRziXYjsc0BgECAd2AIoU= Original-Received: by 10.82.146.14 with SMTP id t14mr2802312bud.9.1199957567068; Thu, 10 Jan 2008 01:32:47 -0800 (PST) Original-Received: from dell.linuxdev.us.dell.com ( [78.114.18.34]) by mx.google.com with ESMTPS id y2sm4573278mug.9.2008.01.10.01.32.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Jan 2008 01:32:45 -0800 (PST) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEUHAwJfJRBxTStaVVUq QleXMROlTymlaEzRTR/FRCfb1LmsjGQqBf0nAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+ElEQVQ4 y3VTPW/bQAw9Jorno5pzGmSxDCQBuhkpumSpIaFzrgAdaZQBSejWNkiEIFMHIeetLiBDWjtqbIB0 6J8rz0Xhj5w5mDDf8ZF8pIT4b96WX1kkdlgUvXcDXrQrJwqXKXBTXm1meOFbi5wH/q20gaOySP9B 4cUT//qoHgfs937TsPhs44fh4dhS4WvznX2hATC3wEnXPQ0sEJsf7DJku+aU8Zuu+2nJR7Gphehl ZGaUPwbD4Z+u+2WrB4lZCHHQNmamVfHwPL25uAwCTmGqqRCJMUYL6OfBVEbjDyoQQsVmLsTEmIpf gfQRPC5cSCD7VEA708shMPDCCFK6tRy2OUXLMcWeZMXhDj5xnNYVyS3u59A3TYVrcci1lDCZcput 3tDwiP+fGlYNcVN0vP8a9DPpWAdqQFd8/91o6Fpfr6wnKB1r7yXtXIp9xymcaXx1OXIcCpI/xHLw EoCizcjOtt0anLV1XNMAfDwfbVAp3mVSfQNCzNO1BFQUk2pSJNKx+bICTokrKNLimHh581VKSvyU uLJqqao+roCxBGahK15dQrTRGRzXlsNPar01SsxbnU3KO9we0QKV0i+0h6QxJkWH9KpZXpRDrqzV 7o8Nd8QP+IKcwKS+fhg4gXZx7wL4jJOFi4uVb1JnHFXuvDhE7W4X18/5L9gPfl3mJR3tAAAAGnpU WHRKUEVHLUNvbG9yc3BhY2UAAHjaMwIAADMAMxEWfmMAAAAnelRYdEpQRUctU2FtcGxpbmctZmFj dG9ycwAAeNozqjDSMawwBGEAEYMC6WQPG2IAAAAASUVORK5CYII= In-Reply-To: <20080110081546.GA1360@muc.de> (Alan Mackenzie's message of "Thu, 10 Jan 2008 08:15:46 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: 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:50620 Archived-At: Alan Mackenzie writes: > Hi, Ye! > > On Wed, Jan 09, 2008 at 02:23:38PM -0500, Ye ilho wrote: >> > > I am simply trying to go to the top/middle/bottom of the screen I see >> > > at the moment. >> > > I also tried your suggestion but that will take me to the >> > > beginning/end of buffer but not necessarily what I see on the screen >> > > at the moment. > >> > >> > >> > Try > >> > M-r >> > C-- M-r >> > C-1 M-r > > >> Thank you! That was what I was looking for. > > That's not quite what you were looking for - You said "in one > keystroke". You can get this by having special commands for this. Here > are the commands I use: > > > (defun screen-top () > "Move the point to the top of the screen." > (interactive) > (move-to-window-line 0)) > > (defun screen-bottom () > "Move the point to the bottom of the screen." > (interactive) > (move-to-window-line -1)) > > (global-set-key [C-left] 'screen-top) > (global-set-key [C-right] 'screen-bottom) Thats much better than the original keys M-- M-r and C-n M-r I change it a little like that we can do C-u n C-right or left (defun screen-top (&optional n) "Move the point to the top of the screen." (interactive "p") (move-to-window-line (or n 0))) (defun screen-bottom (&optional n) "Move the point to the bottom of the screen." (interactive "P") (move-to-window-line (- (prefix-numeric-value n)))) > > > Copy these lines into your .emacs file (if necessary, create this file > by doing C-x C-f ~/.emacs). C- will then go to top of screen, > C- to bottom of screen. Modify the last two of these lines if > you prefer different key sequences. > >> -- >> YES, JESUS LOVES YOU, TOO. >> For God so loved the world that he gave his one and only Son, that >> whoever believes in him shall not perish but have eternal life(John >> 3:16). > > This is very off-topic, but I've never understood the logic connecting > the second bit of that sentence to the first. Couldn't God have somehow > arranged eternal life without being complicit in torturing somebody to > death first? -- A+ Thierry Pub key: http://pgp.mit.edu