GNU bug report logs - #18986
Design bug in browse-url.el: browse-url-can-use-xdg-open's logic uses overly strict assumption

Previous Next

Package: emacs;

Reported by: "Florian v. Savigny" <florian <at> fsavigny.de>

Date: Fri, 7 Nov 2014 16:44:02 UTC

Severity: normal

Tags: patch

Merged with 25778

Found in version 25.1

Fixed in version 26.1

Done: "Jan D." <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

Full log


Message #52 received at 18986 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 18986 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: 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
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 7 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.