aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oni-org/oni-org.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el
index 9ac593b..d0ffd87 100644
--- a/oni-org/oni-org.el
+++ b/oni-org/oni-org.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2020.0921.230900
+;; Version: 2020.1115.140847
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna diminish all-the-icons)
;; This program is free software; you can redistribute it and/or modify
@@ -150,6 +150,14 @@ _l_: Store link ^^ _j_: Journal entry
"^[ \t]*#\\+end"
lim-up lim-down))))
+(defun oni-org-at-origin-property-p ()
+ "Non-nil when point is in an origin property."
+ (save-match-data
+ (save-excursion
+ (goto-char (line-beginning-position))
+ (and (looking-at org-property-re)
+ (string= (match-string 2) "ORIGIN")))))
+
(defun oni-org-dblock-write-backlinks (_params)
"Generate backlinks to org headings."
(let ((current-heading (nth 4 (org-heading-components)))
@@ -158,7 +166,8 @@ _l_: Store link ^^ _j_: Journal entry
(save-excursion
(goto-char (point-min))
(while (re-search-forward (rx-to-string `(and "*" ,current-heading "]")) nil t)
- (unless (oni-org-in-dblock-p)
+ (unless (or (oni-org-in-dblock-p)
+ (oni-org-at-origin-property-p))
(push (nth 4 (org-heading-components)) backlinks))))
(when (not (null current-heading-id))
(save-excursion