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

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

Transferring focus to Emacs


From: Joe Riel
Subject: Transferring focus to Emacs
Date: Tue, 14 Jun 2011 09:45:43 -0700

I want a separate program to give the focus to Emacs, and put the
cursor in a particular (existing) buffer.
   
Using emacsclient doesn't work, for example

$ emacsclient --eval '(pop-to-buffer "my-buffer")'

That does pop-up and select the buffer, however, after the command
executes, the window manager returns the focus to the xterm that
evaluated the command.  I want focus to remain in Emacs.

The "normal" call to emacsclient, with a filename, does not help
because that opens a file.  I want it to open an existing buffer.

Alternatively, emacs itself can issue whatever command is needed (I'm
communicating with emacs via another link).  Hmm.  Probably I need to
be sending the command to the window manager rather than Emacs (this
is on X). Is there an Emacs command that tells the window manager to
give the focus to Emacs (which might be on a different desktop)?
Alas, I'll want similar capability in a Windows 7 environment.

-- 
Joe Riel




reply via email to

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