From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Damon Haley" Subject: Re: Alfred workflow for org-capture Date: Fri, 13 Sep 2013 12:41:04 -0600 Message-ID: References: <5231CF53.9060604@sift.info> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKYIu-0004hv-Aw for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 14:41:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKYIp-0003tY-V7 for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 14:41:16 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:37438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKYIp-0003tT-NX for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 14:41:11 -0400 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 5F99820A6B for ; Fri, 13 Sep 2013 14:41:05 -0400 (EDT) Received: from haley.local (unknown [184.96.164.139]) by mail.messagingengine.com (Postfix) with ESMTPA id 86B7D6804FA for ; Fri, 13 Sep 2013 14:41:04 -0400 (EDT) In-Reply-To: (Haider Rizvi's message of "Thu, 12 Sep 2013 14:51:14 -0400") 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 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 writes: > "Robert P. Goldman" 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