From 7f323dd1a31710318d0884619f49555abdf35469 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Fri, 1 Apr 2022 08:20:44 +0200 Subject: [PATCH] Improve the regular expressions for browse-url-browser-function --- README.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 02c3f9a..fe47806 100644 --- a/README.org +++ b/README.org @@ -3277,8 +3277,8 @@ Listing [[lst:configure-browse-url]] configures =browse-url=. (start-process "mpv" nil "mpv" url)) (custom-set-variables '(browse-url-browser-function - '(("https:\\/\\/www\\.youtu\\.*be." . browse-url-mpv) - ("https://soundcloud.com" . browse-url-mpv) + `((,(rx (or "https://www.youtube.com/" "https://youtu.be/")) . browse-url-mpv) + ("https://soundcloud.com/" . browse-url-mpv) ("." . eww-browse-url))) `(browse-url-generic-program ,(or (when (eq system-type 'darwin) "open") (executable-find "firefox")))))