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:42:03 +0100 Message-ID: <87tvuhbw9w.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> <87vaexbwxa.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 1518741677 7976 195.159.176.226 (16 Feb 2018 00:41:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2018 00:41:17 +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:41: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 1emU5J-0001LJ-PV for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Feb 2018 01:41:06 +0100 Original-Received: from localhost ([::1]:48899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emU7L-0004nF-QD for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Feb 2018 19:43:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emU7E-0004mq-W6 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 19:43:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emU7B-0000wO-S0 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 19:43:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37446) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emU7B-0000wG-OC for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 19:43:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1emU7B-0005zr-I3 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2018 19:43:01 -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:43:01 +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.151874173222997 (code B ref 18986); Fri, 16 Feb 2018 00:43:01 +0000 Original-Received: (at 18986) by debbugs.gnu.org; 16 Feb 2018 00:42:12 +0000 Original-Received: from localhost ([127.0.0.1]:45343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emU6O-0005yp-08 for submit@debbugs.gnu.org; Thu, 15 Feb 2018 19:42:12 -0500 Original-Received: from mail-wr0-f196.google.com ([209.85.128.196]:41603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emU6M-0005yc-RY for 18986@debbugs.gnu.org; Thu, 15 Feb 2018 19:42:11 -0500 Original-Received: by mail-wr0-f196.google.com with SMTP id f8so1424400wrh.8 for <18986@debbugs.gnu.org>; Thu, 15 Feb 2018 16:42: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=vofENsjrpOuLfUysxZD1dev3zPqBArN6GskvdvAzWNo=; b=g7m3tQGVnyU1+lRzc/iTQIzy5aZU9xd01TbkccqbKFXlSU3I3lGuTJVoV8r1zp+NaK T6bDv1mq9rVulR9/C4DN/3y08YhQ5fici9jDDPvCmHBRtSeGDfdgsBtFxgG0OeqWZKOd JDfDdYGp7RgyGXzWdYcH/qmS6SDqUSWsUw2xNzZfFXcozJH0zEz8P1ayNLfdtpa1/0IL lvAWxr/0wZSchsa5VisbLTplhJh+nOEyTwQjwqgdCBap36IV1weZ9GaHzd4qOAEUSqn1 3XiEQW1i1C9Mngw46qIPJD6Rrd6Qa8nGj1OVe3rKjoqHpR2MnIzS+42am7BTRkw+Bvox vUhA== 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=vofENsjrpOuLfUysxZD1dev3zPqBArN6GskvdvAzWNo=; b=Y4XHDg21GvroSfwXgFlYzCTKNK2rFq/Oa4tST8CQsKafvAgGoNyDCf9sdIjtD1+ilv th7cTA12t8c0Xcr/AIhxToWw8q0sIjwI5TIJDQiA+bXX+49titMV6sy0uHXusjB/lW3I ypuNRWQAplaeBI1Dzqtb0LXXE8Yewa59q9gFuuahdnCK2uCQ7J8pGvDPnYcs9rb15YMB nlwt+1vv8Q107THdJJhnfVC3GDF+t9l3otonI/AeA4E3Y686T77a4l1WtuvbkVS8dM7w 3eYzlOAnjgb+HXIpaLYfJmjsj/rYupPfLeJHFmoxXX+6+GPNHx1whMhBnVDiwAlxq235 qlVg== X-Gm-Message-State: APf1xPBsOZQS8kw3LDWqQYPbDcrLxlZsWMF1Qv9JJd3Ttx08BzGNAmZt C24l3Tcn2u3yV9akd9R6UA8K7hS3yoE= X-Google-Smtp-Source: AH8x22441rsc3Q43RBPr7qi99mkoAlQYoMfkjy3wa4+chY70IR+UxvTolyS2uvc/SyZ1qJo3IuYBQA== X-Received: by 10.223.186.144 with SMTP id p16mr4354444wrg.259.1518741724986; Thu, 15 Feb 2018 16:42: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 k20sm26014790wmh.20.2018.02.15.16.42.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2018 16:42:04 -0800 (PST) In-reply-to: <87vaexbwxa.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:143331 Archived-At: --=-=-= Content-Type: text/plain Actually the design issue is a bit deeper than that: As of now (even with my suggested change) there is no proper way of retrieving the browser name. This can be problematic especially when it comes to managing processes and frames (e.g. with EXWM). So I suggest the following refactoring: - Remove `browse-url-generic'. - `browse-url-browser-function' should return a browser name (the function might need a new name). - `browse-url-default-browser' should obey the change and return a browser name, with the first check being on `browse-url-generic-program`, second check on the environment variable, third check on xdg-open, and the rest as usual. Everything gets simple, both the code and the user configuration, plus it's more flexible. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqGKNsACgkQm9z0l6S7 zH826wgAjvvRkRYVUrnW/k6VVDF+mQg+pDRtCzzrOMsF7LRGGfezk9yKa7Axa6zI 4oISGb3jMc7dLNPJaO01aV+tTys3TnI9Tj2cxbtpcExyDEvAqebu/26V3pV4O/YH 9d44ImWl35//fTrfJ0JEq5X6bERMgR/Oq0aGtAIu7wYpLr4QC0jDk6GJKEGfZ6A4 44O+GZaCmpYmlw1AkouAHwZBo018w8zPkIGbMJBm4YdVUE/AjTga6KA6LHq5E1/b 2myMPaI1KJ5HKTEALcJLbj217HL09maZFaSQctDGpdeNqx+huKHcazD+ACo8iZvc lUSHjH6j+iy3gJpGsXBcHNwbU8iSeg== =N+QN -----END PGP SIGNATURE----- --=-=-=--