emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Allow #+SETUPFILE to point to an URL for the org file
Date: Thu, 08 Dec 2016 14:44:25 +0000	[thread overview]
Message-ID: <CAFyQvY1DW3AXEh0D0s6AcVQs=18vT9_hqRCYERkinHEzSknY-g@mail.gmail.com> (raw)
In-Reply-To: <87h96eh4qb.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

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

> Hello,
>
> Kaushal Modi <kaushal.modi@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

[-- Attachment #2: Type: text/html, Size: 2187 bytes --]

  reply	other threads:[~2016-12-08 14:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03 17:23 Allow #+SETUPFILE to point to an URL for the org file Kaushal Modi
2016-12-08 11:51 ` Kaushal Modi
2016-12-08 14:22   ` John Kitchin
2016-12-08 14:31   ` Nicolas Goaziou
2016-12-08 14:44     ` Kaushal Modi [this message]
2016-12-08 21:48       ` Nicolas Goaziou
2016-12-08 22:07         ` Kaushal Modi
2016-12-08 22:40           ` Nicolas Goaziou
2017-03-13 17:37             ` Kaushal Modi
2017-03-30  7:43               ` Nicolas Goaziou
2017-05-23 19:07                 ` Kaushal Modi
2017-05-25 10:13                   ` Nicolas Goaziou
2017-05-25 10:18                     ` Nicolas Goaziou
2017-05-25 11:43                     ` Kaushal Modi
2017-05-25 15:15                       ` Kaushal Modi
2017-05-26  7:47                         ` Nicolas Goaziou
2017-05-26 20:24                           ` Kaushal Modi
2017-05-28  7:35                             ` Nicolas Goaziou
2017-05-28 10:04                               ` Kaushal Modi
2017-06-09 16:59                               ` Kaushal Modi
2017-06-12 19:32                                 ` Kaushal Modi
2017-06-13 12:43                                   ` Nicolas Goaziou
2017-06-13 15:45                                     ` Kaushal Modi
2017-06-13 21:32                                       ` Nicolas Goaziou
2017-06-13 21:42                                         ` Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY1DW3AXEh0D0s6AcVQs=18vT9_hqRCYERkinHEzSknY-g@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).