From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.help Subject: Re: Returning focus to Mutt Date: 05 Jan 2003 14:41:02 +0900 Organization: Global Online Japan Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87adig887l.fsf@tc-1-100.kawasaki.gol.ne.jp> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1041745636 7608 80.91.224.249 (5 Jan 2003 05:47:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 5 Jan 2003 05:47:16 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18V3cu-0001yP-00 for ; Sun, 05 Jan 2003 06:47:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18V3bb-00072h-01 for gnu-help-gnu-emacs@m.gmane.org; Sun, 05 Jan 2003 00:45:51 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.media.kyoto-u.ac.jp!newsfeed.gol.com!203.216.70.8.MISMATCH!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: tc-2-211.kawasaki.gol.ne.jp Original-X-Trace: nnrp.gol.com 1041745263 20800 203.216.25.211 (5 Jan 2003 05:41:03 GMT) Original-X-Complaints-To: abuse@gol.com Original-NNTP-Posting-Date: Sun, 5 Jan 2003 05:41:03 +0000 (UTC) System-Type: i686-pc-linux-gnu Original-Xref: shelby.stanford.edu gnu.emacs.help:108679 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5208 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5208 Michael Herman 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