unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Need Emacs command
@ 2010-04-24  3:26 gmspro
  2010-04-24 17:48 ` Dan Davison
  2010-04-26  2:41 ` hazlup
  0 siblings, 2 replies; 4+ messages in thread
From: gmspro @ 2010-04-24  3:26 UTC (permalink / raw)
  To: help-gnu-emacs

What's the command to move the cursor
1.in the middle column of a line?
2.at the beginning line/middle line/end line of a page,(the document was scrolled down before)not this M-< or M->
3.What's the command to get the cursor position?


      




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Need Emacs command
  2010-04-24  3:26 Need Emacs command gmspro
@ 2010-04-24 17:48 ` Dan Davison
  2010-04-24 17:56   ` Lennart Borgman
  2010-04-26  2:41 ` hazlup
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Davison @ 2010-04-24 17:48 UTC (permalink / raw)
  To: gmspro; +Cc: help-gnu-emacs

gmspro <gmspro@yahoo.com> 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

>
>
>       




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Need Emacs command
  2010-04-24 17:48 ` Dan Davison
@ 2010-04-24 17:56   ` Lennart Borgman
  0 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman @ 2010-04-24 17:56 UTC (permalink / raw)
  To: Dan Davison; +Cc: help-gnu-emacs, gmspro

On Sat, Apr 24, 2010 at 7:48 PM, Dan Davison <davison@stats.ox.ac.uk> wrote:
>
>> 3.What's the command to get the cursor position?
>
> The function is called point.

There is no command for that, but you can instead use

   C-x =

which gives you a bit more information.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Need Emacs command
  2010-04-24  3:26 Need Emacs command gmspro
  2010-04-24 17:48 ` Dan Davison
@ 2010-04-26  2:41 ` hazlup
  1 sibling, 0 replies; 4+ messages in thread
From: hazlup @ 2010-04-26  2:41 UTC (permalink / raw)
  To: Help-gnu-emacs




gmspro wrote:
> 
> What's the command to move the cursor
> 1.in the middle column of a line?
> 2.at the beginning line/middle line/end line of a page,(the document was
> scrolled down before)not this M-< or M->
> 3.What's the command to get the cursor position?
> 

What is your definition of "page". Current screen? From one form-feed to the
next?
-- 
View this message in context: http://old.nabble.com/Need-Emacs-command-tp28348322p28360350.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-26  2:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-24  3:26 Need Emacs command gmspro
2010-04-24 17:48 ` Dan Davison
2010-04-24 17:56   ` Lennart Borgman
2010-04-26  2:41 ` hazlup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).