Closed ghost closed 7 years ago
I can't test this on windows, but this should fix your issue.
Its not actually related to the mouse, so make sure it works...
Thanks for the rapid fix! The error no longer appear anymore. It probably related to iterm2 + emacs + OSX, mouse-* key binding still not work yet in combination with ergoemacs.
I have used the following minimised setting.
;; Enable mouse support
(unless window-system
(require 'mouse)1
(xterm-mouse-mode t) ;;
(global-set-key [mouse-4] '(lambda ()
(interactive)
(scroll-down 1)))
(global-set-key [mouse-5] '(lambda ()
(interactive)
(scroll-up 1)))
)
(require 'ergoemacs-mode)
(setq ergoemacs-theme nil)
(setq ergoemacs-keyboard-layout "us")
(ergoemacs-mode 1)
mouse-[4, 5] will not trigger the proper function
Does it trigger the proper function without ergoemacs-mode enabled? I read some of the code and I'm unsure I term would send the required escape codes to translate the mouse events. It may require xterm.
It works while comment out ergoemacs-mode
Could you try the mouse-3 and mouse-4 events and see what messages are shown in the Messages buffer?
This should be fixed with the most recent version of ergoemacs-mode. Let me know if it doesn't work.
within a xterm with ergoemacs-mode enabled, as long as
xterm-mouse-mode
is set to true, the following setting no longer works:the following warning keep popping out:
ergoemacs-command-loop--decode-event: Wrong number of arguments: #[(_event) "ÀÁ!\207" [xterm-mouse-translate-1 1006] 2 ("/usr/local/Cellar/emacs/25.0.9\ 0/share/emacs/25.0.90/lisp/xt-mouse.elc" . 598)], 0Error during redisplay: (eval (ergoemacs-status--eval)) signaled (wrong-type-argument sequencep 6177\ 7) [23 times]
it seems that the ergoemacs-command-loop does not work well with mouse events.The main purpose to use
(xterm-mouse-mode t)
is to enable rich mouse interaction in a terminal environment.env: OSX, xterm2