GNU bug report logs - #44783
28.0.50; wish for eww: include gopher and gemini links

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Sat, 21 Nov 2020 19:43:01 UTC

Severity: wishlist

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44783 in the body.
You can then email your comments to 44783 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Sat, 21 Nov 2020 19:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean Louis <bugs <at> gnu.support>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 21 Nov 2020 19:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; wish for eww: include gopher and gemini links
Date: Sat, 21 Nov 2020 22:41:29 +0300
It would be good to handle other links from eww such as gopher and
gemini

- defcustom for function to launch gemini client, could be Emacs
  package as elpher, preferred or could be external program

- defcustom for function to launch gopher client, could be Emacs
  package like elpher, preferred, or could be external program
  
-- 
Thanks,
Jean Louis
⎔ λ 🄯 𝍄 𝌡 𝌚




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Sat, 21 Nov 2020 19:53:01 GMT) Full text and rfc822 format available.

Message #8 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Sat, 21 Nov 2020 21:52:20 +0200
> Date: Sat, 21 Nov 2020 22:41:29 +0300
> From: Jean Louis <bugs <at> gnu.support>
> 
> 
> It would be good to handle other links from eww such as gopher and
> gemini
> 
> - defcustom for function to launch gemini client, could be Emacs
>   package as elpher, preferred or could be external program
> 
> - defcustom for function to launch gopher client, could be Emacs
>   package like elpher, preferred, or could be external program

Doesn't browse-url already support that?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Sat, 21 Nov 2020 21:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Sat, 21 Nov 2020 22:59:19 +0300
* Eli Zaretskii <eliz <at> gnu.org> [2020-11-21 22:53]:
> > Date: Sat, 21 Nov 2020 22:41:29 +0300
> > From: Jean Louis <bugs <at> gnu.support>
> > 
> > 
> > It would be good to handle other links from eww such as gopher and
> > gemini
> > 
> > - defcustom for function to launch gemini client, could be Emacs
> >   package as elpher, preferred or could be external program
> > 
> > - defcustom for function to launch gopher client, could be Emacs
> >   package like elpher, preferred, or could be external program
> 
> Doesn't browse-url already support that?

I see unknown url scheme gopher and trying to open gopher. If unknown
it should not even try opening it.

But gopher and gemini are well known protocols and Emacs is one of its
browsers. Elpher package recognizes WWW and redirects to eww, so eww
should be able to redirect to something else such as elpher or
external gopher and gemini browsers.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Tue, 24 Nov 2020 07:24:02 GMT) Full text and rfc822 format available.

Message #14 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Tue, 24 Nov 2020 08:23:37 +0100
Jean Louis <bugs <at> gnu.support> writes:

> It would be good to handle other links from eww such as gopher and
> gemini
>
> - defcustom for function to launch gemini client, could be Emacs
>   package as elpher, preferred or could be external program
>
> - defcustom for function to launch gopher client, could be Emacs
>   package like elpher, preferred, or could be external program

I've now added eww-use-browse-url, which you can change to make eww hand
off gopher: links to browse-url.  browse-url has machinery to further
decide how to handle these things via browse-url-handlers.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 24 Nov 2020 07:25:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 44783 <at> debbugs.gnu.org and Jean Louis <bugs <at> gnu.support> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 24 Nov 2020 07:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Tue, 24 Nov 2020 09:04:01 GMT) Full text and rfc822 format available.

Message #21 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Tue, 24 Nov 2020 12:03:13 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-11-24 10:24]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > It would be good to handle other links from eww such as gopher and
> > gemini
> >
> > - defcustom for function to launch gemini client, could be Emacs
> >   package as elpher, preferred or could be external program
> >
> > - defcustom for function to launch gopher client, could be Emacs
> >   package like elpher, preferred, or could be external program
> 
> I've now added eww-use-browse-url, which you can change to make eww hand
> off gopher: links to browse-url.  browse-url has machinery to further
> decide how to handle these things via browse-url-handlers.

Really?

Do you think I could then also use goto-address-mode where hyperlinks
appear and that I can customize it to open up any kinds of URI
hyperlinks?







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Tue, 24 Nov 2020 09:05:02 GMT) Full text and rfc822 format available.

Message #24 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Tue, 24 Nov 2020 10:04:22 +0100
Jean Louis <bugs <at> gnu.support> writes:

> Do you think I could then also use goto-address-mode where hyperlinks
> appear and that I can customize it to open up any kinds of URI
> hyperlinks?

If goto-address-mode calls browse-url, yes.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Tue, 24 Nov 2020 09:11:02 GMT) Full text and rfc822 format available.

Message #27 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Tue, 24 Nov 2020 12:10:22 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-11-24 12:05]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > Do you think I could then also use goto-address-mode where hyperlinks
> > appear and that I can customize it to open up any kinds of URI
> > hyperlinks?
> 
> If goto-address-mode calls browse-url, yes.

C-c RET (translated from C-c <return>) runs the command
goto-address-at-point (found in goto-address-highlight-keymap), which
is an autoloaded interactive compiled Lisp function in ‘goto-addr.el’.

It is bound to <mouse-2>, C-c RET.

(goto-address-at-point &optional EVENT)

Send to the e-mail address or load the URL at point.
Send mail to address at point.  See documentation for
‘goto-address-find-address-at-point’.  If no address is found
there, then load the URL at or before point.

Then I see:

;;;###autoload
(defun goto-address-at-point (&optional event)
  "Send to the e-mail address or load the URL at point.
Send mail to address at point.  See documentation for
`goto-address-find-address-at-point'.  If no address is found
there, then load the URL at or before point."
  (interactive (list last-input-event))
  (save-excursion
    (if event (posn-set-point (event-end event)))
    (let ((address (save-excursion (goto-address-find-address-at-point))))
      (if (and address
	       (save-excursion
		 (goto-char (previous-single-char-property-change
			     (point) 'goto-address nil
			     (line-beginning-position)))
		 (not (looking-at goto-address-url-regexp))))
	  (compose-mail address)
	(let ((url (browse-url-url-at-point)))
	  (if url
	      (browse-url url)
	    (error "No e-mail address or URL found")))))))

Do you think that this above need not be changed and that I can still
update to follow any type of hyperlink with the new change?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Tue, 24 Nov 2020 09:14:01 GMT) Full text and rfc822 format available.

Message #30 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Tue, 24 Nov 2020 10:13:09 +0100
Jean Louis <bugs <at> gnu.support> writes:

>> If goto-address-mode calls browse-url, yes.

[...]

> 	(let ((url (browse-url-url-at-point)))
> 	  (if url
> 	      (browse-url url)
> 	    (error "No e-mail address or URL found")))))))

So it does use browse-url

> Do you think that this above need not be changed and that I can still
> update to follow any type of hyperlink with the new change?

I'm not sure what you're asking -- I have made no change to
goto-address-mode or browse-url.

browse-url-handlers is the variable to customise to change how
browse-url works, now as before.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Sun, 29 Nov 2020 09:54:01 GMT) Full text and rfc822 format available.

Message #33 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Sun, 29 Nov 2020 10:53:44 +0100
Jean Louis <bugs <at> gnu.support> writes:

> The customization for `eww-use-browse-url' does not look best to
> me. Please clarify it, is it meant only for mailto: or user shall be
> able to add various other regular expressions for various URIs?

The doc string is:

---

eww will use ‘browse-url’ when following links that match this regexp.
The action to be taken can further be customized via
‘browse-url-handlers’.

---

(Oh, bad grammar; I'll fix.)

But I don't understand how this can be interpreted to be for mailto:
links in particular.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Mon, 30 Nov 2020 10:26:01 GMT) Full text and rfc822 format available.

Message #36 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Mon, 30 Nov 2020 11:25:12 +0100
Jean Louis <bugs <at> gnu.support> writes:

> Because it is by default for mailto: but maybe there shall be
> repeatable INS list that users can enter various URI prefixes. And one
> shall use URI rather than URL, as it is not same. While URL is URI,
> not all URIs are URL.

I don't understand what you mean here, but it's a regexep -- it can
match whatever you want it to match.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Mon, 30 Nov 2020 10:56:01 GMT) Full text and rfc822 format available.

Message #39 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Mon, 30 Nov 2020 13:54:07 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-11-30 13:25]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > Because it is by default for mailto: but maybe there shall be
> > repeatable INS list that users can enter various URI prefixes. And one
> > shall use URI rather than URL, as it is not same. While URL is URI,
> > not all URIs are URL.
> 
> I don't understand what you mean here, but it's a regexep -- it can
> match whatever you want it to match.

Thank you.

I was thinking it is not a list, not I see it is a list, that is good.

Close. 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Mon, 30 Nov 2020 11:14:02 GMT) Full text and rfc822 format available.

Message #42 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Mon, 30 Nov 2020 12:13:02 +0100
Jean Louis <bugs <at> gnu.support> writes:

> I was thinking it is not a list, not I see it is a list, that is good.

No, it's a regexp.  You can say mailto:\\|gopher:\\|gemini: or whatever
you want.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Mon, 30 Nov 2020 11:21:01 GMT) Full text and rfc822 format available.

Message #45 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Mon, 30 Nov 2020 14:17:30 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2020-11-30 14:13]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > I was thinking it is not a list, not I see it is a list, that is good.
> 
> No, it's a regexp.  You can say mailto:\\|gopher:\\|gemini: or whatever
> you want.

I just wonder why is regexp in one line. That makes it harder for
users. My expectation is to have it as a list

[INS] Regexp: mailto:
[INS] Regexp: gopher:

etc.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Mon, 30 Nov 2020 12:25:01 GMT) Full text and rfc822 format available.

Message #48 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Jean Louis <bugs <at> gnu.support>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Mon, 30 Nov 2020 12:24:45 +0000
Jean Louis <bugs <at> gnu.support> writes:

> * Lars Ingebrigtsen <larsi <at> gnus.org> [2020-11-30 14:13]:
>> Jean Louis <bugs <at> gnu.support> writes:
>> 
>> > I was thinking it is not a list, not I see it is a list, that is good.
>> 
>> No, it's a regexp.  You can say mailto:\\|gopher:\\|gemini: or whatever
>> you want.
>
> I just wonder why is regexp in one line. That makes it harder for
> users. My expectation is to have it as a list

I don't mind either way, but FWIW rx allows for some programmatic regexp
composition:

  (with-eval-after-load 'eww
    (setq eww-use-browse-url
          (rx (| (: bos (| "gopher:" "gemini:"))
                 (regexp eww-use-browse-url)))))

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44783; Package emacs. (Wed, 09 Dec 2020 14:04:01 GMT) Full text and rfc822 format available.

Message #51 received at 44783 <at> debbugs.gnu.org (full text, mbox):

From: Jean Louis <bugs <at> gnu.support>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 44783 <at> debbugs.gnu.org
Subject: Re: bug#44783: 28.0.50; wish for eww: include gopher and gemini links
Date: Wed, 9 Dec 2020 13:20:28 +0300
* Basil L. Contovounesios <contovob <at> tcd.ie> [2020-11-30 15:25]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > * Lars Ingebrigtsen <larsi <at> gnus.org> [2020-11-30 14:13]:
> >> Jean Louis <bugs <at> gnu.support> writes:
> >> 
> >> > I was thinking it is not a list, not I see it is a list, that is good.
> >> 
> >> No, it's a regexp.  You can say mailto:\\|gopher:\\|gemini: or whatever
> >> you want.
> >
> > I just wonder why is regexp in one line. That makes it harder for
> > users. My expectation is to have it as a list
> 
> I don't mind either way, but FWIW rx allows for some programmatic regexp
> composition:
> 
>   (with-eval-after-load 'eww
>     (setq eww-use-browse-url
>           (rx (| (: bos (| "gopher:" "gemini:"))
>                  (regexp eww-use-browse-url)))))

Thank you, there are various ways to customize stuff. 




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 07 Jan 2021 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.