On Thu, Dec 8, 2016 at 9:31 AM Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Kaushal Modi <kaushal.m...@gmail.com> writes:
>
> > Anyone?
>
> Apparently not.
>
> Note that it could drastically slow down opening buffers with a mediocre
> connection since SETUPFILE is read every time buffer set-up is
> refreshed, e.g., when the buffer is opened.
>
>
Here are a couple of ideas:

- Let's assume that if the current file name is /path/to/foo.org, the
SETUPFILE is always downloaded to /tmp/path_to_foo_config.org for brevity.
The function that sets that temp file should be a defcustom.
- Now, the referenced SETUPFILE should be downloaded only if that (1) That
file is being fetched for the first time in that emacs session, or (2) that
temp file does not exist.
- Add a defun to force reload the SETUPFILE from the referenced URL, in
which case the temp file will be deleted and re-downloaded (as the above
condition satisfied).

So under the normal circumstance where that foo.org file buffer is reverted
multiple times in an emacs session, the same SETUPFILE downloaded to /tmp
will be used. If the user updated the file at the referenced URL, they can
do the above mentioned forced reload of SETUPFILE and download the latest
version of SETUPFILE.

Thoughts?
-- 

Kaushal Modi

Reply via email to