emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org 87b4de9617 1/2: org-publish-resolve-externa


From: ELPA Syncer
Subject: [elpa] externals-release/org 87b4de9617 1/2: org-publish-resolve-external-link: Fix links to non-Org files
Date: Sat, 5 Aug 2023 09:58:27 -0400 (EDT)

branch: externals-release/org
commit 87b4de961709077806eef6509138281ab6b6d03b
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    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.
---
 lisp/ox-publish.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index f9c3877d7d..cff34f0588 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -1183,7 +1183,8 @@ references with `org-export-get-reference'."
                     (org-link-search search nil t)
                   (error
                    (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"))))))))
    ((not org-publish-cache)
     (progn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]