unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: 56514@debbugs.gnu.org
Cc: emacs-erc@gnu.org
Subject: bug#56514: 29.0.50; Improve ERC's URI scheme integration for irc:// links
Date: Wed, 16 Nov 2022 06:22:59 -0800	[thread overview]
Message-ID: <87fsejnflo.fsf__42890.3594541893$1668608658$gmane$org@neverwas.me> (raw)
In-Reply-To: <87iljl4meb.fsf@neverwas.me> (J. P.'s message of "Fri, 11 Nov 2022 06:05:16 -0800")

Quick note:

> diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
> index 03bd8f1352..340d90ba96 100644
> --- a/lisp/erc/erc-compat.el
> +++ b/lisp/erc/erc-compat.el
> @@ -32,6 +32,7 @@
>  ;;; Code:
> [...] 
> +
> +(when (< emacs-major-version 29)
> +  (unless (assoc "\\`irc6?s?://" browse-url-default-handlers)
> +    (push '("\\`irc6?s?://" . erc-compat--29-browse-url-irc)
> +          browse-url-default-handlers)))

This won't work on 27, so we'll probably have to do something like

  (cond ((fboundp 'browse-url-irc)) ; 29
        ((boundp 'browse-url-default-handlers) ; 28
         (cl-pushnew '("\\`irc6?s?://" . erc-compat--29-browse-url-irc)
                     browse-url-default-handlers))
        ((boundp 'browse-url-browser-function) ; 27
         (require 'browse-url)
         (let ((existing browse-url-browser-function))
           (setq browse-url-browser-function
                 (if (functionp existing)
                     (lambda (u &rest r)
                       (apply (if (string-match-p "\\`irc6?s?://" u)
                                  #'erc-compat--29-browse-url-irc
                                existing)
                              u r))
                   (cons '("\\`irc6?s?://" . erc-compat--29-browse-url-irc)
                         existing))))))

> +
>  (provide 'erc-compat)





  parent reply	other threads:[~2022-11-16 14:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87pmiabvd5.fsf@neverwas.me>
2022-07-12 12:49 ` bug#56514: 29.0.50; Improve ERC's URI scheme integration for irc:// links Lars Ingebrigtsen
     [not found] ` <87edyqzeag.fsf@gnus.org>
2022-07-13 14:44   ` J.P.
     [not found]   ` <874jzl2hsv.fsf@neverwas.me>
2022-07-13 15:55     ` Stefan Kangas
     [not found]     ` <CADwFkmkgXKH3y2i1si76V_NOuSyJENVrCLdEJ1AfDHEv9qh8jw@mail.gmail.com>
2022-07-14  7:00       ` J.P.
     [not found]       ` <874jzkuqk3.fsf@neverwas.me>
2022-11-08 14:09         ` J.P.
2022-11-08 15:16           ` Stefan Kangas
     [not found]           ` <CADwFkm=d+8wb6o_EwvKZWR7yc4tbwscgZ-YPzBnSqty42W+_Pg@mail.gmail.com>
2022-11-09 13:41             ` J.P.
2022-11-08 14:41 ` bug#56514: ircs:// integration for rcirc (bug#56514) J.P.
2022-11-11 14:05 ` bug#56514: 29.0.50; Improve ERC's URI scheme integration for irc:// links J.P.
     [not found] ` <87iljl4meb.fsf@neverwas.me>
2022-11-16 14:22   ` J.P. [this message]
2022-12-30 14:20 ` J.P.
2023-11-06  2:34 ` J.P.
     [not found] ` <875y2flics.fsf@neverwas.me>
2023-11-11 10:15   ` Eli Zaretskii
2022-07-12  8:14 J.P.

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='87fsejnflo.fsf__42890.3594541893$1668608658$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=56514@debbugs.gnu.org \
    --cc=emacs-erc@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).