|
From: | Kaushal Modi |
Subject: | Re: [O] Allow #+SETUPFILE to point to an URL for the org file |
Date: | Fri, 09 Jun 2017 16:59:43 +0000 |
This is a good idea. We could even display a read-only buffer with the
contents of the document, using new `org-file-contents'.
Anyway, this can be done in a different patch.
> +indirectly through a file included using @samp{#+SETUPFILE: filename/URL}
filename/URL > file name or URL
> address@hidden #+SETUPFILE: file/URL
file/URL > file name or URL
> +reset the temporary file cache. Org also parses and loads the file/URL
file/URL > document
> +during normal exporting process. Org parses the contents of this
> file/URL as
file/URL document
> +buffer for these lines and update the information. Also reset the org file
org > Org
> +(defvar ffap-url-regexp) ;Silence byte-compiler
I think this can go at the beginning of the "org.el".
> + ;; Reset the cache of files downloaded by `org-file-contents'.
> + (clrhash org--file-cache))
Note that we can still implement a non-interactive
`org-reset-setupfile-cache' function and call it here instead. (clrhash
org--file-cache) may be a bit low level at this point.
Otherwise, LGTM. Would you want to throw in some tests? You can use
cl-letf to bind `url-retrieve-synchronously' to a function returning
a buffer containing some dumb (valid or invalid) output.
Kaushal Modi
0001-Allow-org-file-contents-to-fetch-file-contents-from-.patch
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |