On Dec 24, 2007 6:32 AM, Adam Spiers <orgmode@adamspiers.org> wrote:
On Sat, Dec 22, 2007 at 11:30:52PM +0530, Rustom Mody wrote:
> Note that this is not quite satisfactory to me because the raise-frame
> and the make-frame-visible are both redundant and insufficient.

You lost me there.  .emacs is only run at startup, after which the
window manager can do anything it wants with the positioning and
visibility of the frames - or was that your point?

> Which is why I need the wmctrl. Which is why I need the bash -c.

Right.  I'm using -c as well.

The requirement is this: I should be able to -- with a single keystroke -- to get from any application into emacs into org mode.  However make-frame-visible and raise-frame dont quite work: If emacs is iconized it gets de-iconized but if it is already one of the open windows below some other -- firefox, shell, whatever -- it remains under that with the emacs tab blinking. As a consequence Ive got to use the mouse (or shuffle through Alt-Tab).

wmctrl does the job. But using it makes for two calls -- wmctrl and emacsclient -- and that makes for a packaging under a (inline) shell-script.


> If anyone finds a way of streamlining this please post it!

If it's the -c you don't like, you can always dump the commands in a
script.  That's nice because it gives you more breathing space to do
things like error checking on the exit code of the wmctrl.


What I dont like is having to use a shell call for some functionality that is almost certainly available under elisp.