Am Donnerstag, den 06.08.2009, 14:34 +0800 schrieb George.Qiao: > Hi all, > > It[1] will make new emacsclient by H-e every time. > I just want one emacsclient by H-e every time. > Counld you please give me help anyway. > > > [1] > (setq load-path (cons "~/.sawfish/extensions" > load-path)) > (require 'jump-or-exec) > (bind-keys global-keymap > "H-e" '(jump-or-exec "emacs@" > (lambda () > (system "emacsclient -c &")) > (lambda (wind) > (display-window wind)))) > > > Best Regards, > George.Qiao
Hi, you may use get-window-by-name (or get-window-by-name-re) to find out wether such window exists, if not, it returns nil. say WM_NAME is "Emacs: blah" eg (get-window-by-name-re "Emacs: ") if no window with "Emacs: " is running, then it returns nil and you can then let sawfish open an instance. Chris
