Skip to content

Commit

Permalink
Add defcustom to disable consult-org-roam-buffer selectively
Browse files Browse the repository at this point in the history
  • Loading branch information
jgru committed May 28, 2023
1 parent ede01c2 commit 2ca42a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions consult-org-roam-buffer.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
:type 'key
:group 'consult-org-roam-buffer)

(defcustom consult-org-roam-buffer-enabled t
"Boolean to enable/disable consult-org-raom-buffer"
:type 'boolean
:group 'consult-org-roam-buffer)

(defcustom consult-org-roam-buffer-after-buffers nil
"If non-nil, display org-roam buffers right after non-org-roam buffers.
Otherwise, display org-roam buffers after any other visible default
Expand Down
3 changes: 2 additions & 1 deletion consult-org-roam.el
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ argument ARG indicates whether the mode should be enabled or disabled."
;; Add or remove advice when enabled respectively disabled
(if consult-org-roam-mode
(progn
(consult-org-roam-buffer-setup)
(if consult-org-roam-buffer-enabled
(consult-org-roam-buffer-setup))
(advice-add #'org-roam-node-read :override #'consult-org-roam-node-read)
(advice-add #'org-roam-ref-read :override #'consult-org-roam-ref-read))
(progn
Expand Down

0 comments on commit 2ca42a1

Please sign in to comment.