From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Allow #+SETUPFILE to point to an URL for the org file
Date: Thu, 25 May 2017 12:18:28 +0200 [thread overview]
Message-ID: <87k255b5or.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87shjtb5wd.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 25 May 2017 12:13:54 +0200")
Correcting myself,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> (cond
> (cache)
> (is-url
> (with-current-buffer (url-retrieve-synchronously file)
> (goto-char (point-min))
> (if (re-search-forward "HTTP.*\\s-+200\\s-OK" nil t)
> ;; URL retrieved correctly. Move point to after the
> ;; url-retrieve header, update the cache `org--file-cache'
> ;; and return contents.
> (progn
> (search-forward "\n\n" nil 'move)
> (puthash file
> (buffer-substring-no-properties (point) (point-max))
> org--file-cache))
> (funcall (if noerror #'message #'user-error)
> (format "Unable to fetch file from %S" file)))))
Err.
(funcall (if noerror #'message #'user-error)
"Unable to fetch file from %S"
file)
Also, in your patch,
"Test whether FILE is a URL.
Return non-nil if it is."
->
"Non-nil if FILE is a URL."
next prev parent reply other threads:[~2017-05-25 10:18 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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k255b5or.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=kaushal.modi@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.