From f933f5527d33c598ed26e0c0620c1dabc504efd2 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 15 Dec 2023 20:11:56 -0700 Subject: [PATCH] [Emacs] Add functions to allow git-link to work with dev.railbird.ai --- dotfiles/emacs.d/README.org | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 5b800a06..6d2ee888 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -3150,7 +3150,21 @@ My org-mode configuration now lives in its own file org-config.org. :defer t :config (progn - (setq git-link-use-commit t))) + (setq git-link-use-commit t) + (defun git-link-commit-gitea (hostname dirname commit) + (format "https://%s/%s/commit/%s" + hostname + dirname + commit)) + (defun git-link-gitea (hostname dirname filename branch commit start end) + (format "https://%s/%s/src/commit/%s/%s#L%s" + hostname + dirname + commit + filename + start)) + (add-to-list 'git-link-remote-alist '("dev.railbird.ai" git-link-gitea)) + (add-to-list 'git-link-commit-remote-alist '("dev.railbird.ai" git-link-gitea)))) #+END_SRC ** magit-gitflow #+BEGIN_SRC emacs-lisp