2

I just updated emacs org-mode and when visiting org files, this binding takes effect:

C-TAB (org-force-cycle-archived) Cycle a tree even if it is tagged with ARCHIVE.

What's the best way to disable this binding?

I use C-Tab for moving between windows.

I tried creating a hook but this is not doing the trick. The local key binding still takes precedence.

(defun my-org-mode-hook ()
  (define-key global-map '[(control tab)] 'other-window)
  (define-key global-map '[(shift control tab)] 'my-other-window-back)
  (global-set-key '[(control tab)] 'other-window)
  (global-set-key '[(shift control tab)] 'my-other-window-back)
  (local-set-key '[(control tab)] 'other-window)
  (local-set-key '[(shift control tab)] 'my-other-window-back)
  )
(add-hook 'org-mode-hook 'my-org-mode-hook)
4

Here are examples of some things I disable in org-mode -- I used require, but you could use instead an eval-after-load -- you don't need to do it each time an org-mode buffer loads (e.g., a mode-hook is overkill):

(require 'org)

(define-key org-mode-map (kbd "<M-S-up>") nil)
(define-key org-mode-map (kbd "<M-S-down>") nil)
(define-key org-mode-map (kbd "<M-up>") nil)
(define-key org-mode-map (kbd "<M-down>") nil)
(define-key org-mode-map (kbd "<M-S-left>") nil)
(define-key org-mode-map (kbd "<M-S-right>") nil)
(define-key org-mode-map (kbd "<M-left>") nil)
(define-key org-mode-map (kbd "<S-left>") nil)
(define-key org-mode-map (kbd "<S-right>") nil)
(define-key org-mode-map (kbd "<S-up>") nil)
(define-key org-mode-map (kbd "<S-down>") nil)
(define-key org-mode-map (kbd "<M-right>") nil) 
(define-key org-mode-map (kbd "C-<tab>") nil)
(define-key org-mode-map (kbd "C-S-<tab>") nil)
(define-key org-mode-map (kbd "<C-up>") nil)
(define-key org-mode-map (kbd "<C-down>") nil)
  • Excellent! works perfectly! – justingordon Oct 20 '14 at 5:00

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.