From: Matt Lundin <mdl@imapmail.org>
To: Shawn Willden <swillden@google.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Easily adding notes to a TODO item
Date: Wed, 27 Apr 2011 13:19:26 -0400 [thread overview]
Message-ID: <87ei4n7gtd.fsf@fastmail.fm> (raw)
In-Reply-To: <BANLkTimN3fxe7-V9VAiJju33z+JCPf-5ZA@mail.gmail.com> (Shawn Willden's message of "Wed, 27 Apr 2011 07:49:54 -0600")
Shawn Willden <swillden@google.com> writes:
> On Wed, Apr 27, 2011 at 6:42 AM, Matt Lundin <mdl@imapmail.org> 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.
>
[...]
>> 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.
Perhaps a simpler option would be to add a function to
org-store-link-functions. See the docstring of that variable for more
details.
The advantage of this approach is that your function would be called
whenever you are storing a link in one of the relevant files, instead of
only via a particular capture template.
Best,
Matt
next prev parent reply other threads:[~2011-04-27 17:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 16:14 Easily adding notes to a TODO item Shawn Willden
2011-04-26 16:40 ` Matt Lundin
[not found] ` <BANLkTinhCQn8MV0qRqiLftK+BUb94US57g@mail.gmail.com>
2011-04-27 12:42 ` Matt Lundin
2011-04-27 13:49 ` Shawn Willden
2011-04-27 17:19 ` Matt Lundin [this message]
2011-04-26 16:41 ` Matt Lundin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ei4n7gtd.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@gnu.org \
--cc=swillden@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).