help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Returning focus to Mutt


From: Miles Bader
Subject: Re: Returning focus to Mutt
Date: 05 Jan 2003 14:41:02 +0900

Michael Herman <michael@thehermans.org> writes:
> I would like to use emacsclient and have one question about it.  Is
> there a way, after closing the buffer with C-x C-#, for emacs to return
> the focus to the Mutt window?  I know I can lower the frame and get it
> out of the way but emacs still retains the focus.  

Perhaps if you could get emacsclient to create a new frame, and delete
it upon `C-x #', then your window-manager would automatically pop the
focus back to the previously focused window; otherwise I'm not sure (it
seems very hard to specifically _ask_ for the mutt window to be focused,
because how do you know which window it is?)

I think you can do this by using something like:

  ;; force emacsclient to pop up a new window/frame on edited files,
  ;; and focus it
  (setq server-window 
        (lambda (buf)
          (add-to-list 'special-display-buffer-names (buffer-name buf))
          (pop-to-buffer buf)
          (x-focus-frame nil)))

[it worked when I just tried it using `emacsclient /tmp/mutt-foo']

-Miles
-- 
The secret to creativity is knowing how to hide your sources.
  --Albert Einstein


reply via email to

[Prev in Thread] Current Thread [Next in Thread]