運行emacsclient後,我如何始終如一地控制窗口焦點?emacsclient窗口焦點
目前,重點取決於是否已經運行emacs服務器。當emacsclient調用另一個編輯器時,焦點轉移到新的emacs窗口。當emacsclient連接到現有的emacs服務器時,焦點不會轉移(即它停留在我的膩子客戶端上)。
我想持續關注emacs窗口,因爲我通常在打開文件後轉到emacs。
任何幫助將不勝感激!
注意
版本信息
emacs: 21.4.1
emacsclient: 21.4
client os: Windows XP Service Pack 3
x server: Exceed 11.0.0.0
我.bash_profile中的有關章節
# a wrapper is needed to sandwich multiple command line arguments in bash
# 2>/dev/null hides
# "emacsclient: can't find socket; have you started the server?"
emacs_wrapper() {
if [ 0 -eq $# ]
then
emacsclient -n -a emacs ~/notes.txt 2>/dev/null &
else
emacsclient -n -a emacs $* &
fi
}
alias x="emacs_wrapper"
而且,在我的.emacs結束時,我有
(server-start)
我目前的解決方法是一個簡單的AutoHotkey腳本,其重點是我第一次超越窗口
^+x::
If WinExist("ahk_class EXCEEDW:MWCLIENT0")
WinActivate
return
作爲一個側面說明,它似乎我重定向到/ dev/null的混淆了語法高亮:(
這可能沒有幫助,但在使用23.2.2和Ubuntu時,重點似乎轉向了現有的emacs窗口。 – 2010-09-09 15:36:56
我懷疑它在Windows上使用X-server會變得複雜。你有沒有考慮過使用emacs for windows? 23.2可用預編譯:http://ftp.gnu.org/gnu/emacs/windows/ – Chadwick 2010-09-15 20:37:28
我實際上已經安裝了emacsw32。然而,它通過CIFS股份工作緩慢: – vlee 2010-09-15 21:49:56