From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25778: 25.1; [PATCH] Drastically simplify xdg-open check Date: Fri, 17 Feb 2017 20:38:42 +0200 Message-ID: <83shncr7bh.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1487356751 10280 195.159.176.226 (17 Feb 2017 18:39:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2017 18:39:11 +0000 (UTC) Cc: 25778@debbugs.gnu.org To: Vasilij Schneidermann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 17 19:39:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cenQx-0002Gl-Bl for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Feb 2017 19:39:07 +0100 Original-Received: from localhost ([::1]:55228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cenR3-00088k-7n for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Feb 2017 13:39:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cenQx-00088f-6L for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 13:39:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cenQu-0006GF-3s for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 13:39:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cenQu-0006Fx-0U for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 13:39:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cenQs-0008P0-2U for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 13:39:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2017 18:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25778 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 25778-submit@debbugs.gnu.org id=B25778.148735670532256 (code B ref 25778); Fri, 17 Feb 2017 18:39:02 +0000 Original-Received: (at 25778) by debbugs.gnu.org; 17 Feb 2017 18:38:25 +0000 Original-Received: from localhost ([127.0.0.1]:43809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cenQG-0008OB-OD for submit@debbugs.gnu.org; Fri, 17 Feb 2017 13:38:24 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cenQF-0008Ny-7b for 25778@debbugs.gnu.org; Fri, 17 Feb 2017 13:38:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cenQ7-0005iG-2W for 25778@debbugs.gnu.org; Fri, 17 Feb 2017 13:38:18 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cenQ6-0005iC-VP; Fri, 17 Feb 2017 13:38:15 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4088 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cenQ6-0003DS-9H; Fri, 17 Feb 2017 13:38:14 -0500 In-reply-to: (message from Vasilij Schneidermann on Fri, 17 Feb 2017 19:16:48 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129459 Archived-At: > From: Vasilij Schneidermann > Date: Fri, 17 Feb 2017 19:16:48 +0100 > > 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. First, checking $DISPLAY doesn't yet mean you are in a GUI frame. We have display-graphic-p for that. And second, I don't understand what will happen with all the bugs mentioned in the comments if we remove the code that was supposed to avoid hitting them. Maybe I'm missing something obvious.