2

I cannot unbind the key M-l in org-mode.

When the cursor is in an org-mode buffer, I tried to eval (M-:)

(unbind-key "M-l" org-mode-map)
;; ^^^ from bind-key.el

(define-key org-mode-map (kbd "M-l") nil)

But C-h k M-l always says:

M-l runs the command org-demote-subtree (found in org-mode-map), which
is an interactive compiled Lisp function in ‘org.el’.

It is bound to M-l, C-c C->, <normal-state> M-l.

Same problem for other keys, e.g. C-k. I also use bind-key.el for other bindings, in case that is of interest.

schoettl
  • 123
  • 5
  • Has evil-mode remapped the Org keys? M-l is typically lower-case in the global key map. Did you also try (define-key org-mode-map (kbd "M-l") nil) ? – RichieHH Feb 17 '20 at 00:01
  • Yes, I already tried the command, see above. From the output of `C-h k M-l` (above), I guess, yes, evil-mode has remapped the key in normal mode "". But I'm not sure what this means. – schoettl Feb 17 '20 at 07:30
  • So you did, apologies. I missed that. – RichieHH Feb 17 '20 at 08:46

1 Answers1

2

I always use helpful-key to unbind my keys. It's not mandatory but gives better readability.

As you know, for different Emacs configuration everybody has different modes keybindings. So there is not any exact answer for everybody, but there is same path that can lead you to unbind unwanted keys.

The way that I do.

  1. Install package
  2. M-x helpful-keybind
  3. Press M-l

Key Bindings(Before)

evil-org-mode-map <insert-state> M-l
evil-org-mode-map <normal-state> >
evil-org-mode-map <normal-state> M-l
org-mode-map ESC <right>
  1. Depends on your keybinding, apply this changes
(define-key evil-org-mode-map (kbd "<insert-state> M-l") nil)
(define-key evil-org-mode-map (kbd "<normal-state> M-l") nil)

Key Bindings(After)

esc-map l 
global-map M-l
itirazimvar
  • 568
  • 4
  • 15
  • Thank you! I did not recognize that "" is part of the key binding. And I still don't understand it, to be honest; cannot find documentation on it. In my case it was just the `org-mode-map`. – schoettl Feb 18 '20 at 21:24