Closed calliecameron closed 3 years ago
In theory, you should be able to use:
(ergoemacs-package dotfiles-keys-main
:bind*
(("<M-left>" . windmove-left)
("<M-right>" . windmove-right)
("<M-up>" . windmove-up)
("<M-down>" . windmove-down)))
Note the presence of the *
.
I'm assuming you want this everywhere, not just org-mode
. Sorry for the late reply.
I tried it and it didn't work. However by using f10eeccc1680390a07e6edf92899cbf55d7f0428 seemed to fix the issue for me. Now using the code above, the keys are bound everywhere.
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
.
Here's the minimal .emacs I'm using to test it:
(require 'package)
(setq
package-enable-at-startup nil
package-archives '(("melpa-stable" . "https://stable.melpa.org/packages/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
(use-package ergoemacs-mode
:config
(ergoemacs-mode))
(ergoemacs-package foo
:bind*
(("<M-left>" . windmove-left)
("<M-right>" . windmove-right)
("<M-up>" . windmove-up)
("<M-down>" . windmove-down)))
Did you upgrade ergoemacs?
Also you could try M-a ergoemacs-clear-cache
Yes, I'm using the latest ergoemacs from melpa. I've tried M-a ergoemacs-mode-clear-cache, and tried deleting .emacs.d altogether, and it still doesn't work. After experimenting a bit, it seems like :bind*
doesn't work for me at all, not just for these particular bindings.
Hm. It was working for me for a bit, but it stopped working again. I will have to figure out why. I'm sorry, it should work. You could define the key directly to see if it works in the mean time:
(bind-keys
:map ergoemacs-override-keymap
("<M-left>" . windmove-left)
("<M-right>" . windmove-right)
("<M-up>" . windmove-up)
("<M-down>" . windmove-down))
This works in the meantime, thanks.
It seems to work for me. I made a test and it passes as well. If it doesn't work, let me know.
It didn't pass on travis, so I'm reopening the issue.
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 runsergoemacs-org-metaup
:I have tried changing the bindings in org mode with
bind-keys
andlocal-set-key
, which works for M-left, but not the others. I managed to forcibly override the bindings usingoverriding-terminal-local-map
:but this is horrible, and often stops working. What is the proper way to change these bindings?
Using latest stable ergoemacs-mode on Emacs 25.1.