Function: forge--browse-url-handler-predicate
forge--browse-url-handler-predicate is a natively compiled function
defined in forge-topic.el.
Signature
(forge--browse-url-handler-predicate URL)
Source Code
;; Defined in /nix/store/923zwib42c4qw6x4xps0cv1wi8qcd6lp-emacs-packages-deps/share/emacs/site-lisp/elpa/forge-20261005.753/forge-topic.el
;;; Browse-Url
(defun forge--browse-url-handler-predicate (url)
(and-let* ((_ forge-browse-topics-using-forge)
(_ (not current-prefix-arg))
(_ (string-match "\
/\\(issues\\|pull\\|discussions\\|merge_requests\\)/\\([0-9]+\\)\\'" url))
(number (string-to-number (match-string 2 url)))
(repo-url (substring url 0 (match-beginning 1)))
(repo (forge-get-repository repo-url nil :tracked?)))
;; Unlike in `forge-visit-topic-from-url' this cannot fetch a
;; missing topic first, because that is done asynchronously,
;; and as a predicate, this needs an immediately answer.
(forge-get-topic repo number)))