From 9ab57ee255a03b86ed7303aa94959e3b104e1719 Mon Sep 17 00:00:00 2001 From: mms Date: Fri, 19 Jan 2024 15:22:13 +0100 Subject: feat: extract into dedicated repo --- mms-ox-sprints.org | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 mms-ox-sprints.org (limited to 'mms-ox-sprints.org') diff --git a/mms-ox-sprints.org b/mms-ox-sprints.org new file mode 100644 index 0000000..14923b6 --- /dev/null +++ b/mms-ox-sprints.org @@ -0,0 +1,61 @@ +#+TITLE: Michał Sapka's Emacs Config - Org - Sprints +#+AUTHOR: Michał Sapka (https://michal.sapka.me) +#+STARTUP: showall indent logdone + +#+HUGO_BASE_DIR: ~/ghq/vcs.sapka.me/michal-sapka-me/ +#+HUGO_WEIGHT: 400 +#+HUGO_SECTION: emacs/config +#+HUGO_CATEGORIES: emacs emacs-config +#+HUGO_MENU :menu "emacs-config" :name "Sprints" +#+HUGO_CUSTOM_FRONT_MATTER: :abstract "My emacs config - Sprints" +#+HUGO_CUSTOM_FRONT_MATTER: :menu-abstract "how I avoid using Jira" +#+EXPORT_FILE_NAME: sprints + +* TODO Intro + +* Jira + +We use Jira, and I hate using Jira. +Why then not just use Org instead? + +** Export + +There is a ready to use package called =ox-jira= which exports to a Jira/Conflunce compatible format +#+begin_src emacs-lisp + (use-package ox-jira + :after ox + :ensure t) +#+end_src + +But copy paste is too much hustle for me and would force me to use Jira interface. +I have written a small function which will save a correctly formatted buffer on my HDD and then pass it to =go-jira= to update the data on remote + +#+begin_src emacs-lisp + (defun mms-emacs-jira-set-delivery-status + (&optional async subtreep visible-only body-only ext-plist) + (interactive) + (setq comment-msg "Updated delivery status _with the power of Emacs_") + (setq issue (org-entry-get (point) "ISSUE")) + + (org-export-to-file 'jira (concat "~/tmp/" issue) + async subtreep visible-only body-only ext-plist) + (shell-command (concat "~/.emacs.d/helpers/jira-sync " issue " \"" comment-msg "\""))) +#+end_src + +I need add a drawer with issue id +#+begin_quote +:properties: +:ISSUE: EXPVGA-380 +:end: +#+end_quote + +Lastly, I register it as an export option + +#+begin_src emacs-lisp + (with-eval-after-load 'ox-jira + (org-export-define-derived-backend 'mms-emacs-jira 'jira + :menu-entry + '(?j "Export to JIRA" + ((?u "Update in Jira" mms-emacs-jira-set-delivery-status)))) + ) +#+end_src -- cgit v1.2.3