From f874abb5683a6208f40c624fdf704a6b13dd86d7 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 2 Nov 2020 21:41:06 -0600 Subject: Add advice for elpher:eww-browse-url --- config.org | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config.org b/config.org index 7982092..8d0b7b3 100644 --- a/config.org +++ b/config.org @@ -678,6 +678,14 @@ I was using company, but I think it might've been causing issues with ~awk-mode~ (use-package elpher :straight (elpher :repo "git://thelambdalab.xyz/elpher.git") + :config + (defun elpher:eww-browse-url (original url &optional new-window) + "Handle gemini/gopher links with eww." + (cond ((string-match-p "\\`\\(gemini\\|gopher\\)://" url) + (require 'elpher) + (elpher-go url)) + (t (funcall original url new-window)))) + (advice-add 'eww-browse-url :around 'elpher:eww-browse-url) :bind (:map elpher-mode-map ("n" . elpher-next-link) ("p" . elpher-prev-link) -- cgit 1.4.1-21-gabe81