GNU bug report logs - #25778
25.1; [PATCH] Drastically simplify xdg-open check

Previous Next

Package: emacs;

Reported by: Vasilij Schneidermann <v.schneidermann <at> gmail.com>

Date: Fri, 17 Feb 2017 18:18:02 UTC

Severity: normal

Tags: patch

Merged with 18986

Found in version 25.1

Fixed in version 26.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Vasilij Schneidermann <v.schneidermann <at> gmail.com>
Subject: bug#25778: closed (Re: 25.1; [PATCH] Drastically simplify
 xdg-open check)
Date: Fri, 10 Mar 2017 03:14:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#25778: 25.1; [PATCH] Drastically simplify xdg-open check

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 25778 <at> debbugs.gnu.org.

-- 
25778: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25778
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Vasilij Schneidermann <v.schneidermann <at> gmail.com>
Cc: 25778-done <at> debbugs.gnu.org
Subject: Re: 25.1; [PATCH] Drastically simplify xdg-open check
Date: Thu, 9 Mar 2017 19:13:18 -0800
[Message part 3 (text/plain, inline)]
Thanks for the bug report. I installed the attached somewhat-more-ambitious 
patch that works along the line that you suggested. Although every heuristic in 
this area will be wrong sometimes, I think nowadays we're probably better off 
simply using xdg-open if it's available and if there's a display.

It turns out that nohup is ineffective on xdg-open, as xdg-open's child does a 
'signal (SIGHUP, SIG_DFL)' before it execs (!). This may help to explain why 
nobody noticed when Emacs stopped using nohup. Although nohup may have been 
needed for ancient GNOME versions, I don't think we need to worry about these 
old GNOME versions in future Emacs releases.

I'm closing the bug report as I think the bug is fixed. We can reopen it if I'm 
wrong.
[0001-Simplify-checks-for-xdg-open-and-xdg-email.patch (text/x-diff, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Vasilij Schneidermann <v.schneidermann <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; [PATCH] Drastically simplify xdg-open check
Date: Fri, 17 Feb 2017 19:16:48 +0100
[Message part 6 (text/plain, inline)]
A user on #emacs brought it to my attention that the xdg-open detection
for browse-url is more complex than it should be and fails detecting
their Linux desktop.  Looking at the definition of
`browse-url-can-use-xdg-open' reveals that it replicates the desktop
environment check as done by `xdg-open` (which is done to detect the
DE-specific default browser setting, not to prevent people not using a
popular desktop environment from using xdg-open).  As enumerating all
possible kinds of Linux desktop is a futile endeavor, I've completely
eliminated this check from it so that the only ones left are whether
we're in a graphical session (by checking $DISPLAY) and whether
`xdg-open` has been found on $PATH.
[0001-Drastically-simplify-check-for-xdg-open.patch (text/x-patch, attachment)]

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

Previous Next


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