hek*_*ran 5 emacs gnu-screen xterm mouseevent emacsclient
当我运行emacsclient时,它不响应鼠标点击.我的主要Emacs进程在终端中运行并正确响应鼠标点击,因为我的Emacs配置文件中有以下代码:
(xterm-mouse-mode 1)
Run Code Online (Sandbox Code Playgroud)
为什么emacsclient没有响应鼠标点击?有没有办法让它这样做?
phi*_*ils 10
这可能是因为Emacs中的某些设置特定于终端,并且在init文件中操作此类设置只会影响在评估init文件时处于活动状态的终端.
以下Q + A处理的问题大致相同,详情如下:
对于你的问题,我认为这应该做的伎俩:
(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)
Run Code Online (Sandbox Code Playgroud)