all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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
       [not found] <mailman.3.1041458358.29703.help-gnu-emacs@gnu.org>
@ 2003-01-02  2:10 ` Chmouel Boudjnah
  0 siblings, 0 replies; 3+ messages in thread
From: Chmouel Boudjnah @ 2003-01-02  2:10 UTC (permalink / raw)



i guess if i do remember right, gnuclient should be able to do that.

-- 
Chmouel -- http://www.chmouel.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Raising the frame and focus
  2003-01-01 21:59 Raising the frame and focus 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 --
2003-01-01 21:59 Raising the frame and focus Michael Herman
2003-01-02  5:30 ` Michael Herman
     [not found] <mailman.3.1041458358.29703.help-gnu-emacs@gnu.org>
2003-01-02  2:10 ` Chmouel Boudjnah

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.