Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have a similar case for which I use code similar to the following:</p> <pre><code>(defun org-at-special (type) "Check whether point is at a special link of the form [[TYPE:address]] TYPE is given as string. Returns the address." (save-excursion (when (and (looking-back (concat "\\[\\[\\(?:" type "\\([^][\n\r]+\\)?\\]\\[\\)?[^]]*\\(\\]\\)?")) (goto-char (match-beginning 0)) (looking-at (concat "\\[\\[" type "\\([^][\n\r]+\\)\\]"))) (match-string-no-properties 1)))) (require 'browse-url) (defun org-open-google () (let ((q (org-at-special "google:"))) (when q (apply browse-url-browser-function (list (concat "http://www.google.com/#q=" q))) t))) (add-to-list 'org-open-at-point-functions 'org-open-google) </code></pre> <p>After this definition you can put links like <code>[[google:stackoverflow]]</code> into your org-file. You only need to define your own <code>org-open-google</code> function which then may be named <code>org-open-defect</code> or however you like it. You have to add this name to the list <code>org-open-at-point-functions</code>.</p> <p>I did some modifications for you. Therefore, the above code is not heavily tested. But, I did already some basic tests.</p> <p>If the prefix is always COM- you can already take this as type for <code>org-at-special</code> then links like <code>[[COM-19112]]</code> are reckognized and you have exactly the display you want. Your special case would then be something like that:</p> <pre><code>(defun org-open-COM- () (let ((q (org-at-special "COM-"))) (when q (apply browse-url-browser-function (list (concat "http://www.jira.com/browse/COM-" q))) t))) (add-to-list 'org-open-at-point-functions 'org-open-COM-) </code></pre> <p>After that a capture like the following is sufficient</p> <pre><code>(setq org-capture-templates '(("d" "Defects" entry (file+headline "/c/temp/Defects.org" "Tasks") "* TODO %? [[COM-%^{Defect}]]"))) </code></pre> <p>Therewith, you only need to input the defect number once.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload