From 62d311de22d46e5ee3030d6b3e214add6619e01d Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Sat, 26 Feb 2022 18:07:45 -0800 Subject: [PATCH] (chore): org-map-entries -> org-map-region (#2107) org-map-entries is affected by agenda, while org-map-region is not --- org-roam-node.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/org-roam-node.el b/org-roam-node.el index 92ab903..117f39e 100644 --- a/org-roam-node.el +++ b/org-roam-node.el @@ -816,7 +816,8 @@ Any tags declared on #+FILETAGS: are transferred to tags on the new top heading. Any top level properties drawers are incorporated into the new heading." (interactive) (org-with-point-at 1 - (org-map-entries 'org-do-demote) + (org-map-region #'org-do-demote + (point-min) (point-max)) (insert "* " (org-roam--get-keyword "title") "\n") @@ -831,9 +832,11 @@ Converts a file containing a headline node at the top to a file node." (interactive) (org-with-point-at 1 - (org-map-entries (lambda () - (when (> (org-outline-level) 1) - (org-do-promote)))) + (org-map-region + (lambda () + (when (> (org-outline-level) 1) + (org-do-promote))) + (point-min) (point-max)) (let ((title (nth 4 (org-heading-components))) (tags (nth 5 (org-heading-components)))) (beginning-of-line)