Gmane
Gravatar
From: Martin Costabel <costabel <at> wanadoo.fr>
Subject: Re: Aquamacs / Terminal.app focus and layering issues
Newsgroups: gmane.emacs.macintosh.osx
Date: 2005-12-14 08:16:35 GMT (2 years, 50 weeks, 4 days, 11 hours and 5 minutes ago)
Philip J. Hollenback wrote:
> This isn't strictly an Aquamacs issue but I suspect it has to be
> annoying a lot of users on this list...
> 
> Is there a way to force Aquamacs emacsclient windows to the front when
> they are opened?  More to the point, is there a way to make
> Terminal.app allow new windows to open in front of it?
> 
> I use mutt (running in Terminal.app on OSX 10.4.3) for my mail reader
> and the Aquamacs emacsclient as my editor.  Every time I write a
> message the emacsclient frame pops up *behind* the Terminal window.
> This means I have to change the focus either with alt-tab or clicking
> the mouse.

You could write a little script like this:

  #!/bin/sh
  open -a Aquamacs\ Emacs
  /Applications/Aquamacs\ Emacs.app/Contents/MacOS/bin/emacsclient "$@"
  open -a Terminal

and then use this instead of emacsclient as your editor.

> I observe that the Mac terminal does this with anything you open via
> the command-line 'open' command.

Not true. If you run "open -a TextEdit" or "open -a Aquamacs\ Emacs", 
the editor window will open in front and have the focus. It depends on 
which app is active.

-- 
Martin

---------------------------- Info -----------------------------
List Post: <mailto:macosx-emacs <at> email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>