From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thien-Thi Nguyen Subject: rfc: link type "html" Date: Thu, 19 Jan 2012 10:27:47 +0100 Message-ID: <87aa5kyrcc.fsf@gnuvola.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnoHq-000481-Ro for emacs-orgmode@gnu.org; Thu, 19 Jan 2012 04:28:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnoHp-0005Bj-Rj for emacs-orgmode@gnu.org; Thu, 19 Jan 2012 04:28:02 -0500 Received: from smtp205.alice.it ([82.57.200.101]:43533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnoHp-0005BN-1q for emacs-orgmode@gnu.org; Thu, 19 Jan 2012 04:28:01 -0500 Received: from ambire (79.41.65.25) by smtp205.alice.it (8.6.023.02) id 4EECA2D80494F42C for emacs-orgmode@gnu.org; Thu, 19 Jan 2012 10:27:58 +0100 Received: from ttn by ambire with local (Exim 4.72) (envelope-from ) id 1RnoHc-0001ZF-4v for emacs-orgmode@gnu.org; Thu, 19 Jan 2012 10:27:48 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org IIUC, "opening" the link type "http" triggers =E2=80=98browse-url=E2=80=99 which eventually wants to talk to a server using URL that begins with "http://", and opening the link type "file" basically triggers =E2=80=98find-file=E2=80=99. What if i want to =E2=80=98browse-url=E2=80=99 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))) =20=20 (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?