From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Liu Subject: Re: Can org-capture-templates be made more flexible? Date: Thu, 07 Nov 2013 11:58:51 +0800 Message-ID: References: <87fvr9gaws.fsf@bzg.ath.cx> <87li11lcr4.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeGkT-0006rb-HT for emacs-orgmode@gnu.org; Wed, 06 Nov 2013 22:59:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VeGkG-0006yD-PP for emacs-orgmode@gnu.org; Wed, 06 Nov 2013 22:59:13 -0500 In-Reply-To: <87li11lcr4.fsf@bzg.ath.cx> (Bastien's message of "Wed, 06 Nov 2013 17:25:34 +0100") 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: Bastien Cc: emacs-orgmode@gnu.org On 2013-11-07 00:25 +0800, Bastien wrote: > In that case, using a target like (function ...) could do -- did you > try this? thanks for the pointer. I glanced at this option while reading the org-capture-templates' doc. >From org-capture-set-target-location: ((eq (car target) 'function) (funcall (nth 1 target)) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) and org-capture-finalize calls save-buffer I think this option requires a file still. Thanks, Leo