[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals-release/org 0db972ad63 1/6: ox: Handle failure to local
From: |
ELPA Syncer |
Subject: |
[elpa] externals-release/org 0db972ad63 1/6: ox: Handle failure to localize link |
Date: |
Wed, 14 Dec 2022 04:57:56 -0500 (EST) |
branch: externals-release/org
commit 0db972ad63859c3220ecc9d236003071bc474d6f
Author: TEC <git@tecosaur.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
ox: Handle failure to localize link
* lisp/ox.el (org-export-link-localise): When no local copy of the link
resource could be fetched, produce a warning message and do nothing
instead of setting the link :path to nil.
---
lisp/ox.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/lisp/ox.el b/lisp/ox.el
index c14eafe44d..737703f11d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -4612,12 +4612,17 @@ If LINK refers to a remote resource, modify it to point
to a local
downloaded copy. Otherwise, return unchanged LINK."
(when (org-export-link-remote-p link)
(let* ((local-path (org-export-link--remote-local-copy link)))
- (setcdr link
- (thread-first (cadr link)
- (plist-put :type "file")
- (plist-put :path local-path)
- (plist-put :raw-link (concat "file:" local-path))
- list))))
+ (if local-path
+ (setcdr link
+ (thread-first (cadr link)
+ (plist-put :type "file")
+ (plist-put :path local-path)
+ (plist-put :raw-link (concat "file:"
local-path))
+ list))
+ (display-warning
+ '(org export)
+ (format "unable to obtain local copy of %s"
+ (org-element-property :raw-link link))))))
link)
;;;; For References
- [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, 2022/12/14
- [elpa] externals-release/org 0db972ad63 1/6: ox: Handle failure to localize link,
ELPA Syncer <=
- [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