[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org a6fc8d3f1f 01/10: ox: Handle failure to localize li
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org a6fc8d3f1f 01/10: ox: Handle failure to localize link |
Date: |
Sun, 11 Dec 2022 02:57:57 -0500 (EST) |
branch: externals/org
commit a6fc8d3f1f69c1893d5410848c57c88782d70aa6
Author: TEC <git@tecosaur.net>
Commit: TEC <git@tecosaur.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 3e1170dd01..0a5ff67983 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/org updated (42153ea2fe -> 1a9d0850b6), ELPA Syncer, 2022/12/11
- [elpa] externals/org e663b90fe5 05/10: org-persist: Fix unconditional gc of urls, ELPA Syncer, 2022/12/11
- [elpa] externals/org 47654f844d 06/10: org-persist: Fix number of remote files kept, ELPA Syncer, 2022/12/11
- [elpa] externals/org 8b8a65ed02 08/10: org-persist: Introduce "associated files" for GC, ELPA Syncer, 2022/12/11
- [elpa] externals/org 5b076f5057 03/10: org-persist: Add missing end quote to docstrings, ELPA Syncer, 2022/12/11
- [elpa] externals/org 534633d508 09/10: org-persist: Use associated file functions for GC, ELPA Syncer, 2022/12/11
- [elpa] externals/org 1a9d0850b6 10/10: org-persist: Do not re-download url files on write, ELPA Syncer, 2022/12/11
- [elpa] externals/org 3b1e7af166 04/10: org-persist: Ensure index instantiated before read, ELPA Syncer, 2022/12/11
- [elpa] externals/org 8800d28e84 02/10: org: Use buffer-base-buffer in safe resource fns, ELPA Syncer, 2022/12/11
- [elpa] externals/org c91226354a 07/10: org-persist: Fix attempted mapc-ing of macro, ELPA Syncer, 2022/12/11
- [elpa] externals/org a6fc8d3f1f 01/10: ox: Handle failure to localize link,
ELPA Syncer <=