1
0
Fork 0

[oni-org-roam] Show only the current element of a reference

This commit is contained in:
Tom Willemse 2024-02-15 12:58:02 -08:00
parent 3d17ef6cb2
commit 2011414821

View file

@ -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)