From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pierre Neidhardt Newsgroups: gmane.emacs.bugs Subject: 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:28:01 +0100 Message-ID: <87vaexbwxa.fsf@gmail.com> References: <85lhnnw9t7.fsf@bertrandrussell.Speedport_W_723V_1_36_000> <87a7wep475.fsf@gmail.com> <83h8qmyu9u.fsf@gnu.org> <877erip040.fsf@gmail.com> <838tbyyrq7.fsf@gnu.org> <87tvujp7lw.fsf@gmail.com> <871shn80et.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1518740838 4080 195.159.176.226 (16 Feb 2018 00:27:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2018 00:27:18 +0000 (UTC) User-Agent: mu4e 1.0; emacs 26.0.91 Cc: 18986@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 16 01:27:13 2018 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 1emTrn-0000O3-LH for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Feb 2018 01:27:07 +0100 Original-Received: from localhost ([::1]:47829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emTtp-0005fI-Mf for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Feb 2018 19:29:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emTth-0005eY-Tf for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 19:29:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emTte-00022T-Qd for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 19:29:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emTte-00022J-MM for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 19:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1emTte-0005gI-Ak for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 19:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Feb 2018 00:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18986 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 18986-submit@debbugs.gnu.org id=B18986.151874089421780 (code B ref 18986); Fri, 16 Feb 2018 00:29:02 +0000 Original-Received: (at 18986) by debbugs.gnu.org; 16 Feb 2018 00:28:14 +0000 Original-Received: from localhost ([127.0.0.1]:45339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emTsr-0005fE-Oc for submit@debbugs.gnu.org; Thu, 15 Feb 2018 19:28:13 -0500 Original-Received: from mail-wr0-f195.google.com ([209.85.128.195]:44495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emTso-0005ez-M5 for 18986@debbugs.gnu.org; Thu, 15 Feb 2018 19:28:10 -0500 Original-Received: by mail-wr0-f195.google.com with SMTP id v65so1393840wrc.11 for <18986@debbugs.gnu.org>; Thu, 15 Feb 2018 16:28:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=Tw/r1wr5j2wadKSTyRsvEMGLCQcZH5AJVS0PR8luga8=; b=d72siaa6jj7CX6ya797rhfWz86+xo+wxuy4TGsY8Zwk9875aCEA5ZuXKi0YewWpZ+u vEEUS3WipJ/AS00ao+cAUzKgjFeA82435W3w/EkOf/YOlB7DWqMkoi6IWrk5e+vJL7tm FAXW/o5gH72G2qll2q2wXVP0PcAN3xxsQHBKad+nKSkLyNarOEwrNs8SumWsVua7fRFY cf7rQfqw77je2Y7vQ/Hs/bNeQJdrwbdEU5/Y9lkCtLnHVuua6tKYxnPdwVXrV7WbtMzM 6NqFpYeWhbWOBPqSdDOCV201M1cpNU+1vcQZvADm6Wn4Ac3cZkV38/atAMZmOQLqMp/2 5QKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=Tw/r1wr5j2wadKSTyRsvEMGLCQcZH5AJVS0PR8luga8=; b=tgBy+D30j5RSUczOE2tl+BDjVgDissq6/m5hYrV8M700+Zzr9m7qK82lrSpLmXGnNc 6pjmpBYIVuR2MkMVaKmfF4JHby89Ls8J9ZxAMz/U7DhsDxTvfjeVdRBlcLV9xCxiqrmx b0UOthee+ntj+p1UpxSgSYGkvjwgcxwWmUbLJ838N7FFwxhsPgzmr522JuoqlT7VFfEe zciUwBiBKIELeJL4K3YIRD8ZW7J57ZJ5Efdl1RhuxmsL7EjYOMG8fwdKoiY6XQhZkmUn 3qL8sK6I1ZWHGjpqbZRTj1AmKdKsKtTekgRHmAQAqRemw4W31nClbDp4zPHnskAxjQ95 4M4Q== X-Gm-Message-State: APf1xPCmGiq/6TQEeoIf8MYHaUh6r6op227x0gEyjk+PY5F1IaOI3wrp dZJTmWw4Zo0X4u88XKodu3FjZrBLqmM= X-Google-Smtp-Source: AH8x224B4TmMgE3nYVycUZUFIt1wyZRyni4d+O5HwLXCNAn6lVpNHDN3vFHUi+9QS0KUXT8kP+L5Xw== X-Received: by 10.223.161.72 with SMTP id r8mr3764262wrr.55.1518740884707; Thu, 15 Feb 2018 16:28:04 -0800 (PST) Original-Received: from mimimi (18.160.3.93.rev.sfr.net. [93.3.160.18]) by smtp.gmail.com with ESMTPSA id k125sm27997147wmd.48.2018.02.15.16.28.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2018 16:28:03 -0800 (PST) In-reply-to: <871shn80et.fsf@gmail.com> 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:143330 Archived-At: --=-=-= Content-Type: text/plain OK, I'm running Emacs 26 now, and it the xdg-open is indeed solved as per #25778. Still one rough edge left: if xdg-open is missing but BROWSER is set, Emacs will not run the browser configured by the user but the first one it found in the list. I think the patch I suggested above would be good enough, or maybe even better: (defun browse-url-default-browser (url &rest args) ... (apply (cond ... + ((and (getenv "BROWSER") (executable-find (getenv "BROWSER"))) + (executable-find (getenv "BROWSER"))) ((memq system-type '(windows-nt ms-dos cygwin)) 'browse-url-default-windows-browser) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqGJZEACgkQm9z0l6S7 zH9c3Qf8DdFEuexxurFg0vKOkzZZGxklDYo9uyWynZYWnVFeuvP/9IZe4S3iCHRY VetifLEFpI4YMqyk3DAxGb5Bj4uWjbG83G3Xe07OfOwYskpr1Wk8ssrmWJBUoJSz qQe+ISaxdZWrAYwu2xEsAI7YRF7euxiDHln0WI4Otrwj5hyX7pLEhlTsVPIpw6yU GcixczRlUAjoW7Ymr1EdYmyMMW75t9hkQ9dTu04q1vKSWkk1CUJbuKhtxjgzlgxe JnrVw6tmx0H3cN6LDbLUvmo0fyfc5q80viuipAxf59rcM5vhoA1pc2Ov33zi/+Re nHtDlUxGwzoFkvXZU1yLcJGb+vhnQA== =4VEL -----END PGP SIGNATURE----- --=-=-=--