[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals-release/org 88329143c8 2/6: org: Use buffer-base-buffer
From: |
ELPA Syncer |
Subject: |
[elpa] externals-release/org 88329143c8 2/6: org: Use buffer-base-buffer in safe resource fns |
Date: |
Wed, 14 Dec 2022 04:57:56 -0500 (EST) |
branch: externals-release/org
commit 88329143c86b34195af68a8e5d5fd3d00a5dcae6
Author: TEC <git@tecosaur.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org: Use buffer-base-buffer in safe resource fns
* lisp/org.el (org--confirm-resource-safe, org--safe-remote-resource-p):
Replace instances of buffer-file-name
with (buffer-file-name (buffer-base-buffer)) so these functions work in
indirect buffers.
---
lisp/org.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 641720001e..6aa2a16219 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4597,8 +4597,8 @@ is available. This option applies only if FILE is a URL."
This checks every pattern in `org-safe-remote-resources', and
returns non-nil if any of them match."
(let ((uri-patterns org-safe-remote-resources)
- (file-uri (and buffer-file-name
- (concat "file://" (file-truename buffer-file-name))))
+ (file-uri (and (buffer-file-name (buffer-base-buffer))
+ (concat "file://" (file-truename (buffer-file-name
(buffer-base-buffer))))))
match-p)
(while (and (not match-p) uri-patterns)
(setq match-p (or (string-match-p (car uri-patterns) uri)
@@ -4609,7 +4609,8 @@ returns non-nil if any of them match."
(defun org--confirm-resource-safe (uri)
"Ask the user if URI should be considered safe, returning non-nil if so."
(unless noninteractive
- (let ((current-file (and buffer-file-name (file-truename
buffer-file-name)))
+ (let ((current-file (and (buffer-file-name (buffer-base-buffer))
+ (file-truename (buffer-file-name
(buffer-base-buffer)))))
(domain (and (string-match
(rx (seq "http" (? "s") "://")
(optional (+ (not (any "@/\n"))) "@")
- [elpa] externals-release/org updated (47bcdce19b -> 662e814bc0), ELPA Syncer, 2022/12/14
- [elpa] externals-release/org 88329143c8 2/6: org: Use buffer-base-buffer in safe resource fns,
ELPA Syncer <=
- [elpa] externals-release/org 0db972ad63 1/6: ox: Handle failure to localize link, ELPA Syncer, 2022/12/14
- [elpa] externals-release/org fec15dedb9 5/6: test-ob-R.el: New function to test for :result output, ELPA Syncer, 2022/12/14
- [elpa] externals-release/org 662e814bc0 6/6: ob-R.el: Restore the handling of org-list in as var, ELPA Syncer, 2022/12/14
- [elpa] externals-release/org 6a126e40a7 3/6: org-persist: Ensure index instantiated before read, ELPA Syncer, 2022/12/14
- [elpa] externals-release/org 402d2421d9 4/6: org-persist: Do not re-download url files on write, ELPA Syncer, 2022/12/14