From: Kaushal Modi <kaushal.modi@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Allow #+SETUPFILE to point to an URL for the org file
Date: Sun, 28 May 2017 10:04:37 +0000 [thread overview]
Message-ID: <CAFyQvY1YRrZaUWLvemMmdNJV7VUaZUY3ZiWCJOM1qp=jrPUPig@mail.gmail.com> (raw)
In-Reply-To: <87o9ud77s2.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 2804 bytes --]
On Sun, May 28, 2017, 3:36 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:
> Hello,
>
> Kaushal Modi <kaushal.modi@gmail.com> writes:
>
> > I have attached a patch, rebased to master and with all suggestions
> > implemented.
>
> Thank you.
>
> > There are some additional changes in the patch this time:
> > - Prevent org-edit-special from attempting to open the "file" for editing
> > if the value is a URL.
>
> 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.
>
> > I liked your C-c C-c idea below! :)
>
> Great!
>
> > +indirectly through a file included using @samp{#+SETUPFILE:
> filename/URL}
>
> filename/URL > file name or URL
>
> > +@item #+SETUPFILE: file/URL
>
> file/URL > file name or URL
>
> > +The setup file or a URL pointing to such file is for additional
> in-buffer
> > +settings. Org loads this file and parses it for any settings in it
> only when
> > +Org opens the main file. If URL is specified, the contents are
> downloaded
> > +and stored in a temporary cache. @kbd{C-c C-c} on the settings line
> will
> > +also parse and load. @kbd{C-c C-c} on the @code{#+SETUPFILE:} line
> will also
> > +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
>
> > +if it was included in the buffer. It can be another Org file. To
> visit the
> > +file (not a URL), @kbd{C-c '} while the cursor is on the line with the
> file
> > name.
> > @item #+STARTUP:
> > @cindex #+STARTUP
> > @@ -17395,7 +17398,9 @@ If any highlights shown in the buffer from the
> creation of a sparse tree, or
> > from clock display, remove such highlights.
> > @item
> > If the cursor is in one of the special @code{#+KEYWORD} lines, scan the
> > -buffer for these lines and update the information.
> > +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.
>
Thanks. I'll get back to this in 8 days; I'm going offline (vacation).
> --
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 3737 bytes --]
next prev parent reply other threads:[~2017-05-28 10:04 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
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 [this message]
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='CAFyQvY1YRrZaUWLvemMmdNJV7VUaZUY3ZiWCJOM1qp=jrPUPig@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/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).