From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josiah Schwab Subject: Re: org-store-link programmatically? Date: Fri, 01 Nov 2013 15:26:40 -0700 Message-ID: <87y557bvxb.fsf@gmail.com> References: <87eh6zpzen.fsf@pcbe13433.cern.ch> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcNFJ-0007RB-Ui for emacs-orgmode@gnu.org; Fri, 01 Nov 2013 18:31:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VcNFE-0006Gj-3k for emacs-orgmode@gnu.org; Fri, 01 Nov 2013 18:31:13 -0400 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]:55158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcNFD-0006Fi-TK for emacs-orgmode@gnu.org; Fri, 01 Nov 2013 18:31:08 -0400 Received: by mail-pd0-f173.google.com with SMTP id r10so4418492pdi.18 for ; Fri, 01 Nov 2013 15:31:06 -0700 (PDT) In-reply-to: <87eh6zpzen.fsf@pcbe13433.cern.ch> 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: David Belohrad Cc: emacs-orgmode@gnu.org Hi David, > i want to write a piece of code as a 'template', which generates TODO > using capture template, and inserts into the todo a LINK TO THE > LOCATION, from which I have called the org-capture. Have you looked at "9.1.3 Capture templates" in the documentation? http://orgmode.org/manual/Capture-templates.html It seems to me that the example TODO entry given (using "%a" in the template) will do what you describe: ,---- | During expansion of the template, %a has been replaced by a link to | the location from where you called the capture command. This can be | extremely useful for deriving tasks from emails, for example. `---- Best, Josiah