For some reason when I press Up, Down, Left or Right keys on keyboard in dired+ mode, emacs reads them all as M-O key, which I found out by describe-key command in dired+ buffer. I have no config regarding diredp in my config, just that:

(use-package dired+
  :ensure t)

Also, when pressing arrow keys in diredp in minibuffer appears change owner of auto-save-list, and depending on Up, Down, Left, Right, character appear in input field are A, B, D, C, which is even more confusing.

In ordinary dired buffer arrow keys appears normally. Also I'm working in emacs-nox session.

  • Can you reproduce this starting with emacs -Q? If so, please post a step-by-step recipe to repro the problem, starting with emacs -Q and loading dired+.el with just M-x load-file. If you don't see the problem with emacs -Q, even after loading dired+.el, then recursively bisect your init file to find the culprit. – Drew Nov 11 '17 at 16:59
  • Also, please mention your Emacs version: M-x emacs-version. (I don't know what emacs-nox means.) – Drew Nov 11 '17 at 17:01
  • Neither vanilla Dired nor Dired+ binds M-O (by which I guess you mean M-S-o) or M-o to dired-do-chown, which is sems to be the command that is getting invoked when you use an arrow key. They also do not bind arrow keys to that command. A guess is that something else in your init file is causing this. – Drew Nov 11 '17 at 17:06
  • 2
    I was bitten by this issue 3 years ago and wrote briefly about it on reddit/r/emacs. – Omar Dec 16 '17 at 2:42
  • 4
    Possible duplicate of Dired+ key binding issues in terminal emacs – Stefan Dec 16 '17 at 3:14

I was able to solve this by configuring dired+ followingly:

(use-package dired+
  ;; This binding messes with the arrow keys, for some reason.
  (unbind-key "M-O" dired-mode-map))
  • That removes the Dired+ binding of M-S-o (aka M-O). It does not answer the question of why the arrow keys are getting redirected to M-O. – Drew Dec 16 '17 at 0:45

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.