[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] rfc: link type "html"
From: |
Thien-Thi Nguyen |
Subject: |
[O] rfc: link type "html" |
Date: |
Thu, 19 Jan 2012 10:27:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
IIUC, "opening" the link type "http" triggers ‘browse-url’
which eventually wants to talk to a server using URL that
begins with "http://", and opening the link type "file"
basically triggers ‘find-file’.
What if i want to ‘browse-url’ with scheme "file://"?
That is, i don't want to bother going through a server.
This is what i was able to cook up:
(defun ttn-view-html-file-in-browser (path)
(browse-url (browse-url-file-url path)))
(org-add-link-type "html" 'ttn-view-html-file-in-browser)
This allows me to write in ~/build/GNU/rcs/.ttn.org, e.g.:
[[html:.,lcov/rcs/src/index.html][lcov output]]
and see in the browser's location box:
file:///home/ttn/build/GNU/rcs/.%2clcov/rcs/src/index.html
My questions:
- Is this already builtin somewhere?
- If so, where?
- If not, is the above code the recommended way?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] rfc: link type "html",
Thien-Thi Nguyen <=