From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shawn Willden Subject: Re: Easily adding notes to a TODO item Date: Wed, 27 Apr 2011 07:49:54 -0600 Message-ID: References: <87wrihrmov.fsf@fastmail.fm> <87zknblvan.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QF580-00079e-MN for emacs-orgmode@gnu.org; Wed, 27 Apr 2011 09:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QF57u-0000hq-Cp for emacs-orgmode@gnu.org; Wed, 27 Apr 2011 09:50:04 -0400 Received: from smtp-out.google.com ([216.239.44.51]:21496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QF57u-0000he-4y for emacs-orgmode@gnu.org; Wed, 27 Apr 2011 09:49:58 -0400 Received: from kpbe15.cbf.corp.google.com (kpbe15.cbf.corp.google.com [172.25.105.79]) by smtp-out.google.com with ESMTP id p3RDnuZq011508 for ; Wed, 27 Apr 2011 06:49:56 -0700 Received: from gyd8 (gyd8.prod.google.com [10.243.49.200]) by kpbe15.cbf.corp.google.com with ESMTP id p3RDn1mG011798 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 27 Apr 2011 06:49:55 -0700 Received: by gyd8 with SMTP id 8so833519gyd.14 for ; Wed, 27 Apr 2011 06:49:55 -0700 (PDT) In-Reply-To: <87zknblvan.fsf@fastmail.fm> 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: Matt Lundin Cc: Org Mode On Wed, Apr 27, 2011 at 6:42 AM, Matt Lundin wrote: > I'm not too familiar with invoking sexp expansion within capture > templates and am not sure whether you can expand an item within a sexp. It does work, sort of. My function is of the form: if path matches regexp return complicated link construction else return "[[file:" + path + "]]" What happens is that when called with the expanded %F the matching always fails so the "else" branch is always taken. When called from evaluated lisp code (e.g. (linkify "foo/bar")), the function works correctly. > I imagine other community members might have some ideas. (I'm Cc'ing the > ML on this reply.) Doh! Most ML's have the reply-to set to default to the list. I didn't check to TO; I'd intended my reply to go to the ML as well. > Would the following work, or do you require something more complex? > > ("c" "Clock sibling" item (clock) "%T %a") I require something more complex. Our code repository has a pretty nifty web interface with a lot of very useful features. What I'm trying to do is arrange that if the file that I was working on when I created the note is from the source repository, I create a link to the web interface's rendition of the file, rather than to the file on the file system. If the file isn't from the code repository then I just create an ordinary file link. Thanks, -- Shawn