mirror of
https://github.com/chrisbarrett/nursery
synced 2025-08-19 13:43:32 -05:00
Replace custom buffer display function with direct display-buffer calls
This commit is contained in:
@@ -82,7 +82,7 @@ When called interactively, prompt the user for MAX-DEPTH."
|
|||||||
(short-title (substring title 0 (min (length title) org-roam-links-max-title-length)))
|
(short-title (substring title 0 (min (length title) org-roam-links-max-title-length)))
|
||||||
(short-title (if (equal title short-title) title (concat short-title "…")))
|
(short-title (if (equal title short-title) title (concat short-title "…")))
|
||||||
graph)
|
graph)
|
||||||
(org-roam-review-display-buffer-and-select
|
(display-buffer
|
||||||
(org-roam-review-create-buffer
|
(org-roam-review-create-buffer
|
||||||
:title (format "Links for “%s\”" short-title)
|
:title (format "Links for “%s\”" short-title)
|
||||||
:instructions "Below is the graph of links to and from the current node."
|
:instructions "Below is the graph of links to and from the current node."
|
||||||
|
@@ -520,12 +520,6 @@ categorised by their maturity."
|
|||||||
('evergreen (cons "Evergreen 🌲" 1))
|
('evergreen (cons "Evergreen 🌲" 1))
|
||||||
(value value)))
|
(value value)))
|
||||||
|
|
||||||
(defun org-roam-review-display-buffer-and-select (buf)
|
|
||||||
(display-buffer buf)
|
|
||||||
(when-let* ((win (seq-find (lambda (it) (equal buf (window-buffer it)))
|
|
||||||
(window-list))))
|
|
||||||
(select-window win)))
|
|
||||||
|
|
||||||
(defun org-roam-review-node-due-p (node)
|
(defun org-roam-review-node-due-p (node)
|
||||||
(when-let* ((next-review (org-roam-review-node-next-review node)))
|
(when-let* ((next-review (org-roam-review-node-next-review node)))
|
||||||
(ts<= next-review (ts-now))))
|
(ts<= next-review (ts-now))))
|
||||||
@@ -534,7 +528,7 @@ categorised by their maturity."
|
|||||||
(defun org-roam-review-list-due ()
|
(defun org-roam-review-list-due ()
|
||||||
"List nodes that are due for review."
|
"List nodes that are due for review."
|
||||||
(interactive)
|
(interactive)
|
||||||
(org-roam-review-display-buffer-and-select
|
(display-buffer
|
||||||
(org-roam-review-create-buffer
|
(org-roam-review-create-buffer
|
||||||
:title "Due Notes"
|
:title "Due Notes"
|
||||||
:instructions "The nodes below are due for review.
|
:instructions "The nodes below are due for review.
|
||||||
@@ -560,7 +554,7 @@ them as reviewed with `org-roam-review-accept',
|
|||||||
(defun org-roam-review-list-by-maturity ()
|
(defun org-roam-review-list-by-maturity ()
|
||||||
"List all evergreen nodes categorised by maturity."
|
"List all evergreen nodes categorised by maturity."
|
||||||
(interactive)
|
(interactive)
|
||||||
(org-roam-review-display-buffer-and-select
|
(display-buffer
|
||||||
(org-roam-review-create-buffer
|
(org-roam-review-create-buffer
|
||||||
:title "Evergreen Notes"
|
:title "Evergreen Notes"
|
||||||
:instructions "The nodes below are categorised by maturity."
|
:instructions "The nodes below are categorised by maturity."
|
||||||
@@ -582,7 +576,7 @@ them as reviewed with `org-roam-review-accept',
|
|||||||
(defun org-roam-review-list-recently-added ()
|
(defun org-roam-review-list-recently-added ()
|
||||||
"List nodes that were created recently, grouped by time."
|
"List nodes that were created recently, grouped by time."
|
||||||
(interactive)
|
(interactive)
|
||||||
(org-roam-review-display-buffer-and-select
|
(display-buffer
|
||||||
(org-roam-review-create-buffer
|
(org-roam-review-create-buffer
|
||||||
:title "Recently Created Notes"
|
:title "Recently Created Notes"
|
||||||
:instructions "The nodes below are sorted by when they were created."
|
:instructions "The nodes below are sorted by when they were created."
|
||||||
@@ -594,7 +588,7 @@ them as reviewed with `org-roam-review-accept',
|
|||||||
|
|
||||||
(defun org-roam-review--update-workspace-for-completed-review ()
|
(defun org-roam-review--update-workspace-for-completed-review ()
|
||||||
(when-let* ((buf (get-buffer "*org-roam-review*")))
|
(when-let* ((buf (get-buffer "*org-roam-review*")))
|
||||||
(org-roam-review-display-buffer-and-select buf)))
|
(display-buffer buf)))
|
||||||
|
|
||||||
(defmacro org-roam-review--visiting-node-at-point (&rest body)
|
(defmacro org-roam-review--visiting-node-at-point (&rest body)
|
||||||
(declare (indent 0))
|
(declare (indent 0))
|
||||||
|
@@ -207,7 +207,7 @@ QUERY is a PRCE regexp string that will be passed to ripgrep."
|
|||||||
(format "(%s)" input)
|
(format "(%s)" input)
|
||||||
input))))
|
input))))
|
||||||
(let ((nodes (org-roam-search--ripgrep-for-nodes query)))
|
(let ((nodes (org-roam-search--ripgrep-for-nodes query)))
|
||||||
(org-roam-review-display-buffer-and-select
|
(display-buffer
|
||||||
(org-roam-review-create-buffer
|
(org-roam-review-create-buffer
|
||||||
:title (concat "Search Results: " (propertize query 'face 'org-roam-search-query))
|
:title (concat "Search Results: " (propertize query 'face 'org-roam-search-query))
|
||||||
:placeholder "No search results"
|
:placeholder "No search results"
|
||||||
@@ -249,7 +249,7 @@ QUERY is a PRCE regexp string that will be passed to ripgrep."
|
|||||||
QUERY is an `org-tags-filter'."
|
QUERY is an `org-tags-filter'."
|
||||||
(interactive (list (org-tags-filter-read "Search by tags filter (+/-): ")))
|
(interactive (list (org-tags-filter-read "Search by tags filter (+/-): ")))
|
||||||
(org-roam-review-modify-tags query t)
|
(org-roam-review-modify-tags query t)
|
||||||
(org-roam-review-display-buffer-and-select
|
(display-buffer
|
||||||
(org-roam-review-create-buffer
|
(org-roam-review-create-buffer
|
||||||
:title "Tag Search Results"
|
:title "Tag Search Results"
|
||||||
:instructions "The list below contains nodes matching the given tags."
|
:instructions "The list below contains nodes matching the given tags."
|
||||||
|
@@ -261,7 +261,7 @@ This means titles can be restored if
|
|||||||
(defun org-roam-slipbox-list-notes (slipbox)
|
(defun org-roam-slipbox-list-notes (slipbox)
|
||||||
"List nodes belonging to SLIPBOX."
|
"List nodes belonging to SLIPBOX."
|
||||||
(interactive (list (org-roam-slipbox--read)))
|
(interactive (list (org-roam-slipbox--read)))
|
||||||
(org-roam-review-display-buffer-and-select
|
(display-buffer
|
||||||
(org-roam-review-create-buffer
|
(org-roam-review-create-buffer
|
||||||
:title (concat "Notes for slipbox: " (propertize slipbox 'face 'org-roam-slipbox-name))
|
:title (concat "Notes for slipbox: " (propertize slipbox 'face 'org-roam-slipbox-name))
|
||||||
:instructions "The nodes below are sorted by slipbox"
|
:instructions "The nodes below are sorted by slipbox"
|
||||||
|
Reference in New Issue
Block a user