3

I was asking a similar question about the main concept behind default emacs key bindings. But this one is more specific to C-c and C-x.

I know and use some commands/functions/features bind to C-c or C-x by default. I also have my own cheat sheet for that.

The problem ist that I often got the two mixed up. It would help my brain to understand the concept (if there is one) behind that two major keys. Most of time I remember the key-binding for a special command but did not remember if I need to start it with C-c or C-x.

Are there a special type of function always going to C-c and another type that always (or most) goes to C-x.

1 Answer 1

6

The normal C-x keymap is for global bindings which are expected to do something regardless of the active modes. Conversely:

Sequences consisting of ‘C-c’ followed by a control character or a digit are reserved for major modes.

Sequences consisting of ‘C-c’ followed by ‘{’, ‘}’, ‘<’, ‘>’, ‘:’ or ‘;’ are also reserved for major modes.

Sequences consisting of ‘C-c’ followed by any other ASCII punctuation or symbol character are allocated for minor modes.

-- C-hig (elisp)Key Binding Conventions

Also:

Sequences consisting of ‘C-c’ and a letter (either upper or lower case) are reserved for users.

Although those would commonly be global bindings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.