mirror of
https://github.com/org-roam/org-roam
synced 2025-08-03 12:27:23 -05:00
@ -124,11 +124,12 @@ and `:slant'."
|
||||
(defvar org-roam-current-node nil
|
||||
"The current node at point.")
|
||||
|
||||
(defcustom org-roam-mode-sections (list #'org-roam-backlinks-section
|
||||
#'org-roam-reflinks-section)
|
||||
"List of functions that insert sections for Org-roam."
|
||||
(defcustom org-roam-mode-section-functions (list #'org-roam-backlinks-section
|
||||
#'org-roam-reflinks-section)
|
||||
"Functions which insert sections of the `org-roam-buffer'.
|
||||
Each function is called with one argument, which is the current org-roam node at point."
|
||||
:group 'org-roam
|
||||
:type '(repeat function))
|
||||
:type 'hook)
|
||||
|
||||
;;; The mode
|
||||
(defvar org-roam-mode-map
|
||||
@ -162,8 +163,7 @@ which visits the thing at point."
|
||||
(org-roam-set-header-line-format (org-roam-node-title org-roam-current-node))
|
||||
(magit-insert-section (org-roam)
|
||||
(magit-insert-heading)
|
||||
(dolist (fn org-roam-mode-sections)
|
||||
(funcall fn org-roam-current-node))))))
|
||||
(run-hook-with-args 'org-roam-mode-section-functions org-roam-current-node)))))
|
||||
|
||||
(defun org-roam-buffer ()
|
||||
"Launch an Org-roam buffer for the current node at point."
|
||||
|
Reference in New Issue
Block a user