          (depth (if (integerp depth) depth)))
     (message "Loading search results...")
     (unwind-protect
-        (delq nil
-              (org-map-entries
-               (lambda ()
-                 (cl-destructuring-bind (level _reduced-level _todo _priority text tags)
-                     (org-heading-components)
-                   (let ((path (org-get-outline-path)))
-                     (when (and (or (null depth)
-                                    (<= level depth))
-                                (or (null tags)
-                                    (not (string-match-p ":TOC" tags))))
-                       (propertize
-                        (mapconcat
-                         'identity
-                         (list (mapconcat #'identity
-                                          (append (when include-files
-                                                    (list (or (+org-get-global-property "TITLE")
-                                                              (file-relative-name buffer-file-name))))
-                                                  path
-                                                  (list (replace-regexp-in-string org-link-any-re "\\4" text)))
-                                          " > ")
+        (delq
+         nil
+         (org-map-entries
+          (lambda ()
+            (cl-destructuring-bind (level _reduced-level _todo _priority text tags)
+                (org-heading-components)
+              (when (and (or (null depth)
+                             (<= level depth))
+                         (or (null tags)
+                             (not (string-match-p ":TOC" tags))))
+                (let ((path (org-get-outline-path)))
+                  (list (string-join
+                         (list (string-join
+                                (append (when include-files
+                                          (list (or (+org-get-global-property "TITLE")
+                                                    (file-relative-name (buffer-file-name)))))
+                                        path
+                                        (list (replace-regexp-in-string org-link-any-re "\\4" text)))
+                                " > ")
                                tags)
                          " ")
-                        'location (cons buffer-file-name (point)))))))
-               t 'agenda))
+                        (buffer-file-name)
+                        (point))))))
+          t 'agenda))
       (mapc #'kill-buffer org-agenda-new-buffers)
       (setq org-agenda-new-buffers nil))))
 

         "faq.org")
   2 t initial-input
   (mapcar (lambda (x)
             (propertize (concat "Doom Modules > " x)
                         'location
                         (get-text-property (1- (length x)) 'location x)))
           (doom--help-modules-list))))

;;;###autoload

current file is in, or d) the module associated with the current major mode (see
`doom--help-major-mode-module-alist')."
  (interactive
   (mapcar #'intern
           (split-string
            (completing-read "Describe module: "
                             (doom--help-modules-list) nil t nil nil
                             (doom--help-current-module-str))
            " " t)))
  (cl-check-type category symbol)
  (cl-check-type module symbol)
  (cl-destructuring-bind (module-string path)
      (or (assoc (format "%s %s" category module) (doom--help-modules-list))
          (user-error "'%s %s' is not a valid module" category module))
    (unless (file-readable-p path)
      (error "Can't find or read %S module at %S" module-string path))
    (if (not (file-directory-p path))
        (find-file path)
      (if (y-or-n-p (format "The %S module has no README file. Explore its directory?"
                            module-string))
          (doom-project-browse path)
        (user-error "Aborted module lookup")))))

