From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Whipp Subject: capture whenever Date: Thu, 12 Jul 2012 18:49:57 +1000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015175cd2a84c881a04c49e0c30 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpF64-0008Bj-Eo for emacs-orgmode@gnu.org; Thu, 12 Jul 2012 04:50:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SpF5y-0000e3-BY for emacs-orgmode@gnu.org; Thu, 12 Jul 2012 04:50:04 -0400 Received: from mail-bk0-f41.google.com ([209.85.214.41]:41519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpF5y-0000dv-4T for emacs-orgmode@gnu.org; Thu, 12 Jul 2012 04:49:58 -0400 Received: by bkcjc3 with SMTP id jc3so1781722bkc.0 for ; Thu, 12 Jul 2012 01:49:57 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --0015175cd2a84c881a04c49e0c30 Content-Type: text/plain; charset=ISO-8859-1 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 --0015175cd2a84c881a04c49e0c30 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I had trouble getting org-capture to behave from a hotkey:

It worked fine but would not give the emacs buffer focus making it prett= y useless.

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

=3D=3D=3D=3D=3D=3D=3D
#!/bin/bash
<= div>
wmctrl -Fa 'emacs@dev'
emacsclient org= -protocol:/capture:/foo/
=3D=3D=3D=3D=3D=3D=3D=3D

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

The script works fine even though the window's titl= e 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 w= ould 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.

= --0015175cd2a84c881a04c49e0c30--