From 48a5e69b515861127f566110a1f82711633dcf33 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 6 Jan 2025 21:30:13 +1100 Subject: [emacs][rofi] browse-url jira from org-jira * emacs/.emacs.d/init/ycp-web.el: Add org link handling jira; add my-org-jira-open-url as a browse-url-handler * emacs/.emacs.d/lisp/my/my-org-jira.el: add functions to fetch jira issue given a url * emacs/.emacs.d/lisp/my/my-web.el: remove the redundant my-browse-url now that we use browse-url-handlers * emacs/.emacs.d/lisp/my/my-ytdl.el: infobox to extract from ytdl supported video urls * misc/.config/rofi/config.rasi: newer versions of rofi does not do glob matching like prefix any more --- emacs/.emacs.d/lisp/my/my-org-jira.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'emacs/.emacs.d/lisp/my/my-org-jira.el') diff --git a/emacs/.emacs.d/lisp/my/my-org-jira.el b/emacs/.emacs.d/lisp/my/my-org-jira.el index 2502f02..9e2f821 100644 --- a/emacs/.emacs.d/lisp/my/my-org-jira.el +++ b/emacs/.emacs.d/lisp/my/my-org-jira.el @@ -82,7 +82,7 @@ :proj-key (path '(fields project key)) :related-issues (mapconcat (lambda (c) - (print c) + ;; (print c) (if (org-jira-sdk-path c '(inwardIssue)) (if (equal (org-jira-sdk-path @@ -269,5 +269,13 @@ (interactive) (kill-new (my-org-jira-comment-url-at-point))) +(defun my-org-jira-url-p (url) + (string-match-p (format "^%s/browse/[^/]" jiralib-url) url)) + +(defun my-org-jira-open-url (url) + (interactive "sJIRA issue url: ") + (when (string-match (format "^%s/browse/\\([^/]+\\)" jiralib-url) url) + (org-jira-get-issue (match-string 1 url)))) + (provide 'my-org-jira) ;;; my-org-jira.el ends here -- cgit v1.2.3