From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Allow #+SETUPFILE to point to an URL for the org file Date: Thu, 08 Dec 2016 22:48:55 +0100 Message-ID: <871sxigkhk.fsf@nicolasgoaziou.fr> References: <87h96eh4qb.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cF6Yi-0005JX-4Y for emacs-orgmode@gnu.org; Thu, 08 Dec 2016 16:48:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cF6Yf-0006v4-2K for emacs-orgmode@gnu.org; Thu, 08 Dec 2016 16:48:56 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:46341) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cF6Ye-0006ub-Rv for emacs-orgmode@gnu.org; Thu, 08 Dec 2016 16:48:52 -0500 In-Reply-To: (Kaushal Modi's message of "Thu, 08 Dec 2016 14:44:25 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: emacs-org list Kaushal Modi writes: > 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. What about storing the contents of the file in a variable instead of cluttering the temp directory? > - 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. And (3) it isn't local? > - 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? It could work. Do you want to provide an implementation? Regards,