summaryrefslogtreecommitdiffstatshomepage
path: root/nroam-backlinks.el
diff options
context:
space:
mode:
Diffstat (limited to 'nroam-backlinks.el')
-rw-r--r--nroam-backlinks.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/nroam-backlinks.el b/nroam-backlinks.el
index 7bc2cec..e491a25 100644
--- a/nroam-backlinks.el
+++ b/nroam-backlinks.el
@@ -120,12 +120,13 @@ When nil, LEVEL defaults to 3."
(with-current-buffer (nroam-backlinks--work-buffer)
(insert-file-contents file nil nil nil 'replace)
(goto-char point)
- (let* ((elt (org-element-at-point))
- (begin (org-element-property :begin elt))
- (end (org-element-property :end elt))
- (type (org-element-type elt))
- (outline (org-get-outline-path))
- (full-outline (and outline (org-get-outline-path 'with-self))))
+ (let ((elt (org-element-at-point))
+ (begin (org-element-property :begin elt))
+ (end (org-element-property :end elt))
+ (type (org-element-type elt))
+ (outline (org-get-outline-path))
+ (full-outline (unless (org-before-first-heading-p)
+ (org-get-outline-path 'with-self))))
`(:type ,type
:string ,(buffer-substring begin end)
:outline ,outline