From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.bugs Subject: bug#25778: 25.1; [PATCH] Drastically simplify xdg-open check Date: Fri, 17 Feb 2017 19:55:14 +0100 Message-ID: <20170217185514.GA599@odonien.localdomain> References: <83shncr7bh.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: blaine.gmane.org 1487357775 30212 195.159.176.226 (17 Feb 2017 18:56:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2017 18:56:15 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 25778@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 17 19:56:11 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 1cenhS-000776-NG for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Feb 2017 19:56:10 +0100 Original-Received: from localhost ([::1]:55266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cenhT-0002zW-Cz for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Feb 2017 13:56:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cenhN-0002zP-Af for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 13:56:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cenhK-00075u-9h for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 13:56:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45614) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cenhK-00075c-5n for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 13:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cenhJ-0000Kz-QG for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 13:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2017 18:56:01 +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.14873577231241 (code B ref 25778); Fri, 17 Feb 2017 18:56:01 +0000 Original-Received: (at 25778) by debbugs.gnu.org; 17 Feb 2017 18:55:23 +0000 Original-Received: from localhost ([127.0.0.1]:43813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cengh-0000Jw-7j for submit@debbugs.gnu.org; Fri, 17 Feb 2017 13:55:23 -0500 Original-Received: from mail-wm0-f67.google.com ([74.125.82.67]:35136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cengg-0000Jg-0d for 25778@debbugs.gnu.org; Fri, 17 Feb 2017 13:55:22 -0500 Original-Received: by mail-wm0-f67.google.com with SMTP id u63so4039874wmu.2 for <25778@debbugs.gnu.org>; Fri, 17 Feb 2017 10:55:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rTDyhwfUroiTNQzRU8k64u5Ph0t7iTK4oEzAmYDAEyw=; b=LVGaGZKkcjwfBPAJiPctbby1ftfqSnTsd5O138hSniqMZeTH3Nqm5cCOva+N4aX0nn qfy4/CdQe7+Tzf+zv+Xe6M53gnavx4bGyH5ANIfTHL18BlqSal+LRb+kwQPGii/CNqAZ 8/HeQCMtDjNTOv9BwWlmj2c2f1p6uyJel9EsYDjWkbq4Gb6eWuQA5nfqBAPymk59fWXH ohy+m5cBf+SWm9CsO40A1Dt1yZDVvROOPzdTam3vwe6/yizrZzkJtjX3J5eA3zB/FNdD J+kO/VCDViuyRThWZdTddzy9DfdfPeOcWvVhlVZr4l4vKZbQ8f1e20kSmrKlSiXwShDu b7Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rTDyhwfUroiTNQzRU8k64u5Ph0t7iTK4oEzAmYDAEyw=; b=s/ve6s1rfioz3YcmVoWWzvQfJykwNAfL3EeQz47bpnxUzqPYeRlFwqpTcTGAeYvluk KE2tS1lPQ234m3KnZ/Q4bnOadIxcogSwMUaLxet2NcqwqQ6JgnrvtqwYWzZAjlokRh0z 1NdfaTa/ZrXBvgibxfIBUfp1b2bZbV25YMzz7ZcwHYA9ufzY3EfbKFbLa0Z6CO42hn0r j8c/VbJIAaBitsJTPB4ir/D5iLp7v4Mi292Tq17s7S/xSsP9FHg+T4tbv8il3tHxFs4j G6p57dah7iwLHOIAw85Oz3IxfKdQPN5X94y3SAVvExdX6tyUkfS3EahA0uqm/3SBwvvH AsTA== X-Gm-Message-State: AMke39nM35V8KY7wlIyIb8RBqPyWDJ4aQU/N5lWef3FZrq1j7fSj5ZFzoo9TlpYtb9GiXA== X-Received: by 10.28.61.136 with SMTP id k130mr3041168wma.128.1487357716216; Fri, 17 Feb 2017 10:55:16 -0800 (PST) Original-Received: from localhost ([31.212.48.161]) by smtp.gmail.com with ESMTPSA id x39sm14020851wrb.3.2017.02.17.10.55.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Feb 2017 10:55:15 -0800 (PST) Content-Disposition: inline In-Reply-To: <83shncr7bh.fsf@gnu.org> 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:129460 Archived-At: > First, checking $DISPLAY doesn't yet mean you are in a GUI frame. We > have display-graphic-p for that. The assumption that you need to be in a GUI frame is incorrect. If I run `emacs -nw` in a graphical terminal emulator, why would that prevent me from opening a graphical browser? The only way I see to detect whether a graphical browser can be opened is by checking for X with $DISPLAY. > 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. OK, I'll go through them all for completeness' sake: - bug#7166: This one arises from using /bin/sh in combination with `nohup` for launching xdg-open, resulting in a lack of shell quoting. As `xdg-open` is launched directly, it's no longer relevant and only mentioned because of `nohup` (which is no longer used either). - bug#8917: The old usage of `call-process` has made `nohup` obsolete. Irrelevant as `nohup` isn't used any longer. - bug#9779: Extension of the now removed xdg-open DE detection logic, together with some discussion whether nohup is still necessary. Some voices in favor of not doing any unnecessary detection. - The linked emacs-devel thread: Sighting of a possible bug in gnome-open. As `nohup` is no longer used, there's no way this could have been worked around with its usage Summary: All linked bugs are related to `nohup` which is only checked for, but not actually used. Therefore they can be disregarded. Do you have any actual objections based on a situation where one would *not* want to use xdg-open, even though it's installed and the user in a X11 session?