Firstly lets create a function to find the client among all clients
managed by xwem:
(defun my-find-client (match-spec)
"Return client that matches MATCH-SPEC."
(let ((cls (xwem-clients-list)))
(while (and cls (not (xwem-cl-match-p (car cls) (list match-spec))))
(setq cls (cdr cls)))
(car cls)))
No we can use very flexible clients matching, to search certain
clients. For example, lets find a firefox with linux related site
loaded:
(defun my-switch-firefox-linux ()
"Switch to firefox that shows some linux related site."
(interactive)
(xwem-select-client
(or (my-find-client '(and (application "firefox")
(name "[lL]inux")))
(xwem-cl-selected))))
Or maybe you want to switch to XEmacs frame with scratch buffer?
(defun my-switch-xemacs-scratch ()
"Switch to XEmacs frame with scratch buffer."
(interactive)
(xwem-select-client
(or (my-find-client '(buffer-name "*scratch*"))
(xwem-cl-selected))))
For full list of matching posibilities see the docstring for
`xwem-cl-match-p'.
Thanks!
--
lg
|