unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Fleischer <danflscr@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] Gemini in browse-url-button-regexp
Date: Wed, 01 Dec 2021 23:13:28 +0200	[thread overview]
Message-ID: <m2k0goxc3r.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

Hi all,

I'm suggesting adding the Gemini protocol to the regexp for
"buttonizing" URLs. Gemini is a new text-based web protocol (like
gopher) with rising popularity and at least one Emacs package for
browsing (Elpher). URLs are of the form gemini://my.home.page/. Having
Emacs identify these links is useful and all determined by a single
variable. Attached is the patch. For more information about Gemini, here
is a quick introduction:

https://geminiquickst.art/

Best,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch --]
[-- Type: text/x-patch, Size: 1053 bytes --]

From 3e7545edaaea514e62b606a703efd77b3493491e Mon Sep 17 00:00:00 2001
From: Daniel Fleischer <danflscr@gmail.com>
Date: Wed, 1 Dec 2021 22:52:33 +0200
Subject: [PATCH] * lisp/net/browse-url.el: added gemini to url-regexp

Gemini is a relatively new text-based web protocol, similar to
gopher. There's the "elpher" package to browse gopher and gemini
pages. Adding it to the regexp will make Emacs be aware of gemini links,
e.g. in ERC.
---
 lisp/net/browse-url.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 011e43c447..d39cc361e5 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -221,7 +221,7 @@ browse-url-man-function
 
 (defcustom browse-url-button-regexp
   (concat
-   "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
+   "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|gemini\\|"
    "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
    "\\(//[-a-z0-9_.]+:[0-9]*\\)?"
    (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
-- 
2.33.1


[-- Attachment #3: Type: text/plain, Size: 23 bytes --]


-- 

Daniel Fleischer

             reply	other threads:[~2021-12-01 21:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 21:13 Daniel Fleischer [this message]
2021-12-02  8:11 ` [PATCH] Gemini in browse-url-button-regexp Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k0goxc3r.fsf@gmail.com \
    --to=danflscr@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).