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 #12 received at 18986-done <at> debbugs.gnu.org (full text, mbox):

From: "Jan D." <jan.h.d <at> swipnet.se>
To: "Florian v. Savigny" <florian <at> fsavigny.de>
Cc: Denis Howe <dbh <at> doc.ic.ac.uk>, 18986-done <at> debbugs.gnu.org,
 emacs development <emacs-devel <at> gnu.org>
Subject: Re: bug#18986: Design bug in browse-url.el:
 browse-url-can-use-xdg-open's logic uses overly strict assumption
Date: Sat, 8 Nov 2014 18:19:37 +0100
Hello.

It used to be that xdg-open just called the desktop version, i.e. gnome-open, kde-open and so on.  It is not sufficient that xdg-open exists for the most part.  We can't cater for every window manager out there, we have to go by the majority.  If you can make xdg-open work, then making Emacs use it should be easy.

	Jan D.

> 7 nov 2014 kl. 12:04 skrev Florian v. Savigny <florian <at> fsavigny.de>:
> 
> 
> 
> Dear maintainers/authors,
> 
> browse-url-can-use-xdg-open returns t only if emacs is running under one of the desktop environments, i.e. Gnome, KDE, Xfce4 or LXDE.
> 
> I do not know the deeper reasons for this, but from experience, I can confirm that this running under a desktop environment may be sufficient, but is not necessary: My emacs is running under fvwm, and xdg-open works fine. (You have to know how to configure it, but that is no dark magic either; I do it via ~/.local/share/applications/mimeapps.list.)
> 
> My guess is that it would be sufficient to check for the existence of the xdg-open binary. The condition of one of the desktop environments being run is somewhat annoying, because when not fulfilled, it causes browse-url-default-browser, which is often employed to open a URL, to default to mozilla (or whatever follows in its hardcoded list), which may not be exactly what you want. Effectively, it makes it impossible to specify your favourite browser without some kludgy hack.
> 
> I have included some of the information produced by M-x report-emacs-bug, but since I am fairly certain that most of it is irrelevant, I have left it out:
> 
> 
> In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3)
> of 2014-10-21 on bitzer.hoetzel.info
> Windowing system distributor `The X.Org Foundation', version 11.0.11601000
> Configured using:
> `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
> --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
> 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
> -fstack-protector-strong --param=ssp-buffer-size=4'
> CPPFLAGS=-D_FORTIFY_SOURCE=2
> LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
> 
> Important settings:
>  value of $LANG: de_DE.ISO-8859-1
>  locale-coding-system: iso-latin-1-unix
> 
> 
> Best regards,
> 
> Florian v. Savigny
> 
> 
> 
> 





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.