Skip to content

Commit

Permalink
Moved jira markdown major mode into its own package
Browse files Browse the repository at this point in the history
  • Loading branch information
andykuszyk committed Sep 13, 2024
1 parent 2300a4d commit ee076fa
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
36 changes: 36 additions & 0 deletions jira-markdown-mode.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
;;; jira-markdown-mode.el --- A major mode for Jira markdown -*- lexical-binding:t; ispell-buffer-session-localwords: (); -*-

;; Copyright (C) 2024 Andy Kuszyk

;; Author: Andy Kuszyk <[email protected]>
;; URL: https://github.com/andykuszyk/ob-jira-markdown.el
;; Version: 0.1
;; Keywords: org-babel
;; Package-Requires: ((emacs "29.1") markdown-mode)

;; This file is not part of GNU Emacs.

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:
;; A major mode for Jira markdown

;;; Code:
(require 'markdown-mode)

(define-derived-mode jira-markdown-mode markdown-mode "jira-markdown"
"A major mode for editing Jira markup using Markdown.")

(provide 'jira-markdown-mode)
;;; jira-markdown-mode.el ends here
12 changes: 4 additions & 8 deletions ob-jira-markdown.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; ob-jira-markdown.el --- org-babel functions for jira-cli evaluation -*- lexical-binding:t; ispell-buffer-session-localwords: ("jira" "src" "emx-"); -*-
;;; ob-jira-markdown.el --- Org-babel functions for jira-cli evaluation -*- lexical-binding:t; ispell-buffer-session-localwords: ("jira" "src" "emx"); -*-

;; Copyright (C) 2024 Andy Kuszyk

Expand All @@ -24,15 +24,15 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:
;; org-babel support for creating, viewing, and editing Jira issues via the Jira
;; Org-babel support for creating, viewing, and editing Jira issues via the Jira
;; CLI: https://github.com/ankitpokhrel/jira-cli

;;; Code:
(require 'ob)
(require 'ob-ref)
(require 'ob-comint)
(require 'ob-eval)
(require 'markdown-mode)
(require 'jira-markdown-mode)

(defgroup ob-jira-markdown
nil
Expand All @@ -45,9 +45,6 @@
"The URL of the Jira host to use when formatting issue URLs."
:type 'string)

(define-derived-mode jira-markdown-mode markdown-mode "jira-markdown"
"A major mode for editing Jira markup using Markdown.")

(defvar org-babel-default-header-args:jira-markdown
'((:results . "output"))
"Default arguments for evaluating a Jira Markdown source block.")
Expand All @@ -61,8 +58,7 @@
(project (cdr (assoc :project params)))
(parent (cdr (assoc :parent params)))
(command (cdr (assoc :command params)))
(execute (cdr (assoc :execute params)))
)
(execute (cdr (assoc :execute params))))
(cond
((string= command "create")
(if issue
Expand Down

0 comments on commit ee076fa

Please sign in to comment.