From da02453ab192cf777009addd999915c08823f19f Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Sun, 18 Jul 2021 23:08:59 +0800 Subject: [PATCH] (fix): migration: ensure empty roam_alias is removed (#1608) * (fix): migration: ensure empty roam_alias is removed Addresses #1596 * fix lint --- org-roam-migrate.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/org-roam-migrate.el b/org-roam-migrate.el index 287a10c..d28020c 100644 --- a/org-roam-migrate.el +++ b/org-roam-migrate.el @@ -115,13 +115,13 @@ This will take a while. Are you sure you want to do this?") ;; Replace roam_alias into properties drawer roam_aliases (when-let* ((aliases (mapcan #'split-string-and-unquote (cdar (org-collect-keywords '("roam_alias")))))) - (let ((case-fold-search t)) - (org-with-point-at 1 - (dolist (alias aliases) - (org-roam-alias-add alias)) - (while (re-search-forward "^#\\+roam_alias:" (point-max) t) - (beginning-of-line) - (kill-line 1))))) + (dolist (alias aliases) + (org-roam-alias-add alias))) + (let ((case-fold-search t)) + (org-with-point-at 1 + (while (re-search-forward "^#\\+roam_alias:" (point-max) t) + (beginning-of-line) + (kill-line 1)))) ;; Replace #+roam_tags into #+filetags (org-with-point-at 1