unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
@ 2020-11-21 19:41 Jean Louis
  2020-11-21 19:52 ` Eli Zaretskii
  2020-11-24  7:23 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 15+ messages in thread
From: Jean Louis @ 2020-11-21 19:41 UTC (permalink / raw)
  To: 44783


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
⎔ λ 🄯 𝍄 𝌡 𝌚





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-21 19:41 bug#44783: 28.0.50; wish for eww: include gopher and gemini links Jean Louis
@ 2020-11-21 19:52 ` Eli Zaretskii
  2020-11-21 19:59   ` Jean Louis
  2020-11-24  7:23 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2020-11-21 19:52 UTC (permalink / raw)
  To: Jean Louis; +Cc: 44783

> Date: Sat, 21 Nov 2020 22:41:29 +0300
> From: Jean Louis <bugs@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?





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-21 19:52 ` Eli Zaretskii
@ 2020-11-21 19:59   ` Jean Louis
  0 siblings, 0 replies; 15+ messages in thread
From: Jean Louis @ 2020-11-21 19:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 44783

* Eli Zaretskii <eliz@gnu.org> [2020-11-21 22:53]:
> > Date: Sat, 21 Nov 2020 22:41:29 +0300
> > From: Jean Louis <bugs@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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-21 19:41 bug#44783: 28.0.50; wish for eww: include gopher and gemini links Jean Louis
  2020-11-21 19:52 ` Eli Zaretskii
@ 2020-11-24  7:23 ` Lars Ingebrigtsen
  2020-11-24  9:03   ` Jean Louis
       [not found]   ` <X8LLGThoBscm0dd3@protected.rcdrun.com>
  1 sibling, 2 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-24  7:23 UTC (permalink / raw)
  To: Jean Louis; +Cc: 44783

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-24  7:23 ` Lars Ingebrigtsen
@ 2020-11-24  9:03   ` Jean Louis
  2020-11-24  9:04     ` Lars Ingebrigtsen
       [not found]   ` <X8LLGThoBscm0dd3@protected.rcdrun.com>
  1 sibling, 1 reply; 15+ messages in thread
From: Jean Louis @ 2020-11-24  9:03 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44783

* Lars Ingebrigtsen <larsi@gnus.org> [2020-11-24 10:24]:
> Jean Louis <bugs@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?








^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-24  9:03   ` Jean Louis
@ 2020-11-24  9:04     ` Lars Ingebrigtsen
  2020-11-24  9:10       ` Jean Louis
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-24  9:04 UTC (permalink / raw)
  To: Jean Louis; +Cc: 44783

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-24  9:04     ` Lars Ingebrigtsen
@ 2020-11-24  9:10       ` Jean Louis
  2020-11-24  9:13         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Jean Louis @ 2020-11-24  9:10 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44783

* Lars Ingebrigtsen <larsi@gnus.org> [2020-11-24 12:05]:
> Jean Louis <bugs@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?






^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-24  9:10       ` Jean Louis
@ 2020-11-24  9:13         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-24  9:13 UTC (permalink / raw)
  To: Jean Louis; +Cc: 44783

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
       [not found]   ` <X8LLGThoBscm0dd3@protected.rcdrun.com>
@ 2020-11-29  9:53     ` Lars Ingebrigtsen
       [not found]       ` <X8PbQsqsgKm/pe/M@protected.rcdrun.com>
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-29  9:53 UTC (permalink / raw)
  To: Jean Louis; +Cc: 44783

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
       [not found]       ` <X8PbQsqsgKm/pe/M@protected.rcdrun.com>
@ 2020-11-30 10:25         ` Lars Ingebrigtsen
  2020-11-30 10:54           ` Jean Louis
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-30 10:25 UTC (permalink / raw)
  To: Jean Louis; +Cc: 44783

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-30 10:25         ` Lars Ingebrigtsen
@ 2020-11-30 10:54           ` Jean Louis
  2020-11-30 11:13             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Jean Louis @ 2020-11-30 10:54 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44783

* Lars Ingebrigtsen <larsi@gnus.org> [2020-11-30 13:25]:
> Jean Louis <bugs@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. 





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-30 10:54           ` Jean Louis
@ 2020-11-30 11:13             ` Lars Ingebrigtsen
  2020-11-30 11:17               ` Jean Louis
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-30 11:13 UTC (permalink / raw)
  To: Jean Louis; +Cc: 44783

Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-30 11:13             ` Lars Ingebrigtsen
@ 2020-11-30 11:17               ` Jean Louis
  2020-11-30 12:24                 ` Basil L. Contovounesios
  0 siblings, 1 reply; 15+ messages in thread
From: Jean Louis @ 2020-11-30 11:17 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44783

* Lars Ingebrigtsen <larsi@gnus.org> [2020-11-30 14:13]:
> Jean Louis <bugs@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.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-30 11:17               ` Jean Louis
@ 2020-11-30 12:24                 ` Basil L. Contovounesios
  2020-12-09 10:20                   ` Jean Louis
  0 siblings, 1 reply; 15+ messages in thread
From: Basil L. Contovounesios @ 2020-11-30 12:24 UTC (permalink / raw)
  To: Jean Louis; +Cc: Lars Ingebrigtsen, 44783

Jean Louis <bugs@gnu.support> writes:

> * Lars Ingebrigtsen <larsi@gnus.org> [2020-11-30 14:13]:
>> Jean Louis <bugs@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





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#44783: 28.0.50; wish for eww: include gopher and gemini links
  2020-11-30 12:24                 ` Basil L. Contovounesios
@ 2020-12-09 10:20                   ` Jean Louis
  0 siblings, 0 replies; 15+ messages in thread
From: Jean Louis @ 2020-12-09 10:20 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Lars Ingebrigtsen, 44783

* Basil L. Contovounesios <contovob@tcd.ie> [2020-11-30 15:25]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > * Lars Ingebrigtsen <larsi@gnus.org> [2020-11-30 14:13]:
> >> Jean Louis <bugs@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. 





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-12-09 10:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-21 19:41 bug#44783: 28.0.50; wish for eww: include gopher and gemini links Jean Louis
2020-11-21 19:52 ` Eli Zaretskii
2020-11-21 19:59   ` Jean Louis
2020-11-24  7:23 ` Lars Ingebrigtsen
2020-11-24  9:03   ` Jean Louis
2020-11-24  9:04     ` Lars Ingebrigtsen
2020-11-24  9:10       ` Jean Louis
2020-11-24  9:13         ` Lars Ingebrigtsen
     [not found]   ` <X8LLGThoBscm0dd3@protected.rcdrun.com>
2020-11-29  9:53     ` Lars Ingebrigtsen
     [not found]       ` <X8PbQsqsgKm/pe/M@protected.rcdrun.com>
2020-11-30 10:25         ` Lars Ingebrigtsen
2020-11-30 10:54           ` Jean Louis
2020-11-30 11:13             ` Lars Ingebrigtsen
2020-11-30 11:17               ` Jean Louis
2020-11-30 12:24                 ` Basil L. Contovounesios
2020-12-09 10:20                   ` Jean Louis

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).