Skip to main content
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
Became Hot Network Question
Source Link

Shift+Ctrl+arrow to enlarge and shrink windows does not work in org-mode

Similarly to what is described here, org-mode overrides C-S-<arrow> key-binds which, in order to control the size of the windows, I have defined as follows:

(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
(global-set-key (kbd "S-C-<up>") 'enlarge-window)
(global-set-key (kbd "S-C-<down>") 'shrink-window)

I would expect an identical solution to work, i.e.:

(add-hook 'org-ctrl-shiftright-final-hook 'enlarge-window-horizontally)
(add-hook 'org-ctrl-shiftleft-final-hook 'shrink-window-horizontally)
(add-hook 'org-ctrl-shiftup-final-hook 'enlarge-window)
(add-hook 'org-ctrl-shiftdown-final-hook 'shrink-window)

However the above has no effect at all. In org-mode those keys are still bind to setting and clearing marks (up/down combinations) and to work with the clock log (right/left combinations). In particular, they are bound to org-shiftcontrolup (and similar for the remaining three).

Does someone know how can one successfully override these key-binds in org-mode?