Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have recently started using org mode in emacs, but my macro bound in my initialisation file to C-x C-k T no longer works because this combination is used by outline mode which underpins org mode. I went by "Learning Gnu Emacs" by Debra Cameron et al. pub by O'Reilly, which states on page 160 that the sequences C-x C-k with 0-9 and A-Z are reserved for user macro bindings. This itself is contradicted, I have just noticed, on page 193, where, in outline mode, C-c C-k is bound to Show -> Show branches.

So, please, are there any key sequences that are available still, and will be in all circumstances?

I have left out the detail of my macro because it is irrelevant to this question.


I have left the original question as it is to explain my mistake. Thanks to @Gilles I realise that I made a silly mistake in confusing C-c with C-x. The problem manifested itself in that using .org mode seemed to redefine my key bindings. This I have now resolved by using C-x <letter> instead of C-c <letter>. Macros bound to these still work in .org mode

As to the question of what key sequence bindings are available, see: http://ergoemacs.org/emacs/emacs_set_keys_for_major_mode.html. This is part of an excellent and comprehensive set of articles on emacs by "Xah", available at: http://ergoemacs.org/emacs/emacs.html, and well worth the $15 he asks for them.

This is almost an answer rather than an extension to my question. I have put it here to retain my acceptance of @Gilles earlier answer, and as it is too long for a comment

share|improve this question
    
+1 Good question! I always worry when I have to pick a new keybinding that I might have to "unlearn" it at some point. –  rahmu Sep 29 '13 at 20:28

1 Answer 1

up vote 2 down vote accepted

C-x C-k is a prefix key for commands related to keyboard macros. It isn't used by Outline mode or Org mode. C-x C-k followed by a digit or uppercase letter is reserved for user macro bindings and these sequences can be assigned via C-x C-k b.

The prefix C-c followed by another control character or by some punctuation signs is reserved for major modes, so it's natural that Outline mode would bind a command to C-c C-k.

C-c followed by a letter is reserved for users. I can't find any mention of that in the Emacs manual; it is mentioned in the Lisp manual. Numbered function keys are also reserved for users (a few have default definitions in core features but modes normally don't touch them).

share|improve this answer
    
Thank you @Gilles. Ok, but in .org mode C-c C-h brings up a window headed Major Mode Bindings Starting With C-c: that includes the line: C-c C-k org-kill-note-or-show-branches. I am completely confused. –  Harry Weston Sep 30 '13 at 11:14
    
@HarryWeston I am confused by your confusion. C-c C-k is within the major modes's domain, and it's used by a major mode, so what surprises you? –  Gilles Sep 30 '13 at 14:37
    
Thank you @Gilles for your attempts to help. I am surprised by your lack of understanding of my plight. I am confused by a plethora of technical terms. I would say, kindly, that you are suffering from the common expert assumption of a lot of background knowledge in your reader, and a fear of seeming patronising. At risk of understandably trying your patience, please insult my ignorance by explaining in a bit more detail. –  Harry Weston Sep 30 '13 at 18:00
    
@HarryWeston I really have no idea what you don't understand. What command specifically in Org Mode conflicts with your shortcut key for your macro? Also, in your question and in your comment, you switch between C-c and C-x as the first key; this may be related to your confusion, but I don't know how, because I don't understand why you switch. –  Gilles Sep 30 '13 at 18:14
    
Thank you @Gilles for your continued patient answers. Yes I have obviously confused C-c with C-x. I am 82 years old, still trying to learn, please put it down to a Senior Moment. I will have to think again about it all. Oh dear, very sorry. –  Harry Weston Sep 30 '13 at 18:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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