summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/27.2/10_all_org-remote-unsafe.patch')
-rw-r--r--emacs/27.2/10_all_org-remote-unsafe.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/emacs/27.2/10_all_org-remote-unsafe.patch b/emacs/27.2/10_all_org-remote-unsafe.patch
new file mode 100644
index 0000000..65f6a34
--- /dev/null
+++ b/emacs/27.2/10_all_org-remote-unsafe.patch
@@ -0,0 +1,30 @@
+org-mode should consider remote files unsafe
+Backported from emacs-29 branch
+https://bugs.gentoo.org/927727
+
+commit 2bc865ace050ff118db43f01457f95f95112b877
+Author: Ihor Radchenko <yantar92@posteo.net>
+Date: Tue Feb 20 14:59:20 2024 +0300
+
+ org-file-contents: Consider all remote files unsafe
+
+--- emacs-27.2/lisp/org/org.el
++++ emacs-27.2/lisp/org/org.el
+@@ -4665,12 +4665,16 @@ org-file-contents
+ 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."
+ (let* ((is-url (org-file-url-p file))
++ (is-remote (condition-case nil
++ (file-remote-p file)
++ ;; In case of error, be safe.
++ (t t)))
+ (cache (and is-url
+ (not nocache)
+ (gethash file org--file-cache))))
+ (cond
+ (cache)
+- (is-url
++ ((or is-url is-remote)
+ (with-current-buffer (url-retrieve-synchronously file)
+ (goto-char (point-min))
+ ;; Move point to after the url-retrieve header.