From mboxrd@z Thu Jan 1 00:00:00 1970 From: Skip Collins Subject: capture template sexp Date: Thu, 18 Oct 2012 17:53:38 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOy28-0002cZ-IT for emacs-orgmode@gnu.org; Thu, 18 Oct 2012 17:53:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOy27-0003iz-Jk for emacs-orgmode@gnu.org; Thu, 18 Oct 2012 17:53:40 -0400 Received: from mail-oa0-f41.google.com ([209.85.219.41]:56861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOy27-0003iq-F4 for emacs-orgmode@gnu.org; Thu, 18 Oct 2012 17:53:39 -0400 Received: by mail-oa0-f41.google.com with SMTP id k14so10749237oag.0 for ; Thu, 18 Oct 2012 14:53:38 -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 I have not been able to find good examples of how to use the %(sexp) construct in capture templates. I have a use case in which I would like to retrieve some information from the capture target file to include in the template. Can someone suggest a way construct a sexp that returns a regular expression found in the target file? Say I need to find the first headline that begins with the string "* Topic: " and return the remainder of the line.