In emacs23 how to bound C- to C- instead of C-J

前端 未结 3 584
轻奢々
轻奢々 2020-12-17 08:16

I am trying to use org-mode and whenever I press Crtl+return emacs does C-J instead. I know this because when I use c-h k and then press crtl+return, emacs shows: \"It is bo

3条回答
  •  旧时难觅i
    2020-12-17 08:38

    That's not a valid sequence for most terminals, I'm afraid, so they simply can't send it to Emacs.

    If you run GUI Emacs instead, the key bindings will work.

    Thomas Dickey's xterm is the only terminal software I know of which can (I think) support all the normal Emacs bindings. If you're okay with compiling that, then you could try it with the following .Xdefaults-(hostname) (or .Xresources if you re-merge after editing) to get basic support working:

    XTerm*metaSendsEscape: true
    XTerm*modifier: meta
    XTerm*modifyOtherKeys: 1
    

    You actually need XTerm*modifyOtherKeys: 2 to fully extend the sequences (otherwise you still can't type the likes of C-M-%), but by default that setting will break most key sequences, and right now I couldn't tell you how to configure things correctly for that setting (the only example I've seen -- xterm-extras.el as mentioned on the wiki and available in the easymacs download -- didn't work for me).

    I mostly use GUI Emacs, but I'd love to get this working properly, so if anyone has had success with xterm-extras.el or similar, please do speak up.

提交回复
热议问题