From dbcd6d2015627485e4d79a04404d8615b58303a0 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 30 Jan 2025 08:50:39 +1100 Subject: [emacs] Factor infobox forge url format --- emacs/.emacs.d/lisp/my/my-web.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'emacs/.emacs.d/lisp/my/my-web.el') diff --git a/emacs/.emacs.d/lisp/my/my-web.el b/emacs/.emacs.d/lisp/my/my-web.el index 3d1f9d3..21b227d 100644 --- a/emacs/.emacs.d/lisp/my/my-web.el +++ b/emacs/.emacs.d/lisp/my/my-web.el @@ -223,5 +223,14 @@ https://emacs.stackexchange.com/questions/40887/in-org-mode-how-do-i-link-to-int (buffer-string) ))) +(defun my-forge-infobox-format-url (url) + (concat url + " -- " (buttonize "clone" + (lambda (_) + (my-magit-clone url current-prefix-arg))) + " " (buttonize "context" + (lambda (_) + (funcall my-url-context-function url))))) + (provide 'my-web) ;;; my-web.el ends here -- cgit v1.2.3