[oni-org-roam] Show only the current element of a reference
This commit is contained in:
parent
3d17ef6cb2
commit
2011414821
1 changed files with 10 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2023.0805.233914
|
;; Version: 2024.0212.234817
|
||||||
;; Package-Requires: (oni-org org-roam)
|
;; Package-Requires: (oni-org org-roam)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -101,6 +101,15 @@
|
||||||
(cons '(org-roam-backlinks-section :unique t)
|
(cons '(org-roam-backlinks-section :unique t)
|
||||||
(delete 'org-roam-backlinks-section org-roam-mode-sections)))
|
(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)
|
(org-roam-db-autosync-mode)
|
||||||
|
|
||||||
(provide 'oni-org-roam)
|
(provide 'oni-org-roam)
|
||||||
|
|
Loading…
Reference in a new issue