diff options
author | Nicolas Petton | 2021-03-04 17:35:54 +0100 |
---|---|---|
committer | GitHub | 2021-03-04 17:35:54 +0100 |
commit | edbd6f0c7edf7ab47a79a2273456ab3a95aea74e (patch) | |
tree | f0fee0cf261c0e6793a43c178d8600dd03d01233 | |
parent | 6a412e8c327e2da3d0e9dab60f9de4ca909a6923 (diff) | |
parent | 03663d5e7666a7c3ba93b08ea119ac8b8b71121e (diff) | |
download | nroam-edbd6f0c7edf7ab47a79a2273456ab3a95aea74e.tar.gz nroam-edbd6f0c7edf7ab47a79a2273456ab3a95aea74e.zip |
Merge pull request #5 from Whil-/master
nroam-backlinks.el: Fix edge case (again)
-rw-r--r-- | nroam-backlinks.el | 13 |
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 |