]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
add bba-insert-ticketnumber
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sat, 17 Dec 2022 19:08:57 +0000 (20:08 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 18 Dec 2022 11:38:39 +0000 (12:38 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba-orgmode.org

index 6704b43d1675c711908bd26347eb364faad21873..8aaa8228b5939e2d9c9f657c03c1fb5dc91b788f 100644 (file)
@@ -1679,6 +1679,21 @@ TODO: this block should be splitted and moved to the right org files.
   (setq org-duration-format '((special . h:mm)))
 #+END_SRC
 
+Usually I am clocked into notes for Jira tickets.
+Instead of manually typing I want to have a keybinding to insert the
+current ticket number.
+
+#+begin_src emacs-lisp :eval never
+  (defun bba-insert-ticketnumber()
+    "Assume we are clocked into a ticket.
+  Insert ticket number at point."
+    (interactive)
+    (insert (first (s-split " " (car (last (split-string org-clock-heading ":"))))))
+    )
+
+  (global-set-key (kbd "<f9> j") 'bba-insert-ticketnumber)
+#+end_src
+
 ** clocktable
 [2016-04-15 Fri 17:05]