From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Swainson Newsgroups: gmane.emacs.help Subject: Re: Emacs into focus Date: Fri, 08 Aug 2008 13:31:16 +1200 Message-ID: <87od44mgwr.fsf@gargoyle.datacom.co.nz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218161786 2374 80.91.229.12 (8 Aug 2008 02:16:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Aug 2008 02:16:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Richard G Riley Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 08 04:17:15 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KRHXX-000364-1i for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Aug 2008 04:17:15 +0200 Original-Received: from localhost ([127.0.0.1]:54515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRHWa-00021w-Ht for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Aug 2008 22:16:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KRHWK-00021l-QS for help-gnu-emacs@gnu.org; Thu, 07 Aug 2008 22:16:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KRHWG-00021L-9r for help-gnu-emacs@gnu.org; Thu, 07 Aug 2008 22:16:00 -0400 Original-Received: from [199.232.76.173] (port=50563 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRHWG-00021I-5W for help-gnu-emacs@gnu.org; Thu, 07 Aug 2008 22:15:56 -0400 Original-Received: from mx01.datacom.co.nz ([202.175.132.4]:5812 helo=mailak.datacom.co.nz) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KRHWE-0004X2-US for help-gnu-emacs@gnu.org; Thu, 07 Aug 2008 22:15:55 -0400 Original-Received: from dnzakex1.datacom.co.nz (Not Verified[202.27.76.7]) by mailak.datacom.co.nz with ESMTP Gateway id ; Fri, 08 Aug 2008 13:30:10 +1200 Original-Received: from gargoyle.datacom.co.nz ([172.22.0.241]) by dnzakex1.datacom.co.nz with Microsoft SMTPSVC(6.0.3790.1830); Fri, 8 Aug 2008 13:28:14 +1200 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-OriginalArrivalTime: 08 Aug 2008 01:28:14.0781 (UTC) FILETIME=[074736D0:01C8F8F6] X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-Greylist: delayed 2711 seconds by postgrey-1.27 at monty-python; Thu, 07 Aug 2008 22:15:48 EDT X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56267 Archived-At: On Thursday 07 August 2008 at 05:36 PM, Richard G Riley wrote: > Can someone recommend the best way to have emacs come to the foreground > on a Linux desktop? I use wmctrl with a little script that I bind to a key combination which either brings the app to the foreground or starts it if it is not running: #!/bin/sh ### # Switch to a screen or do something ### if ! wmctrl -a $1; then $2; fi I save this as switchto and then: switchto "Mozilla Firefox" "firefox" Perhaps wmctrl could be used in the same way for emacs? Cheers, ian -- Ian Swainson fortune says: In every hierarchy the cream rises until it sours. -- Dr. Laurence J. Peter Created using Free Software on GNU/Linux http://www.getgnulinux.org