all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Remote files via http
@ 2009-04-11  9:40 Eduardo Cavazos
  2009-04-11 10:17 ` Eduardo Cavazos
  0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Cavazos @ 2009-04-11  9:40 UTC (permalink / raw)
  To: help-gnu-emacs

Hello!

What I'd *really* like to do is have links in an org-mode document
like:

    [[http://www.xyz.com/test.org][Test]]

I.e. refer to a file which is also an org-mode file over http. If the
link is followed, the file is retrieved and displayed as a proper org-
mode document.

Has anyone worked on anything like this?

A more general approach is to have Emacs open remote files over http.
This way, relative links in a remote org-mode document will also refer
to documents on the remote site. Is there a way to do this? I wonder
if extending Tramp would be the way to go for that...

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

Thanks for any suggestions!

Ed


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Remote files via http
  2009-04-11  9:40 Remote files via http Eduardo Cavazos
@ 2009-04-11 10:17 ` Eduardo Cavazos
  2009-04-12 11:54   ` Nikos Apostolakis
  0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Cavazos @ 2009-04-11 10:17 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Remote files via http
  2009-04-11 10:17 ` Eduardo Cavazos
@ 2009-04-12 11:54   ` Nikos Apostolakis
  0 siblings, 0 replies; 3+ messages in thread
From: Nikos Apostolakis @ 2009-04-12 11:54 UTC (permalink / raw)
  To: help-gnu-emacs

Eduardo  Cavazos <wayo.cavazos@gmail.com> writes:

> 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...
>

[...]

Do you know about "browse-url-emacs"?

,----[ C-h f browse-url-emacs RET ]
| browse-url-emacs is an interactive compiled Lisp function in
| `browse-url.el'.
| 
| (browse-url-emacs URL &optional NEW-WINDOW)
| 
| Ask Emacs to load URL into a buffer and show it in another window.
| 
| [back]
`----

HTH,
Nikos





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-12 11:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-11  9:40 Remote files via http Eduardo Cavazos
2009-04-11 10:17 ` Eduardo Cavazos
2009-04-12 11:54   ` Nikos Apostolakis

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.