help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remote files via http


From: Eduardo Cavazos
Subject: Re: Remote files via http
Date: Sat, 11 Apr 2009 03:17:11 -0700 (PDT)
User-agent: G2/1.0

On Apr 11, 4:40 am, Eduardo  Cavazos <wayo.cava...@gmail.com> wrote:

> Yet another approach would be a special link type in org-mode.

Here we go...

(require 'org)

(defun org-netorg-open (path)
  (shell-command
   (format "wget %s %s http://%s";
           "--directory-prefix=/tmp/netorg"
           "--force-directories"
           path))
  (find-file (format "/tmp/netorg/%s" path)))

(org-add-link-type "netorg" 'org-netorg-open)

Bam! :-)

With that, a link such as:

    [[netorg:www.xyz.com/abc.org][The ABCs]]

if followed will "do the right thing". I.e. the remote document will
be retrieved and displayed. The document is stored locally in a
"cache" at:

    "/tmp/netorg/www.xyz.com/abc.org"

Ed


reply via email to

[Prev in Thread] Current Thread [Next in Thread]