emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Damon Haley" <dkh@member.fsf.org>
To: emacs-orgmode@gnu.org
Subject: Re: Alfred workflow for org-capture
Date: Fri, 13 Sep 2013 12:41:04 -0600	[thread overview]
Message-ID: <vsxbik4n9oo98f.fsf@member.fsf.org> (raw)
In-Reply-To: <m1ob7x50wt.fsf@thinkhr.torolab.ibm.com> (Haider Rizvi's message of "Thu, 12 Sep 2013 14:51:14 -0400")

In addition to Alfred/Applescript,  the Quickkeys application allows once to
directly access emacs keybindings (without emacsclient) and then let emacs
call call apple script to retrieve useful context for org-capture.

My solution is completely stolen from John Wiegley,  but it works great.

After calling org-smart-capture with quickkeys,  quickkeys calls the
appropriate org-insert functions
from here:

https://github.com/jwiegley/dot-emacs/blob/master/dot-org.el#L534

Quickkeys just needs to know the frontmost application when capture was
called,  which is easy to configure, and then it types the relevant org-insert keybinding.

John, has also written a function called smart-capture that goes directly to
the capture template of one's choice:

https://github.com/jwiegley/dot-emacs/blob/master/lisp/org-smart-capture.el

Quickkeys is also worth its price for automating tons of actions with or
without Apple Script.

Damon

>>>>> Haider Rizvi <harizvi@gmail.com> writes:

> "Robert P. Goldman" <rpgoldman@sift.info> writes:
>> Does anyone have a workflow for the Alfred Mac app launcher that will
>> interact with org-capture?

> If Alfred can trigger an Applescript, I use the following with Quicksilver:

> Applescript: 

> property eclient : "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient
> -n -e " do shell script eclient & "'(make-orgcapture-frame)'"

> elisp in init.el or ...: 

> (defun make-orgcapture-frame ()  
>   "Create a new frame and run org-capture."  
>   (interactive)  
>   (make-frame '((name . "remember") (width . 80) (height . 16)
>                 (top . 400) (left . 300)
>                 (font . "-apple-Monaco-medium-normal-normal-*-13-*-*-*-m-0-iso10646-1")
>                 ))
>   (select-frame-by-name "remember")  
>   (org-capture))

> Regards, 
-- 
app: https://alpha.app.net/haleyscomet | 
net: https://identi.ca/vinylisl | 
git: https://github.com/dhaley | 
irc: dkh on #drupal-colorado/irc/freenode.net

      parent reply	other threads:[~2013-09-13 18:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 14:27 Alfred workflow for org-capture Robert P. Goldman
2013-09-12 18:51 ` Haider Rizvi
2013-09-13  7:45   ` Alan Schmitt
2013-09-13  8:14     ` Alexander Baier
2013-09-13  9:19       ` Alan Schmitt
2013-09-13  9:30         ` Alan Schmitt
2013-09-13 18:41   ` Damon Haley [this message]

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=vsxbik4n9oo98f.fsf@member.fsf.org \
    --to=dkh@member.fsf.org \
    --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).