Newer versions of org-mode remap C-up to org-backward-paragraph.

I would like C-up not to be remapped (and continue to use the standard Emacs' backward-paragraph instead).

But the standard ways of avoiding this remap do not work with org-mode (i.e., (local-unset-key [C-up]) and (define-key org-mode-map [C-up] 'backward-paragraph)) don't do anything). It seems that org-mode achieves this by remapping functions, not key bindings.

How to disable org-mode from remapping C-up?

Many thanks!


Org mode remaps all bindings of forward-paragraph and backward-paragraph to their Org counterparts with the following code which is executed when org.el is loaded:

(org-defkey org-mode-map [remap forward-paragraph] 'org-forward-paragraph)
(org-defkey org-mode-map [remap backward-paragraph] 'org-backward-paragraph)

You can undo this by overriding the remappings after org.el is loaded.

(defun org-take-back-paragraph-bindings ()
  (define-key org-mode-map [remap backward-paragraph] nil)
  (define-key org-mode-map [remap forward-paragraph] nil))
(eval-after-load "org" '(org-take-back-paragraph-bindings))
| improve this answer | |
  • 1
    Something I only noticed recently is that the form you pass to eval-after-load can be a function. Hence in this scenario you could use: (eval-after-load "org" #'org-take-back-paragraph-bindings) – phils Dec 1 '14 at 0:40

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.