Emacsclient not responding to mouse clicks

When I run emacsclient, it does not respond to mouse clicks. My main Emacs process runs in the terminal and responds correctly to mouse clicks because the following code is in my Emacs configuration file:

(xterm-mouse-mode 1)

Why does emacsclient not respond to mouse clicks? Is there any way to do this?

+5
source share
1 answer

This is probably due to the fact that certain parameters in Emacs are terminal-specific, and the manipulation of such settings in the initialization file affects only the terminal that is active during the evaluation of the initialization file.

Q + A :

/ Emacs

, , :

(defun my-terminal-config (&optional frame)
  "Establish settings for the current terminal."
  (if (not frame) ;; The initial call.
      (xterm-mouse-mode 1)
    ;; Otherwise called via after-make-frame-functions.
    (if xterm-mouse-mode
        ;; Re-initialise the mode in case of a new terminal.
        (xterm-mouse-mode 1))))
;; Evaluate both now (for non-daemon emacs) and upon frame creation
;; (for new terminals via emacsclient).
(my-terminal-config)
(add-hook 'after-make-frame-functions 'my-terminal-config)
+10

All Articles