From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Insert link to recently captured Note? Date: Thu, 14 Oct 2010 07:28:12 -0400 Message-ID: <871v7tt3n7.fsf@gollum.intra.norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=50769 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6Lz5-0000cH-1C for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 07:28:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6Lz3-00015N-2H for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 07:28:30 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:61930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6Lz3-00013M-0D for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 07:28:29 -0400 In-Reply-To: (Nathan Neff's message of "Wed, 13 Oct 2010 01:38:41 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nathan Neff Cc: emacs-orgmode Nathan Neff writes: > On Wed, Oct 13, 2010 at 1:29 AM, Nathan Neff wrot= e: >> I'd like to ask the mailing list how they handle the following situation: >> >> I'm clocked into FOO below, then spend about 20 minutes on something >> that's somewhat >> related to FOO, but is not really a direct sub-task of FOO, so I >> probably want to refile it later. >> >> So, I open org-capture and create some notes about * BAR, and file it aw= ay. >> >> Now, I'm back in * FOO and want to quickly put a note about * BAR in >> my FOO task. >> >> So, ideally my structure would look like this: >> ---------------------- some file ---------------------------- >> * FOO >> Got caught up with [[link to * BAR]] >> -------------------------- notes.org ------------------------ >> * BAR >> blew 30 minutes on this problem. >> I might file this headline somewhere, but I want to be able to link from= * FOO >> to this new note >> >> >> I've found variables like org-capture-bookmark-last-stored-position, >> but I think that it >> contains just the filename (like notes.org). =C2=A0What I probably need = is >> a way to create an ID >> for the newly captured heading, and then store a link to it on the >> clipboard or something. > > Okay, I found out how to do create a unique ID, by defining a template > like this: > > org-capture-templates '(("t" "Task" entry (file "~/todo.txt") > "* foo\n :PROPERTIES:\n ID: > %(shell-command-to-string \"uuidgen\") :END:") > ) > > Now, I just need a way to quickly insert a link to this newly created ID. Hi Nathan, If you just visit BAR, do C-c l to copy a link this creates an unique ID in BAR which the link uses (assuming you have org-id enabled in your org-modules) Then visit FOO and insert the link with C-c C-l and you're done. HTH, Bernt