From: Joe Riel <joer@san.rr.com>
To: help-gnu-emacs@gnu.org
Subject: Transferring focus to Emacs
Date: Tue, 14 Jun 2011 09:45:43 -0700 [thread overview]
Message-ID: <20110614094543.5928a5a6@gauss> (raw)
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
next reply other threads:[~2011-06-14 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 16:45 Joe Riel [this message]
2011-06-14 17:10 ` Transferring focus to Emacs Thierry Volpiatto
2011-06-14 19:25 ` Joe Riel
2011-06-15 6:14 ` Joe Riel
2011-06-15 8:34 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110614094543.5928a5a6@gauss \
--to=joer@san.rr.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.