Update browse-url configuration for Emacs-28.1
This commit is contained in:
parent
7f323dd1a3
commit
55f7e6fcae
22
README.org
22
README.org
@ -3275,13 +3275,21 @@ Listing [[lst:configure-browse-url]] configures =browse-url=.
|
|||||||
(with-eval-after-load 'browse-url
|
(with-eval-after-load 'browse-url
|
||||||
(defun browse-url-mpv (url &optional _)
|
(defun browse-url-mpv (url &optional _)
|
||||||
(start-process "mpv" nil "mpv" url))
|
(start-process "mpv" nil "mpv" url))
|
||||||
(custom-set-variables
|
(if (version< emacs-version "28.0")
|
||||||
'(browse-url-browser-function
|
(custom-set-variables
|
||||||
`((,(rx (or "https://www.youtube.com/" "https://youtu.be/")) . browse-url-mpv)
|
'(browse-url-browser-function
|
||||||
("https://soundcloud.com/" . browse-url-mpv)
|
`((,(rx (or "https://www.youtube.com/" "https://youtu.be/")) . browse-url-mpv)
|
||||||
("." . eww-browse-url)))
|
("https://soundcloud.com/" . browse-url-mpv)
|
||||||
`(browse-url-generic-program ,(or (when (eq system-type 'darwin) "open")
|
("." . eww-browse-url)))
|
||||||
(executable-find "firefox")))))
|
`(browse-url-generic-program ,(or (when (eq system-type 'darwin) "open")
|
||||||
|
(executable-find "firefox"))))
|
||||||
|
(custom-set-variables
|
||||||
|
'(browse-url-handlers
|
||||||
|
`((,(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"))))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** [[https://en.wikipedia.org/wiki/Eww_(web_browser)][Emacs Web Wowser]]
|
*** [[https://en.wikipedia.org/wiki/Eww_(web_browser)][Emacs Web Wowser]]
|
||||||
|
Loading…
Reference in New Issue
Block a user