[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Allow #+SETUPFILE to point to an URL for the org file
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Allow #+SETUPFILE to point to an URL for the org file |
Date: |
Thu, 25 May 2017 12:18:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Correcting myself,
Nicolas Goaziou <address@hidden> 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."
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file, Kaushal Modi, 2017/05/23
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file, Nicolas Goaziou, 2017/05/25
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file,
Nicolas Goaziou <=
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file, Kaushal Modi, 2017/05/25
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file, Kaushal Modi, 2017/05/25
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file, Nicolas Goaziou, 2017/05/26
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file, Kaushal Modi, 2017/05/26
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file, Nicolas Goaziou, 2017/05/28
- Re: [O] Allow #+SETUPFILE to point to an URL for the org file, Kaushal Modi, 2017/05/28