summaryrefslogtreecommitdiffstatshomepage
path: root/nroam-backlinks.el
diff options
context:
space:
mode:
Diffstat (limited to 'nroam-backlinks.el')
-rw-r--r--nroam-backlinks.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/nroam-backlinks.el b/nroam-backlinks.el
index 48444c7..5619fdc 100644
--- a/nroam-backlinks.el
+++ b/nroam-backlinks.el
@@ -108,13 +108,16 @@
(with-current-buffer (nroam-backlinks--work-buffer)
(insert-file-contents file nil nil nil 'replace)
(goto-char point)
- (let ((elt (org-element-at-point)))
- (let ((begin (org-element-property :begin elt))
- (end (org-element-property :end elt))
- (type (org-element-type elt))
- (outline (org-get-outline-path))
- (full-outline (org-get-outline-path 'with-self)))
- `(:type ,type :string ,(buffer-substring begin end) :full-outline ,full-outline :outline ,outline)))))
+ (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))))
+ `(:type ,type
+ :string ,(buffer-substring begin end)
+ :outline ,outline
+ :full-outline ,full-outline))))
(defun nroam-backlinks--hide-drawers ()
"Fold all drawers starting at POINT in the current buffer."