On Sun, May 28, 2017, 3:36 AM Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

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

Reply via email to