I'm using emacs-24.3 for Windows and specifically Org-Mode, which is fantastic. I'm trying to setup a new capture template for defects that get handed me at work and would like the template to output something like this:
- TODO description-of-defect link-to-defect-in-jira
e.g.
- TODO User having issue logging in to site COM-19112
The problem I am having is The URL is similar to this http://www.jira.com/browse/COM-19112 and I want it to be output as COM-19112. To do this normally in emacs I would do this:
[[http://www.jira.com/browse/COM-19112][COM-19112]]
However, when trying to setup an org capture template I only want to have to type COM-19112 once and it be filled in both places. Here is the best I can get so far - it gives me what I want but I have to type 'COM-19112' twice at prompt:
(setq org-capture-templates
'(("d" "Defects" entry (file+headline "C:/EmacsOrg/Defects.org" "Tasks")
"* TODO %? [[http://www.jira.com/browse/%^{Defect}][%^{Defect}]]")))
I can't see anything on http://orgmode.org/manual/Template-expansion.html#fn-2 that explains how to create a variable that can be used in multiple places but I am sure there is a way to do this.
If anyone can point me in the right direction I'd be very grateful.
Regards
BebopSong