2013-02-04 33 views
3

我在.emacs中有(require 'org-protocol)。 現在用在bash:如何打開org-protocol時關注emacsclient窗口?

emacsclient org-protocol://capture://something 

我得到我想要的東西,但不集中Emacs窗口。 爲了突出重點,我可以舉例-c標誌爲emacsclient。 有沒有一種方法(可能是-e開關)來做到這一點沒有-c

回答

1

發現這個代碼進行修復:

(defadvice raise-frame (after make-it-work (&optional frame) activate) 
    "Work around some bug? in raise-frame/Emacs/GTK/Metacity/something. 
    Katsumi Yamaoka posted this in 
    http://article.gmane.org/gmane.emacs.devel:39702" 
    (call-process 
    "wmctrl" nil nil nil "-s" "1") 
    (call-process 
    "wmctrl" nil nil nil "-i" "-R" 
    (frame-parameter (or frame (selected-frame)) 'outer-window-id))) 
(add-hook 'server-switch-hook 'raise-frame) 

Apparenty raise-frame仍然竊聽,所以wmctrl來代替。

+0

這打破了我的組織7.9.2捕獲貪婪的處理程序錯誤。另一方面,它看起來像框架自動提出(emacs24,xubuntu) –

+0

@abo-abo,你說你「找到了這個代碼」。在哪裏,根據什麼許可證?請在信貸到期時付款。 – sampablokuper

相關問題