From: Tassilo Horn <tsdh@gnu.org>
To: Jean Louis <bugs@gnu.support>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Any way to tell Emacs how to open specific URIs?
Date: Tue, 01 Dec 2020 21:13:38 +0100 [thread overview]
Message-ID: <878sah8etp.fsf@gnu.org> (raw)
In-Reply-To: <X8LAFxbGBo2WsjGu@protected.rcdrun.com> (Jean Louis's message of "Sun, 29 Nov 2020 00:24:39 +0300")
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
next prev parent reply other threads:[~2020-12-01 20:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-22 17:02 Any way to tell Emacs how to open specific URIs? Jean Louis
2020-11-23 2:41 ` 陈志伟
2020-11-23 3:23 ` T.V Raman
2020-11-23 3:57 ` Akira Kyle
2020-11-23 15:46 ` T.V Raman
2020-11-23 8:18 ` Jean Louis
2020-11-27 15:41 ` [solved] - " Jean Louis
2020-11-27 20:56 ` Tassilo Horn
2020-11-28 0:44 ` Jean Louis
2020-11-28 20:03 ` Tassilo Horn
2020-11-28 21:24 ` Jean Louis
2020-12-01 20:13 ` Tassilo Horn [this message]
2020-12-02 17:03 ` Jean Louis
2020-12-02 23:49 ` Akira Kyle
2020-12-03 6:49 ` Jean Louis
2020-12-02 17:40 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878sah8etp.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=bugs@gnu.support \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.