From 9961a22a8c45a50c992f80f6d71879720c13432b Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 15 May 2020 14:23:06 +0200 Subject: [PATCH] (fix): replace `if` with `when` (#632) --- org-roam.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/org-roam.el b/org-roam.el index 33c85ed..10c06d3 100644 --- a/org-roam.el +++ b/org-roam.el @@ -590,9 +590,8 @@ plist containing the path to the file, and the original title." (let ((titles (or titles (list (org-roam--path-to-slug file-path))))) (dolist (title titles) (let ((k (concat - (if tags - (concat "(" (s-join org-roam-tag-separator tags) ") ") - "") + (when tags + (format "(%s) " (s-join org-roam-tag-separator tags))) title)) (v (list :path file-path :title title))) (puthash k v ht))))))