Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how can I replace one keybing with another one ?

65 views
Skip to first unread message

horse_rivers

unread,
Sep 26, 2012, 4:25:02 AM9/26/12
to emacs help list
hi,
    how can I  replace one keybing  with  another  one ? 
   for example,I want to use ctrl-a to replace ctrl-x-o,how to write my .emacs file?

thanks!

Pascal J. Bourguignon

unread,
Sep 26, 2012, 6:10:33 AM9/26/12
to
C-h k C-x C-o will tell you waht function is bound to C-x C-o.
(global-set-key (kbd "C-a") 'that-function) in you ~/.emacs will bind
C-a to that function.

Here, C-x C-o is bound to delete-blank-lines, so:
(global-set-key (kbd "C-a") 'delete-blank-lines)
You can activate it immediately typing C-x C-e after it.

--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.

horse_rivers

unread,
Sep 26, 2012, 9:07:24 AM9/26/12
to help-gn...@gnu.org



oh,yeah! thank you very much!
but what is  the meaning of kbd ?

Óscar Fuentes

unread,
Sep 26, 2012, 10:52:05 AM9/26/12
to help-gn...@gnu.org
horse_rivers <horse_...@126.com> writes:

> oh,yeah! thank you very much!
> but what is the meaning of kbd ?

C-h f kbd [ENTER]

kbd is a compiled Lisp function in `subr.el'.

(kbd KEYS)

Convert KEYS to the internal Emacs key representation.
KEYS should be a string constant in the format used for
saving keyboard macros (see `edmacro-mode').


horse_rivers

unread,
Sep 26, 2012, 9:15:58 PM9/26/12
to help-gn...@gnu.org


is there some documentation   for  these  base knowledge?

thanks!

Óscar Fuentes

unread,
Sep 26, 2012, 10:25:54 PM9/26/12
to help-gn...@gnu.org
horse_rivers <horse_...@126.com> writes:

> is there some documentation for these base knowledge?

Emacs is self-documented, as demonstrated on the response to your
previous inquiry. Additionally, it comes with a manual for the Emacs
Lisp language and for Emacs proper.

To learn more explore the contents of the Help menu in your Emacs.

If your question is about representing key sequences, see the "Key
Sequences" section on the Elisp Manual.


horse_rivers

unread,
Sep 26, 2012, 10:39:41 PM9/26/12
to help-gn...@gnu.org


thank you  !

if I want to  read the manul for lisp in emacs  help manul doc  ,what  key to type in emacs ?

Óscar Fuentes

unread,
Sep 26, 2012, 11:36:15 PM9/26/12
to help-gn...@gnu.org
horse_rivers <horse_...@126.com> writes:

> if I want to read the manul for lisp in emacs help manul doc ,what key
> to type in emacs ?

Go to the "Help" menu, then to "More Manuals" and finally to "Emacs Lisp
Reference".

Another way is

C-h i m elisp [INTRO]

It is recommended to first read the "Introduction to Emacs Lisp",
available from the same submenu as the other manual.


horse_rivers

unread,
Sep 27, 2012, 2:04:45 AM9/27/12
to help-gn...@gnu.org


when  I   read  the  manul .I will get  into  the subitem  step  by  step , so how  to come back  to  previous  view  ?

Stefan Schlee

unread,
Sep 27, 2012, 12:08:56 PM9/27/12
to help-gn...@gnu.org
You might want to read the html-versions of these manuals:

http://www.gnu.org/software/emacs/manual/emacs.html

http://www.gnu.org/software/emacs/emacs-lisp-intro/

http://www.gnu.org/software/emacs/manual/elisp.html



From: horse_rivers <horse_...@126.com>
To: help-gn...@gnu.org
Sent: Thursday, September 27, 2012 8:04 AM
Subject: Re:Re: how can I replace one keybing with another one ?
0 new messages