From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Wishon Subject: Re: create new files from capture Date: Wed, 20 Apr 2011 19:00:57 +0000 (UTC) Message-ID: References: <1696133DB0E548409327158967872500@gmail.com> <87pqp1q18t.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCcmv-0004h9-JX for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 15:10:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCcmu-0000yr-N8 for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 15:10:09 -0400 Received: from lo.gmane.org ([80.91.229.12]:60714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCcmu-0000xR-G3 for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 15:10:08 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QCcms-0005f5-IR for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 21:10:06 +0200 Received: from a72-247-151-10.deploy.akamaitechnologies.com ([a72-247-151-10.deploy.akamaitechnologies.com]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Apr 2011 21:10:06 +0200 Received: from bill by a72-247-151-10.deploy.akamaitechnologies.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Apr 2011 21:10:06 +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 > (function function-finding-location) > Most general way, write your own function to find both > file and location I just started trying to do this today myself when I found this thread. >From what I can tell the expectation is that this function places the point in the buffer/file at the location where you want to insert the captured template item. I created to following which works for me to open a new file and puts the test template there: (defun prompt-for-new-orgfile () "This function prompts for a file to save to" (call-interactively 'find-file) (end-of-buffer)) (setq org-capture-templates '(("t" "Todo" entry (file+headline (concat org-directory "/gtd.org") "Tasks") "* TODO %?\n %i\n %a") ("m" "Meeting Notes" entry (function prompt-for-new-orgfile) "* %^{meetingtitle}" :unnarrowed))) What I'm trying to figure out now is how to read the template from a file. The documentation says that it can be done by using (file "path/to/file") in place of the template text argument, but I haven't gotten that working yet. ~>Bill