diff --git a/CHANGELOG b/CHANGELOG index 783995ab..147418e4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,8 @@ - Fixed visiting commit in a browser. 8f9e94949 +- Added new variable ~forge-bug-reference-remote-files~. #703 + * v0.4.4 2024-10-01 Thoughts and whitespace. diff --git a/lisp/forge-topic.el b/lisp/forge-topic.el index cf0655c5..85b85016 100644 --- a/lisp/forge-topic.el +++ b/lisp/forge-topic.el @@ -1712,6 +1712,10 @@ alist, containing just `text' and `position'.") ;;; Bug-Reference +(defvar forge-bug-reference-remote-files t + "Whether forge may enable `bug-reference-mode' in remote files. +See also `forge-bug-reference-setup'.") + (defun forge-bug-reference-setup () "Setup `bug-reference' in the current buffer. If forge data has been fetched for the current repository, then @@ -1719,6 +1723,9 @@ enable `bug-reference-mode' or `bug-reference-prog-mode' and modify `bug-reference-bug-regexp' if appropriate." (unless (or bug-reference-url-format (not (forge-db t)) + (and buffer-file-name + (not forge-bug-reference-remote-files) + (file-remote-p buffer-file-name)) ;; TODO Allow use in these modes again. (derived-mode-p 'forge-topics-mode 'forge-notifications-mode)) (magit--with-safe-default-directory nil