aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oni-org-roam.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/oni-org-roam.el b/oni-org-roam.el
index e33b103..289da05 100644
--- a/oni-org-roam.el
+++ b/oni-org-roam.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2023.0805.233914
+;; Version: 2024.0212.234817
;; Package-Requires: (oni-org org-roam)
;; This program is free software; you can redistribute it and/or modify
@@ -101,6 +101,15 @@
(cons '(org-roam-backlinks-section :unique t)
(delete 'org-roam-backlinks-section org-roam-mode-sections)))
+;; Show only the current element, not the whole heading for the org-roam-buffer
+;; preview.
+(defun oni-org-roam-preview-element-function ()
+ (let ((element (org-element-at-point)))
+ (buffer-substring-no-properties (org-element-property :begin element)
+ (org-element-property :end element))))
+
+(setq org-roam-preview-function #'oni-org-roam-preview-element-function)
+
(org-roam-db-autosync-mode)
(provide 'oni-org-roam)