]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
Add bba-open-jira
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 9 Nov 2018 14:49:44 +0000 (15:49 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 9 Nov 2018 14:49:44 +0000 (15:49 +0100)
Open current ticket in Jira.
I should use it more often though.

Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 5f09d6319c1bd0253585771cdb593c14a2252470..bb1619d8c46d8f6d6ed2b7a87f65f4f1a27272b3 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -977,6 +977,27 @@ never heard of orgmode.
     )
 #+END_SRC
 
+#+BEGIN_SRC emacs-lisp :tangle yes
+  (defun bba-open-jira()
+  "open current ticket."
+  (interactive)
+  (let ((oldpoint (point-marker)))
+  (org-narrow-to-subtree)
+  (goto-char (point-min))
+  (if (re-search-forward "jira:" nil t 1)
+      (org-open-at-point)
+    (progn (widen)
+            (outline-up-heading 1 t)
+            (bba-open-jira)
+  ))
+  (widen)
+  (goto-char oldpoint)
+  )
+  )
+
+  (define-key org-mode-map "\C-xl\S-j" 'bba-open-jira)
+#+END_SRC
+
 ** ox-reveal
 [2017-11-06 Mon 23:26]