From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Riel Newsgroups: gmane.emacs.help Subject: Re: Transferring focus to Emacs Date: Tue, 14 Jun 2011 23:14:49 -0700 Organization: Maplesoft Message-ID: <20110614231449.06386484@gauss> References: <20110614094543.5928a5a6@gauss> <87r56wbapm.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1308118982 7483 80.91.229.12 (15 Jun 2011 06:23:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Jun 2011 06:23:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 15 08:22:58 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QWjVC-0002og-8Y for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jun 2011 08:22:58 +0200 Original-Received: from localhost ([::1]:43332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWjVB-0007cV-As for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jun 2011 02:22:57 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWjNU-0006Ar-Up for help-gnu-emacs@gnu.org; Wed, 15 Jun 2011 02:15:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWjNT-0001dB-J0 for help-gnu-emacs@gnu.org; Wed, 15 Jun 2011 02:15:00 -0400 Original-Received: from webmail.maplesoft.com ([199.71.183.105]:52946 helo=ICW8KMAI01.maplesoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWjNT-0001d3-7H for help-gnu-emacs@gnu.org; Wed, 15 Jun 2011 02:14:59 -0400 Original-Received: from gauss (10.10.50.13) by ICW8KMAI01.maplesoft.com (10.10.1.104) with Microsoft SMTP Server (TLS) id 8.1.436.0; Wed, 15 Jun 2011 02:15:28 -0400 In-Reply-To: <87r56wbapm.fsf@gmail.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Windows XP/2000 (RFC1323+, w+, tstamp-) X-Received-From: 199.71.183.105 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81350 Archived-At: On Tue, 14 Jun 2011 19:10:29 +0200 Thierry Volpiatto wrote: > Joe Riel writes: > > > I want a separate program to give the focus to Emacs, and put the > > cursor in a particular (existing) buffer. > > Try wmctrl: > > wmctrl -xa emacs > emacsclient do_what_you_have _to_do > wmctrl -xa go_back_to_initial_window (optional e.g firefox) Here's a variation on the theme. Now I want to switch focus back to the original window. I know the process number of a subprocess running in that window. Is there a way I can use it to find the process of the window (and finally the window itself)? -- Joe Riel