[Top][All Lists]

[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:42:03 +0100
User-agent: mu4e 1.0; emacs 26.0.91

Actually the design issue is a bit deeper than that: As of now (even
with my suggested change) there is no proper way of retrieving the
browser name.

This can be problematic especially when it comes to managing processes
and frames (e.g. with EXWM).

So I suggest the following refactoring:

- Remove `browse-url-generic'.

- `browse-url-browser-function' should return a browser name (the function
might need a new name).

- `browse-url-default-browser' should obey the change and return a browser
name, with the first check being on `browse-url-generic-program`, second
check on the environment variable, third check on xdg-open, and the rest
as usual.

Everything gets simple, both the code and the user configuration, plus
it's more flexible.

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]