From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: using links/org-capture programmatically Date: Tue, 26 Jul 2011 11:20:49 -0700 Message-ID: <877h74x5ry.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlmFc-0000KD-N4 for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 14:21:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlmFb-0000wg-BW for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 14:21:04 -0400 Received: from lo.gmane.org ([80.91.229.12]:58763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlmFa-0000wS-WC for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 14:21:03 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QlmFa-00084j-EP for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 20:21:02 +0200 Received: from 63.226.249.211 ([63.226.249.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jul 2011 20:21:02 +0200 Received: from eric by 63.226.249.211 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jul 2011 20:21:02 +0200 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 I've got a little sequence I use so often I'd like to automate it, but am not sure how. Basically it goes: 1. In Gnus, store a link to an email message 2. Call org-capture 3. Choose a template with a REPLY keyword, that gets stored in a certain subtree 4. Pull the last-stored link, to the email message, into the REPLY heading 5. Complete and restore what I had before If I want to write a single keystroke that does this, how do I insert the last stored link into the text of the capture template in an elisp function? Or should I not be using org-capture in a function to begin with? Any advice appreciated! Eric