{"action":"created","issue":{"url":"https://api.github.com/repos/ergoemacs/ergoemacs-mode/issues/437","repository_url":"https://api.github.com/repos/ergoemacs/ergoemacs-mode","labels_url":"https://api.github.com/repos/ergoemacs/ergoemacs-mode/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/ergoemacs/ergoemacs-mode/issues/437/comments","events_url":"https://api.github.com/repos/ergoemacs/ergoemacs-mode/issues/437/events","html_url":"https://github.com/ergoemacs/ergoemacs-mode/issues/437","id":184680566,"number":437,"title":"Can't change keybinding for M-up in org mode","user":{"login":"CallumCameron","id":1798307,"avatar_url":"https://avatars.githubusercontent.com/u/1798307?v=3","gravatar_id":"","url":"https://api.github.com/users/CallumCameron","html_url":"https://github.com/CallumCameron","followers_url":"https://api.github.com/users/CallumCameron/followers","following_url":"https://api.github.com/users/CallumCameron/following{/other_user}","gists_url":"https://api.github.com/users/CallumCameron/gists{/gist_id}","starred_url":"https://api.github.com/users/CallumCameron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CallumCameron/subscriptions","organizations_url":"https://api.github.com/users/CallumCameron/orgs","repos_url":"https://api.github.com/users/CallumCameron/repos","events_url":"https://api.github.com/users/CallumCameron/events{/privacy}","received_events_url":"https://api.github.com/users/CallumCameron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-23T09:43:03Z","updated_at":"2016-10-26T19:21:52Z","closed_at":null,"body":"I want M-up to always run `windmove-up` (and the other M-arrow combinations to run the other windmove commands). With the following code, it works everywhere except in org-mode, where it always runs `ergoemacs-org-metaup`:\r\n```lisp\r\n    (ergoemacs-package dotfiles-keys-main\r\n        :bind\r\n        ((\"<M-left>\" . windmove-left)\r\n         (\"<M-right>\" . windmove-right)\r\n         (\"<M-up>\" . windmove-up)\r\n         (\"<M-down>\" . windmove-down)))\r\n\r\n```\r\n\r\nI have tried changing the bindings in org mode with `bind-keys` and `local-set-key`, which works for M-left, but not the others. I managed to forcibly override the bindings using `overriding-terminal-local-map`:\r\n```lisp\r\n    (add-hook 'org-mode-hook\r\n              (lambda ()\r\n                (unless overriding-terminal-local-map\r\n                  (setq overriding-terminal-local-map (make-keymap)))\r\n                (bind-keys\r\n                 :map overriding-terminal-local-map\r\n                 (\"<M-left>\" . windmove-left)\r\n                 (\"<M-right>\" . windmove-right)\r\n                 (\"<M-up>\" . windmove-up)\r\n                 (\"<M-down>\" . windmove-down))))\r\n```\r\n\r\nbut this is horrible, and often stops working. What is the proper way to change these bindings?\r\n\r\nUsing latest stable ergoemacs-mode on Emacs 25.1."},"comment":{"url":"https://api.github.com/repos/ergoemacs/ergoemacs-mode/issues/comments/256450571","html_url":"https://github.com/ergoemacs/ergoemacs-mode/issues/437#issuecomment-256450571","issue_url":"https://api.github.com/repos/ergoemacs/ergoemacs-mode/issues/437","id":256450571,"user":{"login":"CallumCameron","id":1798307,"avatar_url":"https://avatars.githubusercontent.com/u/1798307?v=3","gravatar_id":"","url":"https://api.github.com/users/CallumCameron","html_url":"https://github.com/CallumCameron","followers_url":"https://api.github.com/users/CallumCameron/followers","following_url":"https://api.github.com/users/CallumCameron/following{/other_user}","gists_url":"https://api.github.com/users/CallumCameron/gists{/gist_id}","starred_url":"https://api.github.com/users/CallumCameron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CallumCameron/subscriptions","organizations_url":"https://api.github.com/users/CallumCameron/orgs","repos_url":"https://api.github.com/users/CallumCameron/repos","events_url":"https://api.github.com/users/CallumCameron/events{/privacy}","received_events_url":"https://api.github.com/users/CallumCameron/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T19:21:52Z","updated_at":"2016-10-26T19:21:52Z","body":"It still doesn't work for me. Using `:bind*`, the keys don't get bound anywhere, even outside org-mode. Now M-left in e.g. lisp mode runs `ergoemacs-backward-open-bracket`.\r\n\r\nHere's the minimal .emacs I'm using to test it:\r\n\r\n    (require 'package)\r\n    (setq\r\n     package-enable-at-startup nil\r\n     package-archives '((\"melpa-stable\" . \"https://stable.melpa.org/packages/\")\r\n                        (\"melpa\" . \"https://melpa.org/packages/\")\r\n                        (\"gnu\" . \"https://elpa.gnu.org/packages/\")))\r\n    (package-initialize)\r\n    (unless (package-installed-p 'use-package)\r\n      (package-refresh-contents)\r\n      (package-install 'use-package))\r\n    (require 'use-package)\r\n    (setq use-package-always-ensure t)\r\n\r\n    (use-package ergoemacs-mode\r\n      :config\r\n      (ergoemacs-mode))\r\n\r\n    (ergoemacs-package foo\r\n      :bind*\r\n      ((\"<M-left>\" . windmove-left)\r\n       (\"<M-right>\" . windmove-right)\r\n       (\"<M-up>\" . windmove-up)\r\n       (\"<M-down>\" . windmove-down)))"}}
{"actor":{"display_login":"CallumCameron"}}