From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Herman Newsgroups: gmane.emacs.help Subject: Re: Raising the frame and focus Date: Wed, 1 Jan 2003 23:30:44 -0600 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <20030102053044.GD2013@del3yzmj01.thehermans.org> References: <20030101215910.GA1738@del3yzmj01.thehermans.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============053285117879912136==" X-Trace: main.gmane.org 1041485430 22046 80.91.224.249 (2 Jan 2003 05:30:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 2 Jan 2003 05:30:30 +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 18Txw1-0005jR-00 for ; Thu, 02 Jan 2003 06:30:25 +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 18Txwi-0003zg-01 for gnu-help-gnu-emacs@m.gmane.org; Thu, 02 Jan 2003 00:31:08 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18TxwS-0003za-00 for help-gnu-emacs@gnu.org; Thu, 02 Jan 2003 00:30:52 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18TxwQ-0003zJ-00 for help-gnu-emacs@gnu.org; Thu, 02 Jan 2003 00:30:51 -0500 Original-Received: from pcp530390pcs.nash01.tn.comcast.net ([68.52.133.203] helo=del3yzmj01.thehermans.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18TxwP-0003yV-00 for help-gnu-emacs@gnu.org; Thu, 02 Jan 2003 00:30:49 -0500 Original-Received: (from michaher@localhost) by del3yzmj01.thehermans.org (8.11.6/8.11.6) id h025UjR02406 for help-gnu-emacs@gnu.org; Wed, 1 Jan 2003 23:30:45 -0600 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: Michael Herman , help-gnu-emacs@gnu.org In-Reply-To: <20030101215910.GA1738@del3yzmj01.thehermans.org> User-Agent: Mutt/1.4i 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:5177 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5177 --===============053285117879912136== Content-Disposition: inline content-type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+E86E+7rPd94z4i8RAgbYAJsFM/79X1U0AMQl9jB9Ggjq8DMO3QCdEGGw 1THEvNuXiiXcisKY+05T0Gg= =i0bB -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/-- --===============053285117879912136== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/help-gnu-emacs --===============053285117879912136==--