From bc5092fdef512280b7d7d3aa04f1ba887360a759 Mon Sep 17 00:00:00 2001 From: Ignacio Date: Thu, 24 Mar 2022 01:15:44 +0100 Subject: [PATCH] fixed bug --- lisp/org/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org/org.el b/lisp/org/org.el index 67c8f1cedf..0fff28af81 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -9063,7 +9063,8 @@ org-offer-links-in-entry (org-back-to-heading t) (setq end (save-excursion (outline-next-heading) (point))) (while (re-search-forward org-link-any-re end t) - (push (match-string 0) links)) + (when (eq (org-element-type (org-element-context)) 'link) + (push (match-string 0) links))) (setq links (org-uniquify (reverse links)))) (cond ((null links) -- 2.25.1