2

When I press M-<up> in org-mode to move my headers I get this message in the minibuffer:

There is no other window

Why does my keybinding not work?

  • 3
    It sounds like the keybinding is not what you think it is. You can check with C-h k M-<up> and see what it says. Start Emacs without your init file (emacs -Q), and then bisect the init file until you find out what is causing the change in keybindings. – Dan Dec 9 '15 at 11:24
  • If I run C-h k M -<up> I get M-prior! I do not think it is caused by my init file. How can I change this? – falematte Dec 9 '15 at 13:42
  • M-prior (or M-<prior>) is a key sequence, not a command (unless someone defined a command with that name). (<prior> is the key named Page Up or similar on your keyboard.) What else did C-h k M-<up> tell you? – Drew Dec 9 '15 at 14:43
  • Here is the output pastebin.com/0SY8Nd0R – falematte Dec 9 '15 at 14:51
  • The output tells you the key is running scroll-other-window-down. You probably want to bind the command org-metaup, but first look up where it is already bound by type C-h w org-metaup when you are visiting a file in org-mode. – Andrew Swann Dec 10 '15 at 15:35
2

Your M-<up> is mapped on scroll-other-window-down somewhere. You really need to find where this shortcut is define. If you don't find the pb you can eventually overwrite the shortcuts but this turnaround is not recommended.

(require 'org)
(define-key org-mode-map (kbd "M-<down>") 'org-metadown) 
(define-key org-mode-map (kbd "M-<up>") 'org-metaup)

or

(eval-after-load "org"
    '(progn
      (define-key org-mode-map (kbd "M-<down>") 'org-metadown) 
      (define-key org-mode-map (kbd "M-<up>") 'org-metaup)))
  • Any hints on how to find the shortcut definition? I am almost sure I never set it up consciously. – falematte Dec 11 '15 at 7:13
  • Update: Here is the error message I get after editing my .emacs as you suggest: Symbol's value as variable is void: org-mode-map. – falematte Dec 11 '15 at 7:16
  • You need the require of the library (see edit). – djangoliv Dec 11 '15 at 12:19
  • I tried the new code and I get this error: File error: Cannot open load file, org-mode – falematte Dec 11 '15 at 13:47
  • Sorry s/org-mode/org/ – djangoliv Dec 11 '15 at 14:09

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.