ergoemacs/ergoemacs-mode

M-y in ido-mode conflicts with ergoemacs

kirill-lapshin opened this issue · 0 comments

This is follow up to #517. Previously I had ergoemacs version circa 2020 and ido-mode. With no additional setup on my end M-y was bound to ido-next-match. After upgrading to emacs 28 and ergoemacs 20220411.338 M-y doesn't work anymore. I have it in my muscle memory and would really like to get this binding back. I got M-y in ergoemacs bound back to isearch (see #517), but can't get bindings work in ido-mode.

Minimal repro config below. Here I'm trying to add ido-mode keybindings. If I comment out ergoemacs from the config, then my ido-mode bindings work just fine. Together with ergoemacs they don't. What I observe is: C-x b brings "Buffer: " promt, next I press M-y and get "I-search:" prompt instead of ido-next-match behavior cycling through buffers.

(require 'package)
(package-initialize)

(setq ergoemacs-theme nil)
(setq ergoemacs-keyboard-layout "us")
(require 'ergoemacs-mode)
(ergoemacs-mode 1)

(define-key ergoemacs-user-keymap (kbd "M-y") 'isearch-forward)
(define-key ergoemacs-user-keymap (kbd "M-Y") 'isearch-backward)
(define-key isearch-mode-map (kbd "M-y") 'isearch-repeat-forward)
(define-key isearch-mode-map (kbd "M-Y") 'isearch-repeat-backward)

(require 'ido)
(setq ido-enable-flex-matching t)
(ido-mode 1)

(defun bind-ido-keys()
  "Keybindings for IDO"
  (define-key ido-completion-map (kbd "M-y") 'ido-next-match)
  (define-key ido-completion-map (kbd "M-Y") 'ido-prev-match)
)

(add-hook 'ido-setup-hook 'bind-ido-keys)