diff --git a/CHANGELOG.md b/CHANGELOG.md index 287600e..3aefec9 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/org-roam-node.el b/org-roam-node.el index d885a62..4e1ef94 100644 --- a/org-roam-node.el +++ b/org-roam-node.el @@ -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-"