From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#22850: 25.1.50; Wishlist: Rework how Emacs decides to follow links Date: Tue, 01 Mar 2016 01:04:01 +1100 Message-ID: <87twkrk3zi.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456754732 12704 80.91.229.3 (29 Feb 2016 14:05:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 14:05:32 +0000 (UTC) To: 22850@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 29 15:05:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aaORi-0004by-7T for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 15:05:10 +0100 Original-Received: from localhost ([::1]:36876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaORh-0004qz-LC for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 09:05:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaORc-0004pz-W2 for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 09:05:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaORa-00058V-7z for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 09:05:04 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaORa-00058R-56 for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 09:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aaORa-0000yS-0u for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 09:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Feb 2016 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22850 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14567546903719 (code B ref -1); Mon, 29 Feb 2016 14:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Feb 2016 14:04:50 +0000 Original-Received: from localhost ([127.0.0.1]:51997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaORN-0000xv-HH for submit@debbugs.gnu.org; Mon, 29 Feb 2016 09:04:49 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42287) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaORM-0000xi-1T for submit@debbugs.gnu.org; Mon, 29 Feb 2016 09:04:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaORA-000554-TO for submit@debbugs.gnu.org; Mon, 29 Feb 2016 09:04:42 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaORA-000550-Py for submit@debbugs.gnu.org; Mon, 29 Feb 2016 09:04:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaOR9-0004nh-66 for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 09:04:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaOR6-00054Z-Ag for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 09:04:35 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:57610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaOR6-00054T-0B for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 09:04:32 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aaOQf-000145-Jq for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 15:04:06 +0100 X-MailScanner-ID: 1aaOQf-000145-Jq MailScanner-NULL-Check: 1457359446.70614@/RJ9guVkWTp7nO71qpx1Nw X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114129 Archived-At: When you click on a link, the browse-url-browser-function variable decides how a link would is to be followed. When Emacs got its own web browser, we needed a way to say "but what if I want to open this in another browser?", so we got the shr-external-browser variable. This leads to inconsistencies in how we interact with links, especially when we contemplate doing away with the Info format and using HTML instead. What we want is this, I think: A way to say what the internal browser is (eww, emacs-w3m, etc), and a way to say what the preferred external browser is (Firefox, Chrome, etc), and a way to say that we prefer to use either the external or the internal browser by default. So here's what I propose: Three new variables. browse-url-internal-browser browse-url-external-browser browse-url-use-internal-browser (which would be nil/non-nil) All commands that follow links (in all modes) will allow you to choose whether to use the default or the non-default method. That is, hitting `RET' on a link would, if `browse-url-use-internal-browser' is set, open the link using the internal browser. `C-u RET' would use the external browser. And if it's not set, then `RET' would use the external browser, and `C-u RET' would use the internal browser. I think this would be flexible, but completely transparent and predictable for the user. Today, if you hit `RET' on a link in erc, it's going to do something else than if you hit `RET' on a link in an HTML mail in Gnus. In GNU Emacs 25.1.50.48 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7) of 2016-02-29 built on mouse Repository revision: 379a846b8548dc32a9019ef0a37c02f62cd9bad1 Windowing system distributor 'The X.Org Foundation', version 11.0.11702000 System Description: Ubuntu 15.10 Configured using: 'configure --with-xwidgets --with-x-toolkit=gtk3' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS Important settings: value of $LC_MONETARY: nb_NO.UTF-8 value of $LC_NUMERIC: nb_NO.UTF-8 value of $LC_TIME: nb_NO.UTF-8 value of $LANG: C value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: shell-dirtrack-mode: t diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t Recent messages: Mark set Mark saved where search started Mark set Mark saved where search started Making completion list... Mark saved where search started Mark set Mark saved where search started Mark set Making completion list... Load-path shadows: ~/src/emacs/elpa/packages/debbugs/debbugs-org hides /home/larsi/.emacs.d/elpa/debbugs-0.7/debbugs-org ~/src/emacs/elpa/packages/debbugs/debbugs-browse hides /home/larsi/.emacs.d/elpa/debbugs-0.7/debbugs-browse ~/src/emacs/elpa/packages/debbugs/debbugs-gnu hides /home/larsi/.emacs.d/elpa/debbugs-0.7/debbugs-gnu ~/src/emacs/elpa/packages/debbugs/debbugs hides /home/larsi/.emacs.d/elpa/debbugs-0.7/debbugs Features: (shadow emacsbug image-mode view pp timezone etags perl-mode flow-fill eww shell pcomplete comint gnus-html log-edit pcvs-util whitespace vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc-dir ewoc bug-reference ecomplete mailalias smtpmail sendmail crm edebug pulse help-fns find-func thingatpt xref project ring misearch multi-isearch vc vc-dispatcher vc-git diff-mode map url-queue url-cache shr-color color mm-archive sort smiley ansi-color gnus-cite qp gnus-async gnus-dup gnus-ml gmane spam-gmane dns mm-url disp-table nndoc gnus-fun gnus-mdrtn gnus-topic nndraft nnmh utf-7 nnfolder copyright network-stream nsm starttls nnir spam-report spam spam-stat gnus-uu yenc gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message format-spec rfc822 mml mml-sec epa epg mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs mail-utils wid-edit movie mkv shr svg browse-url imdb dom pvr debug debbugs-gnu easy-mmode derived subr-x debbugs soap-client mm-decode mm-bodies mm-encode url-http tls gnutls url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw puny url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap warnings rng-xsd rng-dt rng-util xsd-regexp xml ido seq flyspell ispell dired dired-loaddefs add-log mail-extr mm-util mail-prsvr jka-compr cl finder-inf info package epg-config url-handlers url-parse auth-source cl-seq eieio byte-opt bytecomp byte-compile cl-extra help-mode easymenu cconv eieio-core cl-macs gv eieio-loaddefs cl-loaddefs pcase cl-lib password-cache url-vars time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 1239345 132112) (symbols 48 151151 39) (miscs 40 615 2727) (strings 32 254878 17581) (string-bytes 1 9402816) (vectors 16 47199) (vector-slots 8 1709029 146158) (floats 8 2021 2558) (intervals 56 95890 2882) (buffers 976 74) (heap 1024 240347 119366)) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no