From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: how to move the contents of the buffer one line up/down? Date: Mon, 14 Jul 2008 07:11:16 -0500 Message-ID: References: <6e0qu9F4kpduU2@mid.individual.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216039363 4664 80.91.229.12 (14 Jul 2008 12:42:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jul 2008 12:42:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 14 14:43:31 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 1KINOS-0003cP-DZ for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Jul 2008 14:43:04 +0200 Original-Received: from localhost ([127.0.0.1]:60004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KINNa-0000q0-CU for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Jul 2008 08:42:10 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 14 Jul 2008 07:11:00 -0500 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) Original-Newsgroups: gnu.emacs.help In-Reply-To: <6e0qu9F4kpduU2@mid.individual.net> Original-Lines: 21 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 65.45.140.2 Original-X-Trace: sv3-93VqdA/gdB1KgAgpWcH52pRKiLsQCubg4hClvTnk5jB0lAQuRpLZbtPTbme2i954gM89UqLgG37Qxgb!kIOLdHsVghmzyreqiEE8O1Uf3xdFzxfTKbShNgFqHuBzV6G7TDmuD2k7am/4mziYkdOkCg86yEPI!KWLBhteV7G0HS8G312iY2t/InX/9 Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:160196 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:55545 Archived-At: Tamas K Papp wrote: > Hi, > > I know that I can "center" my cursor with C-l. But sometimes it would be > really useful to do the following: have the contents of the buffer move > up or down a couple of lines, with the cursor staying in the same place. > > What function would do that? Then I could bind it to a key. > > Thanks, > > Tamas Look at C-h f scroll-up and scroll-down. For a demo try: C-u 1 M-x scroll-up Maybe this works, I don't know. Evaluate it and try it: (global-set-key [(super q)] (lambda () (interactive) (scroll-up 1)))