From f28f542d4d06dd855f187d8a3ef38deba9d68372 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 2 Oct 2023 19:44:39 -0400 Subject: [PATCH] Force plain rendering for github links. When linking to a document that renders like markdown or org-mode, we need the plain parameter to get the link to actually go to a line of code. --- ansible/roles/emacs/files/elisp/base-functions.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/emacs/files/elisp/base-functions.el b/ansible/roles/emacs/files/elisp/base-functions.el index 7a46c93..7859e83 100644 --- a/ansible/roles/emacs/files/elisp/base-functions.el +++ b/ansible/roles/emacs/files/elisp/base-functions.el @@ -77,7 +77,7 @@ (let* ( (gh-org (match-string 2 repository-url)) (gh-repo (match-string 3 repository-url)) - (full-url (format "https://github.com/%s/%s/blob/%s/%s#L%s" gh-org gh-repo current-rev relative-path line-number)) + (full-url (format "https://github.com/%s/%s/blob/%s/%s?plain=1#L%s" gh-org gh-repo current-rev relative-path line-number)) ) (message "%s" full-url) (kill-new full-url)