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: Shortcut to have the cursor move X nu,ber of lines up or down Date: Sat, 30 Mar 2013 07:36:09 -0700 Message-ID: <9C3363AAAF9F4F749C69465B0EC4B2B2@us.oracle.com> References: <4dbd113f-ff71-4761-864a-b11e22fe90e4@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364654195 21797 80.91.229.3 (30 Mar 2013 14:36:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Mar 2013 14:36:35 +0000 (UTC) To: "'Rami A'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 30 15:37:02 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ULwtw-0001Yr-DR for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Mar 2013 15:37:00 +0100 Original-Received: from localhost ([::1]:57851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULwtX-00053Y-TE for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Mar 2013 10:36:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULwtK-00053G-Fl for help-gnu-emacs@gnu.org; Sat, 30 Mar 2013 10:36:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULwtJ-0000bK-9h for help-gnu-emacs@gnu.org; Sat, 30 Mar 2013 10:36:22 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:30105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULwtJ-0000bE-2J for help-gnu-emacs@gnu.org; Sat, 30 Mar 2013 10:36:21 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r2UEaHQU027598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 30 Mar 2013 14:36:18 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r2UEaHl2027863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Mar 2013 14:36:17 GMT Original-Received: from abhmt104.oracle.com (abhmt104.oracle.com [141.146.116.56]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r2UEaHej012156; Sat, 30 Mar 2013 09:36:17 -0500 Original-Received: from dradamslap1 (/10.159.227.58) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 30 Mar 2013 07:36:17 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4dbd113f-ff71-4761-864a-b11e22fe90e4@googlegroups.com> Thread-Index: Ac4tUqgIzLKXtexFQp2UPsQAQJl7xgAAL53w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89819 Archived-At: > I would like to have the cursor move up or down X number of lines. > Kind of like C-n and C-p but instead of 1 line to be a > programmable X number of lines. `C-h k C-n' tells you that it runs the command `next-line', and that a prefix arg does what you want: e.g., `C-6 C-n' moves down 6 lines. If you want a command that always moves a particular number of lines then roll that argument into the definition. (defun six-lines-down () "..." (interactive) (next-line 6))