mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(perf)node-read: filter before map to candidate (#2168)
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,4 +1,12 @@
|
||||
# Changelog
|
||||
## TBD
|
||||
### Breaking
|
||||
### Added
|
||||
### Removed
|
||||
### Fixed
|
||||
- [#2168](https://github.com/org-roam/org-roam/pull/2168) (perf)node-read: filter nodes before mapping --to-candidate
|
||||
### Changed
|
||||
|
||||
## 2.2.2
|
||||
### Breaking
|
||||
### Added
|
||||
@ -14,6 +22,8 @@
|
||||
- [#2152](https://github.com/org-roam/org-roam/pull/2152) org-roam-preview-default-function: doesn't copy copy content of next heading node when current node's content is empty
|
||||
- [#2159](https://github.com/org-roam/org-roam/pull/2159) db: fix db syncs on narrowed buffers
|
||||
- [#2156](https://github.com/org-roam/org-roam/pull/2157) capture: templates with functions are handled correctly to avoid signaling `char-or-string-p`
|
||||
- [#2168](https://github.com/org-roam/org-roam/pull/2168) (perf)node-read: filter nodes before mapping --to-candidate
|
||||
|
||||
|
||||
### Changed
|
||||
- [#2160](https://github.com/org-roam/org-roam/pull/2160) core: ignore files in `org-attach-id-dir` by default
|
||||
|
@ -548,13 +548,13 @@ for an example sort function.
|
||||
The displayed title is formatted according to `org-roam-node-display-template'."
|
||||
(let* ((template (org-roam-node--process-display-format org-roam-node-display-template))
|
||||
(nodes (org-roam-node-list))
|
||||
(nodes (mapcar (lambda (node)
|
||||
(org-roam-node-read--to-candidate node template)) nodes))
|
||||
(nodes (if filter-fn
|
||||
(cl-remove-if-not
|
||||
(lambda (n) (funcall filter-fn (cdr n)))
|
||||
(lambda (n) (funcall filter-fn n))
|
||||
nodes)
|
||||
nodes))
|
||||
(nodes (mapcar (lambda (node)
|
||||
(org-roam-node-read--to-candidate node template)) nodes))
|
||||
(sort-fn (or sort-fn
|
||||
(when org-roam-node-default-sort
|
||||
(intern (concat "org-roam-node-read-sort-by-"
|
||||
|
Reference in New Issue
Block a user