forked from mirrors/org-mode
org-publish-resolve-external-link: Fix links to non-Org files
* lisp/ox-publish.el: Do not try to call `org-at-heading-p' when not in Org file. `org-at-heading-p' and `org-entry-get' may err unless inside Org buffer.
This commit is contained in:
parent
453c47b57d
commit
87b4de9617
|
@ -1183,7 +1183,8 @@ references with `org-export-get-reference'."
|
||||||
(org-link-search search nil t)
|
(org-link-search search nil t)
|
||||||
(error
|
(error
|
||||||
(signal 'org-link-broken (cdr err)))))
|
(signal 'org-link-broken (cdr err)))))
|
||||||
(and (org-at-heading-p)
|
(and (derived-mode-p 'org-mode)
|
||||||
|
(org-at-heading-p)
|
||||||
(org-string-nw-p (org-entry-get (point) "CUSTOM_ID"))))))))
|
(org-string-nw-p (org-entry-get (point) "CUSTOM_ID"))))))))
|
||||||
((not org-publish-cache)
|
((not org-publish-cache)
|
||||||
(progn
|
(progn
|
||||||
|
|
Loading…
Reference in New Issue