On Wed, Jan 01, 2003 at 03:59:10PM -0600, Michael Herman wrote: >I am using Mutt for e-mail with emacs for editing and >composing. Today, I run a separate instance of emacs everytime I >compose or edit. I have tried emacsclient but have one issue - when >using emacsclient, the focus doesn't change so I need to alt-tab in >the window manager to the emacs window. > >I have been playing around with raise-frame to bring the emacs window >to the front and that works fine but it doesn't change the focus. >The focus is still on the Mutt window. Is there any way to raise the >frame and have emacs grab the focus? > I googled for some stuff and found a solution for getting the focus to emacs and raising it. Here it is being called from my post-mode-hook. ;;declare frame name (setq main-frame (selected-frame)) ;; Post mode hooks (add-hook 'post-mode-hook '(lambda () (raise-frame main-frame) (x-focus-frame main-frame) )) However, is there a function to hand the focus back to a non-emacs application (Mutt)? I created an exit-hook for the post mode I use and it works to lower the emacs window but the focus does not return to the xterm which is running Mutt. Here's what I have so far: (add-hook 'exit-post-mode-hook '(lambda () (lower-frame main-frame) )) Again, thanks in advance for the help. -- Michael Herman