It's not possible to know what you did to lose your original
binding, so here's the basic upshot.
- Your customizations (as with keybindings) will be stored in
your
init
file,
and any other elisp files you call from it.
- If it was a temporary change (i.e., you didn't make changes to
your
init
file manually or through customize
), you can
just restart Emacs.
- If you did make changes to your
init
file (intentionally
or not), the problem will persist into new Emacs sessions.
- If you have no idea what code in the
init
file is causing
you to lose your binding, do the following:
- Start Emacs without your
init
file (emacs -Q
) to
confirm.
- Recursively bisect your
init
file by successively
commenting out halves until you isolate the problematic lines.
For a given keybinding, you can find out what it calls with C-h k
KEY SEQUENCE
, (where C-h k
calls describe-key
). For example,
you can try C-h k C-c a
.
For a given command, you can find out the keybindings with C-h f
FUNCTIONNAME
(where C-h f
calls describe-function
). For your
case, you can try C-h f org-agenda
to see what keybindings it has.
Note that the org
manual's node on
activation suggests
using C-c a
as a global keybinding to access org-agenda
, but
you're under no obligation to use that particular binding. If you
want to bind it again, you can follow it's suggestion with:
(global-set-key "\C-ca" 'org-agenda)
You can put that in your scratch
buffer and evaluate it, but it
should be somewhere in your init
file if you want it to persist
through Emacs sessions.
As an aside, the reason C-c a
is not a hard and fast binding is
that it runs against
keybinding conventions in Emacs,
one of which states:
Don't define C-c letter
as a key in Lisp programs. Sequences
consisting of C-c
and a letter (either upper or lower case)
are reserved for users; they are the only sequences reserved for
users, so do not block them.
More generally, have a look at the Emacs manual node on
Customizing Key Bindings
to find out how to bind keys as you like.