* rfc: link type "html"
@ 2012-01-19 9:27 Thien-Thi Nguyen
0 siblings, 0 replies; only message in thread
From: Thien-Thi Nguyen @ 2012-01-19 9:27 UTC (permalink / raw)
To: emacs-orgmode
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?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-19 9:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-19 9:27 rfc: link type "html" Thien-Thi Nguyen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.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).