|
@@ -191,7 +191,6 @@ Stars are put in group 1 and the trimmed body in group 2.")
|
|
(declare-function org-toggle-archive-tag "org-archive" (&optional find-done))
|
|
(declare-function org-toggle-archive-tag "org-archive" (&optional find-done))
|
|
(declare-function org-update-radio-target-regexp "ol" ())
|
|
(declare-function org-update-radio-target-regexp "ol" ())
|
|
|
|
|
|
-(defvar ffap-url-regexp)
|
|
|
|
(defvar org-element-paragraph-separate)
|
|
(defvar org-element-paragraph-separate)
|
|
(defvar org-indent-indentation-per-level)
|
|
(defvar org-indent-indentation-per-level)
|
|
(defvar org-radio-target-regexp)
|
|
(defvar org-radio-target-regexp)
|
|
@@ -4539,7 +4538,7 @@ directory."
|
|
(when (and (org-string-nw-p value)
|
|
(when (and (org-string-nw-p value)
|
|
(not buffer-read-only)) ;FIXME: bug in Gnus?
|
|
(not buffer-read-only)) ;FIXME: bug in Gnus?
|
|
(let* ((uri (org-strip-quotes value))
|
|
(let* ((uri (org-strip-quotes value))
|
|
- (uri-is-url (org-file-url-p uri))
|
|
|
|
|
|
+ (uri-is-url (org-url-p uri))
|
|
(uri (if uri-is-url
|
|
(uri (if uri-is-url
|
|
uri
|
|
uri
|
|
(expand-file-name uri))))
|
|
(expand-file-name uri))))
|
|
@@ -4669,11 +4668,6 @@ This is the cache of file URLs read using `org-file-contents'.")
|
|
"Reset the cache of files downloaded by `org-file-contents'."
|
|
"Reset the cache of files downloaded by `org-file-contents'."
|
|
(clrhash org--file-cache))
|
|
(clrhash org--file-cache))
|
|
|
|
|
|
-(defun org-file-url-p (file)
|
|
|
|
- "Non-nil if FILE is a URL."
|
|
|
|
- (require 'ffap)
|
|
|
|
- (string-match-p ffap-url-regexp file))
|
|
|
|
-
|
|
|
|
(defun org-file-contents (file &optional noerror nocache)
|
|
(defun org-file-contents (file &optional noerror nocache)
|
|
"Return the contents of FILE, as a string.
|
|
"Return the contents of FILE, as a string.
|
|
|
|
|
|
@@ -4688,7 +4682,7 @@ from file or URL, and return nil.
|
|
|
|
|
|
If NOCACHE is non-nil, do a fresh fetch of FILE even if cached version
|
|
If NOCACHE is non-nil, do a fresh fetch of FILE even if cached version
|
|
is available. This option applies only if FILE is a URL."
|
|
is available. This option applies only if FILE is a URL."
|
|
- (let* ((is-url (org-file-url-p file))
|
|
|
|
|
|
+ (let* ((is-url (org-url-p file))
|
|
(cache (and is-url
|
|
(cache (and is-url
|
|
(not nocache)
|
|
(not nocache)
|
|
(gethash file org--file-cache))))
|
|
(gethash file org--file-cache))))
|
|
@@ -17555,7 +17549,7 @@ Otherwise, return a user error."
|
|
(let ((file (and (string-match "\\`\"\\(.*?\\)\"\\|\\S-+" value)
|
|
(let ((file (and (string-match "\\`\"\\(.*?\\)\"\\|\\S-+" value)
|
|
(or (match-string 1 value)
|
|
(or (match-string 1 value)
|
|
(match-string 0 value)))))
|
|
(match-string 0 value)))))
|
|
- (when (org-file-url-p file)
|
|
|
|
|
|
+ (when (org-url-p file)
|
|
(user-error "Files located with a URL cannot be edited"))
|
|
(user-error "Files located with a URL cannot be edited"))
|
|
(org-link-open-from-string
|
|
(org-link-open-from-string
|
|
(format "[[%s]]" (expand-file-name file))))))
|
|
(format "[[%s]]" (expand-file-name file))))))
|