From: Robert Irelan <rirelan@gmail.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Bug: org-publish-resolve-external-link doesn't respect org-export-with-broken-links for fuzzy links
Date: Fri, 27 Sep 2019 12:30:37 -0700 [thread overview]
Message-ID: <CAJUyYjpNiyEj_3X5xgyAdNjVdyguZ4CqKbM7p=uzrZeini=74Q@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 59 bytes --]
Patch to fix attached
--
Robert Irelan
rirelan@gmail.com
[-- Attachment #2: 0001-ox-publish-signal-org-link-broken-for-broken-fuzzy-l.patch --]
[-- Type: text/x-patch, Size: 1265 bytes --]
From 3d3008398abb6c3a8cdfd796e6daa3f3ba909ad2 Mon Sep 17 00:00:00 2001
From: Robert Irelan <rmirelan@google.com>
Date: Fri, 27 Sep 2019 12:19:03 -0700
Subject: [PATCH] ox-publish: signal org-link-broken for broken fuzzy links
* lisp/ox-publish.el (org-publish-resolve-external-link): Signal
`org-link-broken' when `org-link-search' fails to resolve a link.
Without this change, a broken fuzzy link will always abort the export
even when `org-export-with-broken-links' is non-nil.
---
lisp/ox-publish.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 8928301fd..92a8aead3 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -1171,7 +1171,10 @@ (defun org-publish-resolve-external-link (search file &optional prefer-custom)
(with-current-buffer (find-file-noselect file)
(org-with-point-at 1
(let ((org-link-search-must-match-exact-headline t))
- (org-link-search search nil t))
+ (condition-case err
+ (org-link-search search nil t)
+ (error
+ (signal 'org-link-broken (cdr err)))))
(and (org-at-heading-p)
(org-string-nw-p (org-entry-get (point) "CUSTOM_ID"))))))))
((not org-publish-cache)
--
2.23.0.444.g18eeb5a265-goog
next reply other threads:[~2019-09-27 19:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-27 19:30 Robert Irelan [this message]
2019-10-08 9:18 ` Bug: org-publish-resolve-external-link doesn't respect org-export-with-broken-links for fuzzy links Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJUyYjpNiyEj_3X5xgyAdNjVdyguZ4CqKbM7p=uzrZeini=74Q@mail.gmail.com' \
--to=rirelan@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).