[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18986: #18986 Design bug in browse-url.el: browse-url-can-use-xdg-op
From: |
Pierre Neidhardt |
Subject: |
bug#18986: #18986 Design bug in browse-url.el: browse-url-can-use-xdg-open's logic uses overly strict assumption |
Date: |
Fri, 16 Feb 2018 01:28:01 +0100 |
User-agent: |
mu4e 1.0; emacs 26.0.91 |
OK, I'm running Emacs 26 now, and it the xdg-open is indeed solved as per
#25778.
Still one rough edge left: if xdg-open is missing but BROWSER is set,
Emacs will not run the browser configured by the user but the first one
it found in the list.
I think the patch I suggested above would be good enough, or maybe even better:
(defun browse-url-default-browser (url &rest args)
...
(apply
(cond
...
+ ((and (getenv "BROWSER") (executable-find (getenv "BROWSER")))
+ (executable-find (getenv "BROWSER")))
((memq system-type '(windows-nt ms-dos cygwin))
'browse-url-default-windows-browser)
signature.asc
Description: PGP signature