* Raising the frame and focus
@ 2003-01-01 21:59 Michael Herman
2003-01-02 5:30 ` Michael Herman
0 siblings, 1 reply; 3+ messages in thread
From: Michael Herman @ 2003-01-01 21:59 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 585 bytes --]
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?
Thanks for the help.
--
Michael Herman
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 151 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Raising the frame and focus
2003-01-01 21:59 Michael Herman
@ 2003-01-02 5:30 ` Michael Herman
0 siblings, 0 replies; 3+ messages in thread
From: Michael Herman @ 2003-01-02 5:30 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 1362 bytes --]
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
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 151 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-02 5:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3.1041458358.29703.help-gnu-emacs@gnu.org>
2003-01-02 2:10 ` Raising the frame and focus Chmouel Boudjnah
2003-01-01 21:59 Michael Herman
2003-01-02 5:30 ` Michael Herman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).