I had trouble getting org-capture to behave from a hotkey:

It worked fine but would not give the emacs buffer focus making it pretty useless.

I worked around the problem using wmctrl (which is in the debian/ubuntu repos). I created a small script:

=======
#!/bin/bash

wmctrl -Fa 'emacs@dev'
emacsclient org-protocol:/capture:/foo/
========

where 'emacs@dev' is the title of my main emacs window when it comes up.

The script works fine even though the window's title changes when I use multiple windows.

Now when I hit the pause key, the script runs and I can capture the thought or snippet without interrupting what I'm doing.

I'm sure there is a better way but this works. It would be nice to avoid needing wmctrl (I searched in vain for the 'give focus' option on emacsclient) and to be able to drop the '/foo/' (without which it breaks).

Thanks for the help getting there.


Regards,
Paul Whipp

Office: 07 3103 2894
Mobile: 0410 545 357

Do more business with your website!

Joomla, Python, PHP and MySQL web application developer