emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Paul Whipp <paul.whipp@gmail.com>
To: emacs-orgmode@gnu.org
Subject: capture whenever
Date: Thu, 12 Jul 2012 18:49:57 +1000	[thread overview]
Message-ID: <CAMAB+PoMbE8-DCrtrHcMqo27D+sGwgno0DoSDjJ0nM0Yvc8UxA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

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! <http://www.paulwhippconsulting.com.au>

Joomla, Python, PHP and MySQL web application
developer<http://www.paulwhippconsulting.com.au/>

[-- Attachment #2: Type: text/html, Size: 1581 bytes --]

                 reply	other threads:[~2012-07-12  8:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMAB+PoMbE8-DCrtrHcMqo27D+sGwgno0DoSDjJ0nM0Yvc8UxA@mail.gmail.com \
    --to=paul.whipp@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).