[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Any way to tell Emacs how to open specific URIs?
From: |
Tassilo Horn |
Subject: |
Re: Any way to tell Emacs how to open specific URIs? |
Date: |
Tue, 01 Dec 2020 21:13:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Jean Louis <bugs@gnu.support> writes:
Hi Jean,
> browse-url-handler is called URLl handler but in reality it then
> handles rather URIs, not only URLs and if feature is new and still in
> development, maybe you should reconsider the naming of the variable.
Well, in reality it not only handles URIs but any string passed to
`browse-url'.
--8<---------------cut here---------------start------------->8---
(setq browse-url-handlers
;; I wanna read my lorem ipsums in text-mode.
'(("lorem ipsum" .
(lambda (text &rest _ignored)
(let ((buf (get-buffer-create "Lorem Ipsum")))
(set-buffer buf)
(erase-buffer)
(insert text)
(text-mode)
(pop-to-buffer buf))))))
--8<---------------cut here---------------end--------------->8---
Fun aside, I think the name is appropriate because
a) it is part of browse-url.el and as such must have the browse-url
prefix anyway,
b) its main use are URLs because what else would you pass to
`browse-url'?
Bye,
Tassilo
- Re: Any way to tell Emacs how to open specific URIs?,
Tassilo Horn <=