From a179209678f009e72f7d28a80e026afaa3076d1d Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 23 Aug 2019 06:00:36 +0200 Subject: [PATCH] Fix interaction between url-handler-mode and browse-url * lisp/net/browse-url.el (browse-url): Don't expand any URLs (like "man:") that have a scheme when using `url-handler-mode' (bug#37056). --- lisp/net/browse-url.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 3151dae0aa2..87a8248854f 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -781,7 +781,9 @@ as ARGS." (interactive (browse-url-interactive-arg "URL: ")) (unless (called-interactively-p 'interactive) (setq args (or args (list browse-url-new-window-flag)))) - (when (and url-handler-mode (not (file-name-absolute-p url))) + (when (and url-handler-mode + (not (file-name-absolute-p url)) + (not (string-match "\\`[a-z]+:" url))) (setq url (expand-file-name url))) (let ((process-environment (copy-sequence process-environment)) (function (or (and (string-match "\\`mailto:" url) -- 2.39.5