From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Davison Newsgroups: gmane.emacs.help Subject: Re: Need Emacs command Date: Sat, 24 Apr 2010 13:48:47 -0400 Message-ID: <874oj02134.fsf@stats.ox.ac.uk> References: <928748.86189.qm@web65820.mail.ac4.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272131367 29668 80.91.229.12 (24 Apr 2010 17:49:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 24 Apr 2010 17:49:27 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: gmspro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 24 19:49:25 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1O5jTj-0008T6-3W for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Apr 2010 19:49:19 +0200 Original-Received: from localhost ([127.0.0.1]:60676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5jTi-0003HF-Ge for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Apr 2010 13:49:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5jTL-0003H5-80 for help-gnu-emacs@gnu.org; Sat, 24 Apr 2010 13:48:55 -0400 Original-Received: from [140.186.70.92] (port=38287 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5jTK-0003Gr-4l for help-gnu-emacs@gnu.org; Sat, 24 Apr 2010 13:48:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5jTI-00053W-Pj for help-gnu-emacs@gnu.org; Sat, 24 Apr 2010 13:48:54 -0400 Original-Received: from markov.stats.ox.ac.uk ([163.1.210.1]:55934) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5jTI-000537-Ht for help-gnu-emacs@gnu.org; Sat, 24 Apr 2010 13:48:52 -0400 Original-Received: from blackcap.stats.ox.ac.uk (blackcap.stats [163.1.210.5]) by markov.stats.ox.ac.uk (8.13.6/8.13.6) with ESMTP id o3OHmn9r013761; Sat, 24 Apr 2010 18:48:50 +0100 (BST) Original-Received: by blackcap.stats.ox.ac.uk (Postfix, from userid 5158) id CCD5B3201D; Sat, 24 Apr 2010 18:48:49 +0100 (BST) In-Reply-To: <928748.86189.qm@web65820.mail.ac4.yahoo.com> (gmspro@yahoo.com's message of "Fri, 23 Apr 2010 20:26:53 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Solaris 8 (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:72819 Archived-At: gmspro writes: > What's the command to move the cursor As far as I know you have to define your own commands for these. In other words there are elisp functions which do these things or which can be combined to do them, but they are not "commands" in the sense that you cannot use M-x to call them and they are not bound to keys. You only have to do a little bit of work to make commands for what you want: > 1.in the middle column of a line? See below, and the function point-at-eol > 2.at the beginning line/middle line/end line of a page,(the document was scrolled down before)not this M-< or M-> First see the command recenter-top-bottom (C-l) if you haven't already. If I've understood right, your middle line command could be something like this. (defun my/goto-mid-window-line () (interactive) (goto-char (/ (+ (window-start) (window-end)) 2)) (beginning-of-line)) The others should be easy to make by altering it. Once you define functions like these (they must use the (interactive) expression), you can bind them to keys. > 3.What's the command to get the cursor position? The function is called point. dan > > >